All Projects → veggiedefender → Browsertunnel

veggiedefender / Browsertunnel

Licence: mit
Surreptitiously exfiltrate data from the browser over DNS

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Browsertunnel

Octodns
Tools for managing DNS across multiple providers
Stars: ✭ 2,090 (+1080.79%)
Mutual labels:  dns
Dnsmasqweb
基于DNSmasq的DNS解析、以及DHCP地址分配系统
Stars: ✭ 166 (-6.21%)
Mutual labels:  dns
Recsech
Recsech is a tool for doing Footprinting and Reconnaissance on the target web. Recsech collects information such as DNS Information, Sub Domains, HoneySpot Detected, Subdomain takeovers, Reconnaissance On Github and much more you can see in Features in tools .
Stars: ✭ 173 (-2.26%)
Mutual labels:  dns
Powershell ipv4networkscanner
Powerful asynchronus IPv4 network scanner for PowerShell
Stars: ✭ 161 (-9.04%)
Mutual labels:  dns
Dns Proxy
Simple DNS Proxy written in Node.JS. Override hosts, domains, or tlds. Redirect certain domains to different nameservers.
Stars: ✭ 165 (-6.78%)
Mutual labels:  dns
Sslify
Rapidly SSLify Your Server!
Stars: ✭ 168 (-5.08%)
Mutual labels:  dns
Nictool
NicTool: a DNS management solution
Stars: ✭ 159 (-10.17%)
Mutual labels:  dns
Dnslib
A Python library to encode/decode DNS wire-format packets
Stars: ✭ 174 (-1.69%)
Mutual labels:  dns
Pihole Unbound
Guide to setup Unbound recursive DNS resolver with Pi-Hole. With additional configs for speed and security!! 🚀🔒
Stars: ✭ 165 (-6.78%)
Mutual labels:  dns
Dnsperf
DNS Performance Testing Tools
Stars: ✭ 171 (-3.39%)
Mutual labels:  dns
Sites Using Cloudflare
💔 Archived list of domains using Cloudflare DNS at the time of the CloudBleed announcement.
Stars: ✭ 1,914 (+981.36%)
Mutual labels:  dns
Ip Attack
Auto IP or Domain Attack Tool ( #1 )
Stars: ✭ 162 (-8.47%)
Mutual labels:  dns
Dnsguide
A guide to writing a DNS Server from scratch in Rust
Stars: ✭ 2,226 (+1157.63%)
Mutual labels:  dns
Dnscontrol
Synchronize your DNS to multiple providers from a simple DSL
Stars: ✭ 2,089 (+1080.23%)
Mutual labels:  dns
Blokada
The official repo for Blokada for Android and iOS.
Stars: ✭ 2,427 (+1271.19%)
Mutual labels:  dns
Ddns
🚩 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
Stars: ✭ 2,582 (+1358.76%)
Mutual labels:  dns
Ddoor
DDoor - cross platform backdoor using dns txt records
Stars: ✭ 168 (-5.08%)
Mutual labels:  dns
Rrda
REST API allowing to perform DNS queries over HTTP
Stars: ✭ 176 (-0.56%)
Mutual labels:  dns
Dcompass
[WIP] High-performance programmable DNS server aiming at robustness, speed, and flexibility
Stars: ✭ 174 (-1.69%)
Mutual labels:  dns
Partyloud
A simple tool to generate fake web browsing and mitigate tracking
Stars: ✭ 170 (-3.95%)
Mutual labels:  dns

browsertunnel

CircleCI

Browsertunnel is a tool for exfiltrating data from the browser using the DNS protocol. It achieves this by abusing dns-prefetch, a feature intended to reduce the perceived latency of websites by doing DNS lookups in the background for specified domains. DNS traffic does not appear in the browser's debugging tools, is not blocked by a page's Content Security Policy (CSP), and is often not inspected by corporate firewalls or proxies, making it an ideal medium for smuggling data in constrained scenarios.

It's an old technique—DNS tunneling itself dates back to the '90s, and Patrick Vananti wrote about using dns-prefetch for it in 2016, but as far as I can tell, browsertunnel is the first open source, production-ready client/server demonstrating its use. Because dns-prefetch does not return any data back to client javascript, communication through browsertunnel is only unidirectional. Additionally, some browsers disable dns-prefetch by default, and in those cases, browsertunnel will silently fail.

The project comes in two parts:

  1. A server, written in golang, functions as an authoritative DNS server which collects and decodes messages sent by browsertunnel.
  2. A small javascript library, found in the html/ folder, encodes and sends messages from the client side.

How it works

Browsertunnel can send arbitrary strings over DNS by encoding the string in a subdomain, which is forwarded to the browsertunnel server when the browser attempts to recursively resolve the domain.

Longer messages that cannot fit in one domain (253 bytes) are automatically split into multiple queries, which are reassembled and decoded by the server.

Setup and usage

First, set up DNS records to delegate a subdomain to your server. For example, if your server's IP is 192.0.2.123 and you want to tunnel through the subdomain t1.example.com, then your DNS configuration will look like this:

t1		IN	NS	t1ns.example.com.
t1ns		IN	A	192.0.2.123

On your server, install browsertunnel using go get. Alternatively, compile browsertunnel on your own machine, and copy the binary to your server.

go get github.com/veggiedefender/browsertunnel

Next, run browsertunnel, specifying the subdomain you want to tunnel through.

browsertunnel t1.example.com

For full usage, run browsertunnel -help:

$ browsertunnel -help
Usage of browsertunnel:
  -deletionInterval int
    	seconds in between checks for expired messages (default 5)
  -expiration int
    	seconds an incomplete message is retained before it is deleted (default 60)
  -maxMessageSize int
    	maximum encoded size (in bytes) of a message (default 5000)
  -port int
    	port to run on (default 53)

For more detailed descriptions and rationale for these parameters, you may also consult the godoc.

Finally, test out your tunnel! You can use my demo page here or clone this repo and load html/index.html locally. If everything works, you should be able to see messages logged to stdout.

For real-world applications of this project, you may want to fork and tweak the code as you see fit. Some inspiration:

  • Write messages to a database instead of printing them to stdout
  • Transpile or rewrite the client code to work with older browsers
  • Make the ID portion of the domain larger or smaller, depending on the amount of traffic you get, and ID collisions you expect
  • Authenticate and encrypt messages for secrecy and tamper-resistance (remember that DNS is a plaintext protocol)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].