{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5637","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5637/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5637/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5637/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/5637","id":92311944,"number":5637,"title":"Stager resiliency for reverse_tcp (Windows x64 and x86)","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/metasploit-framework/labels/enhancement","name":"enhancement","color":"5319e7"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/library","name":"library","color":"fad8c7"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/payload","name":"payload","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"bcook-r7","id":10031469,"avatar_url":"https://avatars.githubusercontent.com/u/10031469?v=3","gravatar_id":"","url":"https://api.github.com/users/bcook-r7","html_url":"https://github.com/bcook-r7","followers_url":"https://api.github.com/users/bcook-r7/followers","following_url":"https://api.github.com/users/bcook-r7/following{/other_user}","gists_url":"https://api.github.com/users/bcook-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bcook-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcook-r7/subscriptions","organizations_url":"https://api.github.com/users/bcook-r7/orgs","repos_url":"https://api.github.com/users/bcook-r7/repos","events_url":"https://api.github.com/users/bcook-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bcook-r7/received_events","type":"User","site_admin":false},"milestone":null,"comments":22,"created_at":"2015-07-01T08:21:04Z","updated_at":"2015-09-03T03:58:31Z","closed_at":"2015-09-03T03:52:20Z","pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5637","html_url":"https://github.com/rapid7/metasploit-framework/pull/5637","diff_url":"https://github.com/rapid7/metasploit-framework/pull/5637.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/5637.patch"},"body":"This PR contains changes that make the stagers more resilient to failure. If the stager isn't able to connect, or if download of the stage fails prior to invocation, then the stager should now correctly handle these cases. Stagers now clean up memory, close sockets and retry in the most appropriate way.\r\n\r\nAdding resiliency features obviously adds size to the shellcode, and so this is only included when there is enough room in the target exploit/binary/etc.\r\n\r\nThis PR is only for x64 and x86 `reverse_tcp` in Windows, future PRs will cover other cases.\r\n\r\n## Verification\r\n\r\n- [x] `windows/meterpreter/reverse_tcp` payload functions as it did before.\r\n- [ ] `windows/x64/meterpreter/reverse_tcp` payload functions as it did before.\r\n- [x] `windows/meterpreter/reverse_tcp` is able to recover when the stage isn't successfully downloaded.\r\n- [ ] `windows/x64/meterpreter/reverse_tcp` is able to recover when the stage isn't successfully downloaded.\r\n\r\nSimulation of this is a bit of a pain in the butt, so I might ask if @bcook-r7 or @hmoore-r7 can handle this as they're across repro steps already. Thanks!"},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/137323658","html_url":"https://github.com/rapid7/metasploit-framework/pull/5637#issuecomment-137323658","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5637","id":137323658,"user":{"login":"bcook-r7","id":10031469,"avatar_url":"https://avatars.githubusercontent.com/u/10031469?v=3","gravatar_id":"","url":"https://api.github.com/users/bcook-r7","html_url":"https://github.com/bcook-r7","followers_url":"https://api.github.com/users/bcook-r7/followers","following_url":"https://api.github.com/users/bcook-r7/following{/other_user}","gists_url":"https://api.github.com/users/bcook-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bcook-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcook-r7/subscriptions","organizations_url":"https://api.github.com/users/bcook-r7/orgs","repos_url":"https://api.github.com/users/bcook-r7/repos","events_url":"https://api.github.com/users/bcook-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bcook-r7/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T03:58:31Z","updated_at":"2015-09-03T03:58:31Z","body":"Thanks @OJ looks good here."}}