Closed OJ closed 9 years ago
Test FAILED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/206/ Test FAILED.
Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/207/ Test PASSED.
@OJ Does this crash required a particular setup? Because clearly I have been using stageless meterpreter and migrating without any problem. Tested on Windows 7 x64 yesterday. Migrated to an 64 bit process and everything worked completely fine.
This problem only exists when the stageless payload does what it should do and use :init_connect for the initial stage URL. So you wouldn't see this problem appear because of the issue here: https://github.com/rapid7/metasploit-framework/pull/5618
Now that the above PR has been landed, you will see this problem occurring, and so this becomes important.
Cheers!
@OJ Ah thanks a lot for clarification. Didn't see the PR at msf end. Good work.
Thanks @void-in. I should have mentioned it in the original submission! I'm glad you asked the question.
Cheers.
Migrates like a champ, thanks.
Thanks mate. Appreciate you looking at stuff on your weekend.
Stageless Windows HTTP/S Meterpreter sessions were failing to migrate because the internal implementation of URI switching was only updating the current URI that was in use for the HTTP/S comms, and not updating the transport configuration that was being maintained behind the scenes. This meant that stageless sessions would create a transport configuration block for migration that was invalid, and the result was nasty crashes.
This PR contains code that changes this behaviour so that it doesn't crash. It:
Verification
Pre-patch
Without this patch, this is what would happen on migrate:
As you can see, rather messy. You can see that MSF thinks it's a new session coming back in when it's not, and things get very out of whack.
The crash on Windows was horrible too.
Post-patch
And with this PR implemented, we get:
Steps
For each of
windows/meterpreter_reverse_http
,windows/meterpreter_reverse_https
,windows/x64/meterpreter_reverse_http
andwindows/x64/meterpreter_reverse_https
:Sorry for the failures! @hmoore-r7 and @bcook-r7 I'd appreciate your eyes over this. Thanks!