Add Proxies support to creating a session with mssql_login #18848
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 PR allows
mssql_login
to correctly works with over a provided Socks proxy.Setup
Ubuntu VM, MacOS Host running two instanced of Framework:
routes add x.x.x.x/32 -1
socks_proxy
module running on port 1080mssql_login
moduleBefore
After
Wireshark
The above screenshot shows no leaked destination IP (Private Docker IP Range in the Ubuntu VM)
The above screenshot shows an encrypted TCP stream when executing
query select @@version;
in the mssql session.Verification
You might want to ensure that on your host, you have no Docker containers running so that false positives with the same IP on the host and VM are avoided.
msfconsole
on your hostroute add
to add the internal Docker IP from Ubuntu to the routing table (you may be able to callroute add 172.17.0.1/24 -1
)use socks_proxy
use mssql_login
proxies=
option pointing to your IP and port used by the socks_proxyrun proxies=socks5:your_ip:1080 rhost=ubuntu_vm_internal_docker_ip rport=1433 stop_on_success=true CreateSession=true username=sa password=whatever_password_you_picked verbose=true