Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/util/dot_net_deserialization/enums.rb
19500 views
1
module Msf
2
module Util
3
module DotNetDeserialization
4
module Enums
5
6
#
7
# .NET Serialization Enumerations
8
#
9
BinaryArrayTypeEnum = {
10
# see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/4dbbf3a8-6bc4-4dfc-aa7e-36a35be6ff58
11
Single: 0,
12
Jagged: 0,
13
Rectangular: 2,
14
SingleOffset: 3,
15
JaggedOffset: 4,
16
RectangularOffset: 5
17
}
18
19
BinaryTypeEnum = {
20
# see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/054e5c58-be21-4c86-b1c3-f6d3ce17ec72
21
Primitive: 0,
22
String: 1,
23
Object: 2,
24
SystemClass: 3,
25
Class: 4,
26
ObjectArray: 5,
27
StringArray: 6,
28
PrimitiveArray: 7
29
}
30
31
PrimitiveTypeEnum = {
32
# see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/4e77849f-89e3-49db-8fb9-e77ee4bc7214
33
Boolean: 1,
34
Byte: 2,
35
Char: 3,
36
Decimal: 5,
37
Double: 6,
38
Int16: 7,
39
Int32: 8,
40
Int64: 9,
41
SByte: 10,
42
Single: 11,
43
TimeSpan: 12,
44
DateTime: 13,
45
UInt16: 14,
46
UInt32: 15,
47
UInt64: 16,
48
Null: 17,
49
String: 18
50
}
51
52
RecordTypeEnum = {
53
# see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nrbf/954a0657-b901-4813-9398-4ec732fe8b32
54
SerializedStreamHeader: 0,
55
ClassWithId: 1,
56
SystemClassWithMembers: 2,
57
ClassWithMembers: 3,
58
SystemClassWithMembersAndTypes: 4,
59
ClassWithMembersAndTypes: 5,
60
BinaryObjectString: 6,
61
BinaryArray: 7,
62
MemberPrimitiveTyped: 8,
63
MemberReference: 9,
64
ObjectNull: 10,
65
MessageEnd: 11,
66
BinaryLibrary: 12,
67
ObjectNullMultiple256: 13,
68
ObjectNullMultiple: 14,
69
ArraySinglePrimitive: 15,
70
ArraySingleObject: 16,
71
ArraySingleString: 17,
72
MethodCall: 21,
73
MethodReturn: 22
74
}
75
76
end
77
end
78
end
79
end
80
81