Data Exfiltration Methodology
Data Exfiltration Methodology
The aim of the lab is to transfer a sensitive file over to our attacker machine, and we found a file called
credentials which has a username and a password in it.
Now, let's check what tools we have which can help us transfer this file. We can open command prompt on
windows and check.
We have python and powershell available. Now, we are checking for ports with outbound connectivity. For that,
first we can start a python server in our kali machine on the port we want to check. Here im using 8080.
1/6
Now, let's try and open the contents of the folder where this server is running on our windows machine browser.
For that, we first check our kali machine's ip address.
Let's enter this into the browser, along with the port number of course.
Yes, we can see the contents of the directory. This means that outbound connectivity is allowed on port 8080.
Now, let's check for DNS outbound connectivity. For that, we first change the ipv4 network settings from the
shortcut available on the desktop.
2/6
The preferred DNS server ip is set to our kali machine ip. Now, let's turn on wireshark on our kali machine and
capture packets on the VPN interface.
When we visit any website on our windows browser after running wireshark, we can see that DNS packets are
captured. This means that outbound connectivity is allowed on the DNS port (port 53) as well.
So now, we can use a tool called PacketWhisper to send over the credentials file via DNS.
The PacketWhisper folder is already available to us on the machine. First, copy the credentials file into the
PacketWhisper folder.
3/6
Now, start wireshark capture on the vpn interface on your kali machine.
4/6
Choose the appropriate options as shown below.
5/6
Now, we can start the broadcast.
Once this process finishes (which will take a while), we can stop the packet capture in Wireshark and save the
capture as a .pcap file. Be careful to save it as a pcap and not anything else. Then we can run packetcapture on
our kali machine and extract the contents from the pcap file by specifying the same options while sending the
file.
There is also a way to automatically scan for ports allowing outbound connectivity using the egresscheck
framework as mentioned in the lab. REFER THE LAB TOO FOR CLEARER DETAILS.
6/6