-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automangler #22
Comments
Great to hear you are on bored with this functionality 👍. Rot13 sounds like a nice solution for obfuscation, especially considering it doesn't add any extra characters. It would probably be nice to have the obfuscation optional as the non-rot13 version would likely be useful for debugging and dev. I'd imagine the flag for rot13/not-rot13 would also have to be embedded in the domain name itself as well. Should we chat here about the format these requests would take? So far, my initial proposal would be something like this:
Not saying that is necessarily the best method/syntax, plus it uses reserved Here are some things to consider:
We should keep in mind that each subdomain/label has a max of 63 characters and the entire domain name can't be greater than 255. One thing that I love about this feature is that it means that separate parties can share a single FakeDNS instance running in the cloud as neither of them need access to the install/config file to generate their malicious requests. That is awesome because it decreases the barrier-to-entry to use FakeDNS / experiment with DNS rebinding attacks. In fact, I just registered Request for comments? |
OK, I have an idea but this is where it gets tricky DNS specifies that each dot in the domain name is a "label" which has it's own length and can even have it's own encoding -- see IDNA and international domain names outside of ASCII (https://en.wikipedia.org/wiki/Internationalized_domain_name#ToASCII_and_ToUnicode) I suggest that by making the first label (subdomain) a known, FakeDNS-only value which denotes a rule-query, then have each successive label build the rule, and have IP addresses converted from decimals to bytes. An example is this:
becomes
where optionally rot-13 is applied to everything up to the IP address section. |
I wonder if there are legitimate uses for such a service? Something something something cloudflare. |
It would also be useful to include arbitrary labels in-between the rule definitions and A.189.39.42.89-1%192.168.1.1.FAKEDNS.5e934108-5999-40ee-9f96-32bf0e5f9699.attacker.domain
A.189.39.42.89-1%192.168.1.1.FAKEDNS.some-subdomain.attacker.domain
A.189.39.42.89-1%192.168.1.1.FAKEDNS.attacker.domain Where do DNS rebind and round robin rules fit into your proposed URL schema? What if we opted for human-readable rule labels like: 189.39.42.89.1time.192.168.1.1.forever.FAKEDNS.some-subdomain.attacker.domain
189.39.42.89.1time.192.168.1.13.5times.192.168.1.1.forever.FAKEDNS.some-subdomain.attacker.domain Another option is that we could opt for implicit barriers between IPs due to their fixed length and replace the current config's # in full urls, these could look like
A.189.39.42.89.10-192.168.1.1.FAKEDNS.attacker.domain #rebind
A.189.39.42.89.192.168.1.1.192.168.1.13.FAKEDNS.attacker.domain #round robin |
How exactly do you mean legitimate? Penetration testing would def be my most use case. Or do you mean existing service that does this? I haven't ever heard of one, but maybe... I've never used cloudflare before. |
It looks like Tavis Ormandy's rbndr actually provides this type of functionality. He's got a public server up that allows anyone to use his malicious DNS server too: https://lock.cmpxchg8b.com/rebinder.html Granted, his implementation doesn't feature some of the features we are talking about here. |
Goal was any constant value -- user definable is probably a good idea!
That's true, I must not have been paying attention.
I suggest it because this way because it's less space, lightly obfuscated, and also because it could be combined into one "label" with no dots in between. You can't do that with the decimal numbers. I really wasn't paying attention when I made the example rule because I should have removed the dots in between the octets. This makes the rule a little more compact to eyeball.
of the two, i like using keywords the most but in the comment above i also suggest using some uncommon hex keywords as well. Probably we don't have to do any worries about obfuscation if we enable rot-13 as an option. |
Hey @Crypt0s, I've implemented this basic functionality as a standalone DNS server called I didn't mean to fork our efforts, I just needed this functionality quickly for some of my research and opted to spend the afternoon rolling it myself. Feel free to lift whatever ideas + code you like from that repo (or of course, contribute to it). This could also serve as a nice first version that we can both play with and learn what needs improving/how this system works in general. |
brannon: no worries! I'll check out your implementation and mention you in the code/commits for the idea :) |
Allow special DNS requests to indicate that FakeDNS should handle them with a rule system embedded within the request itself -- automatically mangling the request based on the request itself.
The text was updated successfully, but these errors were encountered: