Skip to content

Using CSSH to hide your Dnmap server

royharoush edited this page Feb 13, 2017 · 2 revisions

You can avoid exposing your Dnmap server to the internet and leverage reverse SSH tunnels and Cluster SSH (CSSH) in order to have your scanners connect back back to you, from anywhere.

the following steps depict how this would be accomplished:

  1. DistributedScan-vultrGetScannersInfo : grab the list of your scanners and keep it in your clipboard

  2. cssh --options "-R 46001:127.0.0.1:46001 -x -o ConnectTimeout=10" : start CSSH with a default option to perform a reverse shell from your scanners:

  3. in CSSH, add your hosts from clipboard, enter your passphrase (also accept the the new keys, if these are new scanners),

  4. screen -S 'dnmapClient' -d -m dnmap_client -s 127.0.0.1 -p 46001 : from CSSH, run this command. it will start an instance of screen with dnmap client that automatically connects back to your server .

Note: your server's listening port must match the address of the reverse tunnel,i.e., dnmap_server -f commands -p 46001

Demo

Clone this wiki locally