Transfer Files with Netcat, Ncat, RDP
π§± File Transfers with Netcat & Ncat β The Hacker's Swiss Army Knife π‘οΈ
Whether you're dealing with a firewall, a restricted shell, or a stealthy transfer, netcat
(nc
) and its upgraded cousin ncat
can move files like a boss. πͺπ§Ύ
Weβll show how to:
π₯ Send a file to the target
π€ Retrieve a file from the target
π Use both
nc
andncat
π§ͺ Even use Bash with
/dev/tcp
for stealthy transfers!
π₯ 1. Netcat - Send File from Attacker β‘οΈ Target
Target: Start Listener (nc
)
nc
)Attacker: Send File
π -q 0
= Close connection once file is sent
π 2. Using Ncat Instead of Netcat
On Target (Receiver):
On Attacker (Sender):
π 3. Reverse Connection (Target Initiates)
This method is firewall friendly because outbound connections are usually allowed. π‘
On Attacker: Listen on port 443
On Target: Connect and receive
π§ββοΈ 4. No Netcat? No Problem! Use Bash + /dev/tcp/
/dev/tcp/
If Netcat/Ncat isnβt available, Bash can save the day using a magic file:
On Attacker:
On Target (Bash):
π cat
reads from the network like a file β pure Bash stealth!
π Reverse Transfers: Target β‘οΈ Pwnbox?
Just flip the directions!
π οΈ On Pwnbox, listen with Netcat or Ncat
π€ On the compromised machine, connect and send file using:
Last updated