Dynamic port forwarding using tsh ssh -D cripples nmap functionality #40360
Unanswered
AlexTudurean
asked this question in
Q&A
Replies: 1 comment 5 replies
-
This is interesting. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
I am having some issues when trying to use a teleport node as a sort of proxy to scan resources inside networks behind that said proxy node.
My setup looks like this:
I have a node inside my Teleport cluster that i would like to use to proxy
nmap
scans to resources behind this node (the resources are disconnected from the internet, the teleport node acts as the only link to the outside, to access the resources you need to first ssh into "proxy node" and then you gain access to the resources inside the said network).I want to be able to do this remotely from another teleport agent so I basically start a dynamic port forward:
tsh ssh -D 1080 <teleport_node>
Then I use this new socks5 proxy in conjuction with proxychains to scan a resource in the network i mentioned before:
proxychains4 nmap -sT -Pn -sV -n <resource_ip>
The result is that somehow... all ports are
open
andtcpwrapped
. The same command but usingscanme.nmap.org
as the resource never actually ends (or i never waited enough for it to end, but i don't think it actually ever ends).Removing the
-sV
flag from nmap does make it "work" but renders the output absolutely useless because all ports are seen as open.Doing the same exact thing as above but instead using standard
ssh
(OpenSSH) to dynamically port forward traffic results in the expected outcome:ssh -D 127.0.0.1:1080 <teleport_node>
Does anybody have any idea if
tsh
somehow changes the way that a normal dynamic port forward works as opposed to using ssh?Beta Was this translation helpful? Give feedback.
All reactions