linkedinattic / jaqen Goto Github PK
View Code? Open in Web Editor NEWJaqen - Simple DNS rebinding
License: BSD 2-Clause "Simplified" License
Jaqen - Simple DNS rebinding
License: BSD 2-Clause "Simplified" License
I'm running jaqen
on VPS of mine like so:
# using fake IPs for GitHub
EXTERNAL_IP=54.173.189.125
INTERNAL_IP=172.30.0.10
# start jaqen
sudo ./jaqen \
--base-uri mydomainna.me \
--dns-bind "0.0.0.0:53" \
--http-bind "$EXTERNAL_IP" \
--http-pool "$INTERNAL_IP" \
--http-bind-map "$INTERNAL_IP/$EXTERNAL_IP" -vvv
I've configured mydomainna.me
to use a $EXTERNAL_IP
as a custom nameserver and have disabled the firewall to allow traffic on port 53. When I run jaqen
and request http://mydomainna.me
in the browser I get the following output in the console.
INFO[0000] Found 1 eligible addresses meeting criteria: [54.173.189.125\172.30.0.10:80]
INFO[0000] Leasing 54.173.189.125\172.30.0.10:80
INFO[0000] Created HTTPServer bound to "54.173.189.125\172.30.0.10:80" as a result of request "00000000-0000-0000-0000-000000000000" on socket "00000000-0000-0000-0000-000000000000"
INFO[0000] Created new DNSServer bound to "0.0.0.0:53" (tcp)
INFO[0000] Created new DNSServer bound to "0.0.0.0:53" (udp)
DEBU[0014] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN A
DEBU[0014] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0014] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0015] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0015] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0015] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0015] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0015] Got DNS Request: ;webcdn.website. IN A
DEBU[0015] Got DNS Request: ;webcdn.website. IN A
DEBU[0015] Got DNS Request: ;webcdn.website. IN AAAA
DEBU[0015] Got DNS Request: ;webcdn.website. IN AAAA
However, it jaqen
doesn't actually return DNS responses. A simple nslookup shows:
> mydomainna.me
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find mydomainna.me: SERVFAIL
And monitoring DNS queries via tcpdump
also shows the DNS server is failing:
$ sudo tcpdump udp port 53
23:11:28.099524 IP brannon.47992 > router.asus.com.domain: 45422+ A? mydomainna.me. (32)
23:11:28.099538 IP brannon.47992 > router.asus.com.domain: 11880+ AAAA? mydomainna.me. (32)
23:11:28.177006 IP router.asus.com.domain > brannon.47992: 45422 ServFail 0/0/0 (32)
23:11:28.281190 IP router.asus.com.domain > brannon.47992: 11880 ServFail 0/0/0 (32)
23:11:28.281539 IP brannon.47992 > router.asus.com.domain: 23679+ A? mydomainna.me. (32)
23:11:28.281583 IP brannon.47992 > router.asus.com.domain: 63510+ AAAA? mydomainna.me. (32)
23:11:28.358193 IP router.asus.com.domain > brannon.47992: 23679 ServFail 0/0/0 (32)
23:11:28.860719 IP router.asus.com.domain > brannon.47992: 63510 ServFail 0/0/0 (32)
23:11:28.861286 IP brannon.47992 > router.asus.com.domain: 29708+ A? mydomainna.me. (32)
23:11:28.861339 IP brannon.47992 > router.asus.com.domain: 42729+ AAAA? mydomainna.me. (32)
23:11:28.939490 IP router.asus.com.domain > brannon.47992: 29708 ServFail 0/0/0 (32)
23:11:28.944913 IP router.asus.com.domain > brannon.47992: 42729 ServFail 0/0/0 (32)
# ...etc
@li-lyoung, any ideas what this might be? I have a hung that I'm using the CLI args wrong but I figured you might have a better idea. Great research and DEFCON 25 talk btw ๐.
As it's currently written, jaqen requires at least go 1.7 because of this issue
https://stackoverflow.com/questions/42802278/install-context-package-in-golang#42802790
It might be a good to add this to a brief requirements section in the readme.
Hey again! I just spent a couple of hours trying to set up jaqen to simulate an attack on servers and domains that I own, and I'm sad to report that I couldn't get it working. Steps to reproduce:
Every request simply returns an html page with the word "Index", except for requests for pages in manager.go
, which return either 404 or something like:
ERRO[0009] websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header
2017/08/24 16:27:41 http: multiple response.WriteHeader calls
Did I make an error with my setup?
While building Jaqen, I got the errors:
offers.go:92: multiple-value uuid.NewV4() in single-value context
socket.go:93: multiple-value uuid.NewV4() in single-value context
This appears to be due to an API change in the dependency: https://github.com/satori/go.uuid
NewV4() now returns an additional error value, changed in commit satori/go.uuid@0ef6afb
Build works when you change those two lines to accept a second value, for example: id, _ := uuid.NewV4()
What are the instructions for building this tool?
I've downloaded Go 1.9 and tried:
git clone https://github.com/linkedin/jaqen
cd jaqen
go get
But I get this go path error:
o get: no install location for directory /home/brannon/Documents/code/jaqen outside GOPATH
For more details see: 'go help gopath'
My $GOPATH
is ~/go
. Are there additional instructions for installing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.