CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/dcerpc/wdscp/constants.rb
Views: 11766
1
# -*- coding: binary -*-
2
module Rex
3
module Proto
4
module DCERPC
5
module WDSCP
6
# http://msdn.microsoft.com/en-us/library/dd891406(prot.20).aspx
7
# http://msdn.microsoft.com/en-us/library/dd541332(prot.20).aspx
8
# Not all values defined by the spec have been imported...
9
class Constants
10
WDSCP_RPC_UUID = "1A927394-352E-4553-AE3F-7CF4AAFCA620"
11
OS_DEPLOYMENT_GUID = "\x5a\xeb\xde\xd8\xfd\xef\xb2\x43\x99\xfc\x1a\x8a\x59\x21\xc2\x27"
12
13
VAR_NAME_ARCHITECTURE = "ARCHITECTURE"
14
VAR_NAME_CLIENT_GUID = "CLIENT_GUID"
15
VAR_NAME_CLIENT_MAC = "CLIENT_MAC"
16
VAR_NAME_VERSION = "VERSION"
17
VAR_NAME_MESSAGE_TYPE = "MESSAGE_TYPE"
18
VAR_NAME_TRANSACTION_ID = "TRANSACTION_ID"
19
VAR_NAME_FLAGS = "FLAGS"
20
VAR_NAME_CC = "CC" #Client Capabilities
21
VAR_NAME_IMDC = "IMDC"
22
23
VAR_TYPE_LOOKUP = {
24
VAR_NAME_ARCHITECTURE => :ULONG,
25
VAR_NAME_CLIENT_GUID => :WSTRING,
26
VAR_NAME_CLIENT_MAC => :WSTRING,
27
VAR_NAME_VERSION => :ULONG,
28
VAR_NAME_MESSAGE_TYPE => :ULONG,
29
VAR_NAME_TRANSACTION_ID => :WSTRING,
30
VAR_NAME_FLAGS => :ULONG,
31
VAR_NAME_CC => :ULONG,
32
VAR_NAME_IMDC => :ULONG
33
}
34
35
CC_FLAGS = {
36
:V2 => 1,
37
:VHDX => 2
38
}
39
40
DOMAIN_JOIN_FLAGS = {
41
:JOIN_DOMAIN => 1,
42
:ACCOUNT_EXISTS => 2,
43
:PRESTAGE_USING_MAC => 3,
44
:RESET_BOOT_PROGRAM => 256
45
}
46
47
ARCHITECTURE = {
48
:X64 => 9,
49
:X86 => 0,
50
:IA64 => 6,
51
:ARM => 5
52
}
53
54
PACKET_TYPE = {
55
:REQUEST => 1,
56
:REPLY => 2
57
}
58
59
OPCODE = {
60
:IMG_ENUMERATE => 2,
61
:LOG_INIT => 3,
62
:LOG_MSG => 4,
63
:GET_CLIENT_UNATTEND => 5,
64
:GET_UNATTEND_VARIABLES => 6,
65
:GET_DOMAIN_JOIN_INFORMATION => 7,
66
:RESET_BOOT_PROGRAM => 8,
67
:GET_MACHINE_DRIVER_PACKAGES => 200
68
}
69
70
BASE_TYPE = {
71
:BYTE => 0x0001,
72
:USHORT => 0x0002,
73
:ULONG => 0x0004,
74
:ULONG64 => 0x0008,
75
:STRING => 0x0010,
76
:WSTRING => 0x0020,
77
:BLOB => 0x0040
78
}
79
80
TYPE_MODIFIER = {
81
:NONE => 0x0000,
82
:ARRAY => 0x1000
83
}
84
85
end
86
end
87
end
88
end
89
end
90
91