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

Transport and pivot fixes for Meterpreter #13130

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Conversation

busterb
Copy link
Contributor

@busterb busterb commented Mar 24, 2020

This incorporates the fix for #12841 (which also fixes some fundamental crash bugs in Mettle payloads, rapid7/mettle#194) and rapid7/rex-socket#23, which fixes issues pivoting SOCKS5 traffic over reverse_http(s) connections.

Fixes already tested in their respective PRs.

@busterb busterb self-assigned this Mar 24, 2020
@@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1102904
CachedSize = 1102952
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for visibility, is there any documentation on what this number is / where it comes from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it's part of the payload landing process, 5th step:

https://github.com/rapid7/metasploit-payloads/wiki

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What that does is cache payload sizes so that when Metasploit needs to see if a payload would work with a given exploit module, it has a quick way to do that comparison. Prior to this attribute existing, payloads were always generated on msfconsole bootup, and those sizes were cached. As the cost of doing this increased (more complex payloads were added, and more of them as well), this mechanism was built to make msfconsole start faster.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That only these values changed due to code changes in the source gem (in this case, mettle's) is a function of how much code changed (in this case, very little), and specifics about how some cpu architectures work overall.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original PR that added this was #4894

@bcook-r7 bcook-r7 merged commit 346b593 into rapid7:master Mar 25, 2020
@tdoan-r7 tdoan-r7 added the rn-fix release notes fix label Apr 1, 2020
@tdoan-r7
Copy link
Contributor

tdoan-r7 commented Apr 1, 2020

Release Notes

This fix addresses issues in OSX where the reverse_tcp handler doesn't distinguish between stager and Meterpreter connections, as well as issues with pivoting SOCKS5 traffic over reverse_http(s) connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug payload rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants