Merged
Conversation
e5fe66b to
5f3b870
Compare
Contributor
Author
|
I'm working through the test failures right now. |
940f928 to
ce697bc
Compare
bwatters-r7
reviewed
May 8, 2025
dledda-r7
reviewed
May 21, 2025
Contributor
|
efb4798 to
c028754
Compare
Contributor
Author
|
I've dropped that temprary commit that was added for testing and bumped the |
c028754 to
5ce3035
Compare
dledda-r7
approved these changes
May 26, 2025
Contributor
dledda-r7
left a comment
There was a problem hiding this comment.
Retested after changes, looks good!
Contributor
Release NotesThis adds support for the SOCKS5H protocol, allowing DNS resolution through a SOCKS5 proxy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for the SOCKS5H proxy convention which is an unofficial standard whereby the proxy client (Metasploit) does not resolve hostnames to IP address itself but rather sends the hostname to the proxy server for resolution. Metasploit has floundered on it's approach for handling DNS resolution and proxies in the past. Currently when a module is run, the hostname is passed to
Msf::RhostsWalkerwhich will resolve it itself to ensure that if a hostname maps to multiple IP address, the module is run for each. This PR retains this functionality but allows it to be bypassed when a SOCKS5H or HTTP proxy is in use. Both of these proxy server types can resolve hostnames themselves. This does mean that if a user is targeting a hostname that resolves to multiple IP addresses (e.g.google.com) that it the module will only run against one target if a DNS-resolving proxy is in use. If no proxy is in use, the module will run against all targets.Requires changes from rapid7/rex-socket#76
Fixes #19641
Verification
podman run --rm --name socks5 -p 1080:1080 serjs/go-socks5-proxysocks.command == 1to see connection requests, then see if there's an IP address or hostname)msfconsoleconnectcommandconnect -p 'socks5://localhost' github.com 22connect -p 'socks5h://localhost' github.com 22auxiliary/scanner/http/http_versionrun RHOSTS=github.com Proxies=socks5://localhostrun RHOSTS=github.com Proxies=socks5h://localhost:1080