Skip to content

Adds support for resolving multiple host IPs #254

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

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 3 times, most recently from 24ed06c to 9074281 Compare December 6, 2023 16:43
@cgranleese-r7 cgranleese-r7 force-pushed the meterpreter-resolve-multiple-hosts branch 2 times, most recently from ad58746 to a869040 Compare February 14, 2025 14:53
@cgranleese-r7 cgranleese-r7 force-pushed the meterpreter-resolve-multiple-hosts branch from a869040 to 112accc Compare February 14, 2025 15:32
@cgranleese-r7 cgranleese-r7 added the attic Older submissions that we still want to work on again label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attic Older submissions that we still want to work on again
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants