👂Netcat
nc(Netcat) & Ncat tips and tricks for PenTesters.
Last updated
Was this helpful?
nc(Netcat) & Ncat tips and tricks for PenTesters.
Last updated
Was this helpful?
Ncat is a modern reinvention of Netcat. Ncat includes several features not available in Hobbit's original version of the tool. ... For example, while the traditional Netcat has a simple port scanning feature, Ncat lacks that feature because Nmap can be used more effectively for that purpose.
Here are some key new features available in Ncat but absent in Netcat:
Connection brokering
Proxy connections
SSL support
IPv6 support
Possibility to chain Ncat’s together
Used to conn. to an HTTP server to enumerate/attack HTTP methods
1-Starting a listener(server):
2-Starting a client:
-v: verbos
-u: added to both server/client to start a UDP session.
>output.txt
: for server to save a file.
echo "msg" |
: for client to send & close conn. immediately. (or cat a file to send it)
-e: excute a programe (cmd.exe for windows).t
then in the attacker computer starta client.
For example, we can have a connection (Target is listening and waiting for the Attacker).
in Target/Victim Machine:
-l: to listen.
-p: choose an open port on Target mahcine.
-e: programe to excute (Win: cmd.exe Unix: /bin/bash).
in Attacker Machine:
helpful when the attack is over WAN (here Attacker has the listener):
Attacker Machine:
-p: open port (pay attaention for Egress firewall in the Target Network).
-v: give us verbose info.
Target Machine:
-e: programe to excute (Win: cmd.exe Unix: /bin/bash).
-p: same port the attacker is listening in.
go check the page in ⚙ Sys Attacks for steps in Win machines.