-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meterpreter Fails to use Squid Kerberos/NTLM authentication proxy with HTTP/1.0 #5626
Comments
Proxy issues are going to be the death of me ;) This isn't the first report of this issue that I've seen, but I've not had an NTLM proxy set up so I haven't been able to test this case. This is the most thorough report so far, so thanks for that! I'm not convinced that the lack of the
This is why you see a successful connection when the payload fires, but from there Meterpreter fails to get through because the API set is different, and the Out of interest, is this environment you're working in on site with a client or is it local? Would you be open to testing fixes if I can look into this tomorrow? Thanks @Loki1980 :) |
Hi @OJ this is a local environment I made for testing, so yes I can definitely help you if you want :) Thank you very much for your quick response! |
OK mate that sounds great. I'll get into this first thing in the morning (it's midnight here now). Thank you for the detailed report. Super helpful! I will be in touch tomorrow. Cheers! |
Hey @OJ , I really don't know what to say.. my setup is quite similar (it is just a bit more complex), the client version is windows 7 x64 Sp1. If you look at the responses of the squid3 proxy server you'll notice that it uses http/1.1,while I don't know if there is a way to force squid3 to always respond using http/1.0, maybe you can try forcing the meterpreter to use http/1.0 and see what happens in that case? |
hey @OJ , I confirm you it is a problem with the HTTP/1.0 connections. |
Great find! That gives me something to work with. Thanks so much dude!
|
Hey @OJ , that explains why it works perfectly when using a HTTP/1.1 compliant proxy and fails with a HTTP/1.0 one! |
Hey Loki, I'm currently working on a fix for this. Should be done by the end of
|
Hey @Loki1980 I've now got an env set up with NTLM auth going through Squid 2.7 that has just HTTP 1.0 support and I'm seeing the same breakage. This is great, because I can finally see the failures that other people have been having. This is terrible, because now I have to fix it ;) I'm on it though! |
Hey all, I've added some documentation to the wiki that talks about all this stuff in a bit of detail. I'd appreciate a review. Thanks! |
We should be good now that #5691 is merged. |
Hi all,
I'm having trouble using windows/x64/meterpreter/reverse_https in an environment with a Squid Kerberos/NTLM authentication proxy.
The initial connection works fine, but then, when the stage takes over, it is unable to connect because it does not send the "Proxy-Connection: Keep-Alive" header, so it does not get the "Proxy-Authenticate" header with the challenge from the proxy.
Below an example of request/response for the initial connection (which works) and the stage
CONNECT X.X.X.X:443 HTTP/1.0
Host: X.X.X.X:443
Proxy-Connection: Keep-Alive
Pragma: no-cache
Proxy-Authorization: Negotiate TlRMTVNTUAABAAAAl4II4gAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==
Content-Length: 0
HTTP/1.0 407 Proxy Authentication Required
Server: squid/2.7.STABLE9
Date: Mon, 29 Jun 2015 13:45:21 GMT
Content-Type: text/html
Content-Length: 1169
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: Negotiate TlRMTVNTUAA [... REMOVED ...]
X-Cache: MISS from debian-proxy
X-Cache-Lookup: NONE from debian-proxy:3128
Via: 1.0 debian-proxy:3128 (squid/2.7.STABLE9)
Connection: keep-alive
Proxy-Connection: keep-alive
CONNECT X.X.X.X:443 HTTP/1.1
Host: X.X.X.X:443
Proxy-Authorization: Negotiate TlRMTVNTUAABAAAAl4II4gAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==
HTTP/1.0 407 Proxy Authentication Required
Server: squid/2.7.STABLE9
Date: Mon, 29 Jun 2015 13:45:26 GMT
Content-Type: text/html
Content-Length: 1169
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
X-Cache: MISS from debian-proxy
X-Cache-Lookup: NONE from debian-proxy:3128
Via: 1.0 debian-proxy:3128 (squid/2.7.STABLE9)
Connection: close
Stageless payload have the same problem, they are not able to authenticate on the proxy because of the missing header.
I am using the latest version of metasploit-framework from git.
The text was updated successfully, but these errors were encountered: