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

Adds support for resolving multiple host IPs #254

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cgranleese-r7
Copy link
Contributor

@cgranleese-r7 cgranleese-r7 commented Nov 16, 2023

This PR updates the Mettle Meterpreter to now support resolving multiple IPs. Previously resolve_host and resolve_hosts would only resolve a single IP per host. Now they will resolve each IP per host.

This is achieved by now having packing TLV_TYPE_IP and TLV_TYPE_ADDR_TYPE into a TLV_META_TYPE_GROUP TLV called TLV_TYPE_RESOLVE_HOST_ENTRY.

To ensure this is backwards compatible, we will be updating the Metasploit-Framework side of things to check for both the now TLV type as well as the old TLVs.

This is part of a larger effort to update all Meterpreter implementations:
Updating other Meterpreter implementations:

Metasploit Framework PR:

Verification

  • Follow the updated README.md to get a session.
  • Run the following command and ensure IPV4 addresses are being resolved: irb -e "puts(framework.sessions.values.last.net.resolve.resolve_host 'google.com')"
  • Run the following command and ensure IPV4 addresses are being resolved: irb -e "puts(framework.sessions.values.last.net.resolve.resolve_host 'google.com', 23)"

@cgranleese-r7 cgranleese-r7 force-pushed the meterpreter-resolve-multiple-hosts branch 6 times, most recently from 8520872 to e0a3300 Compare November 17, 2023 11:39
@cgranleese-r7 cgranleese-r7 force-pushed the meterpreter-resolve-multiple-hosts branch 2 times, most recently from 4abb1f7 to 24ed06c Compare December 6, 2023 16:42
@cgranleese-r7 cgranleese-r7 force-pushed the meterpreter-resolve-multiple-hosts branch from 24ed06c to 9074281 Compare December 6, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants