Skip to content
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

Move migration stub generation into MSF #7674

Merged
merged 1 commit into from
Dec 22, 2016

Conversation

OJ
Copy link
Contributor

@OJ OJ commented Dec 8, 2016

This code adds support for transport-specific migration stubs to be generated in MSF rather than having them hard-coded in Meterpreter. The accompanying PR for Meterpreter is here: rapid7/metasploit-payloads#155

This is a subset of work done in #6860, and the aim is to reduce that PR into more reasonable chunks so that it has a hope of landing.

Changes include:

  • Creation of new migration payloads that are built on the fly when migration is happening.
  • Payloads are arch and transport specific (required for things like named pipes down the track as each transport has a nuance to its migration).
  • Some other code tidying/refactoring, but not much.

Verification

  • Generate http/s and tcp payloads for Windows x86 and Windows x64
  • Set up respective handlers.
  • Migrate from x86 to x86. It should work.
  • Migrate from x86 to x64. It should work.
  • Migrate from x64 to x64. It should work.
  • Migrate from x64 to x86. It should work.

Done!

Ping @sempervictus who was particularly interested in this.

This code adds support for transport-specific migration stubs to be
generated in MSF rather than having them hard-coded in Meterpreter.
@OJ
Copy link
Contributor Author

OJ commented Dec 8, 2016

Note: I'll need to update this PR with the Meterp gems once the payloads have been built, and also update the payload sizes. This build might not go green to begin with.

@busterb
Copy link
Contributor

busterb commented Dec 8, 2016

Thanks. Migration should get even more interesting in the future:
https://www.youtube.com/watch?v=A_GlGglbu1U

@wwebb-r7 wwebb-r7 self-requested a review December 16, 2016 19:14
@wwebb-r7 wwebb-r7 self-assigned this Dec 16, 2016
@wwebb-r7 wwebb-r7 merged commit d0696a0 into rapid7:master Dec 22, 2016
@wwebb-r7
Copy link
Contributor

wwebb-r7 commented Dec 22, 2016

Release Notes

The migration stub code generation from Meterpreter has been relocated into Metasploit Framework.

@OJ
Copy link
Contributor Author

OJ commented Dec 23, 2016

Thanks!

@OJ OJ deleted the refactor-migrate-stubs branch December 23, 2016 00:03
@tdoan-r7 tdoan-r7 added the rn-enhancement release notes enhancement label Jan 11, 2017
@bennofs
Copy link

bennofs commented Oct 24, 2017

did this remove support for linux migration?

@OJ
Copy link
Contributor Author

OJ commented Oct 24, 2017

Linux migration hasn't worked for quite a long time. This PR was no the cause. I'm not sure what the status is with regards to reimplementing it. @busterb any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants