metasploit-framework/external/source/shellcode
Raphael Mudge 788c96566f Allow HTTP stager to work with authenticated proxies
The HttpOpenRequest function from WinINet requires the
INTERNET_FLAG_KEEP_CONNECTION flag to communicate through an
authenticated proxy.

From MSDN ( http://tinyurl.com/chwt86j ):

"Uses keep-alive semantics, if available, for the connection. This
 flag is required for Microsoft Network (MSN), NT LAN Manager (NTLM),
 and other types of authentication."

Without this flag, the HTTP stager will fail when faced with a proxy
that requires authentication. The Windows HTTPS stager does not have
this problem.

For HTTP Meterpreter to communicate through an authenticated proxy a
separate patch will need to be made to the Meterpreter source code.
This is at line 1125 of source/common/core.c in the Meterpreter source
code.

My motivation for this request is for windows/dllinject/reverse_http
to download a DLL even when faced with an authenticated proxy. These
changes accomplish this.

Test environment:

I staged a SmoothWall device with the Advanced Proxy Web Add-on. I
enabled Integrated Windows Authentication with a W2K3 DC. I verified
the HTTP stager authenticated to and communicated through the proxy
by watching the proxy access.log
2013-02-24 17:33:00 -05:00
..
bsd Fix up reverse_tcp ipv6 stager for freebsd 2012-02-01 01:41:24 -06:00
bsdi/ia32 initial import of shellcode source into v3 2007-04-29 20:27:23 +00:00
generic initial import of shellcode source into v3 2007-04-29 20:27:23 +00:00
linux Update linux stagers for NX compatibility 2012-09-12 18:44:00 -05:00
osx initial import of shellcode source into v3 2007-04-29 20:27:23 +00:00
solaris/sparc initial import of shellcode source into v3 2007-04-29 20:27:23 +00:00
windows Allow HTTP stager to work with authenticated proxies 2013-02-24 17:33:00 -05:00
Makefile initial import of shellcode source into v3 2007-04-29 20:27:23 +00:00
Makefile.incl Adds BSD IPv6 payloads and stagers 2012-02-01 00:54:42 -06:00