• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2018
  • April
  • 4
  • Whonow DNS Server – Dynamic DNS Rebinding

Whonow DNS Server – Dynamic DNS Rebinding

April 4, 2018 Comments Off on Whonow DNS Server – Dynamic DNS Rebinding
dns rebinding attack how to use whonow dns server Whonow DNS Server - Dynamic DNS Rebinding

A malicious DNS server for executing DNS Rebinding attacks on the fly. whonow lets you specify DNS responses and rebind rules dynamically using domain requests themselves.

# respond to DNS queries for this domain with 52.23.194.42 the first time
# it is requested and then 192.168.1.1 every time after that
A.52.23.194.42.1time.192.168.1.1.forever.rebind.network

# respond first with 52.23.194.42, then 192.168.1.1 the next five times,
# and then start all over again (1, then 5, forever...)
A.52.23.194.42.1time.192.168.1.1.5times.repeat.rebind.network

What’s great about dynamic DNS Rebinding rules is that you don’t have to spin up your own malicious DNS server to start exploiting the browser’s Same-origin policy. Instead, everyone can share the same public whonow server running on port 53 of rebind.network.

 

Subdomains = Rebind Rules

The beauty of whonow is that you can define the behavior of DNS responses via subdomains in the domain name itself. Using only a few simple keywords: A, (n)times, forever, and repeat, you can define complex and powerful DNS behavior.

 

Anatomy of a whonow request

A.<ip-address>.<rule>[.<ip-address>.<rule>[.<ip-address>.<rule>]][.uuid/random-string].example.com
  • A: The type of DNS request. Currently only A records are supported, but AAAA should be coming soon.
  • <ip-address>: an ipv4 (ipv6 coming soon) address with each octet seprated by a period (e.g. 192.168.1.1.
  • <rule>: One of three rules
    • (n)time[s]: The number of times the DNS server should reply with the previous IP address. Accepts both plural and singular strings (e.g. 1time, 3times, 5000times)
    • forever: Respond with the previous IP address forever.
    • repeat: Repeat the entire set of rules starting from the beginning.
  • [uuid/random-string]: A random string to keep DNS Rebind attacks against the same IP addresses separate from each other. See Gotchas for more info.
  • example.com: A domain name you have pointing to a whonow nameserver, like the publicly available rebind.network:53 whonow instance.

Rules can be chained together to form complex response behavior.

 

Examples

# always respond with 192.168.1.1. This isn't really DNS rebinding
# but it still works
A.192.168.1.1.forever.rebind.network

# alternate between localhost and 10.0.0.1 forever
A.127.0.0.1.1time.10.0.0.1.1time.repeat.rebind.network

# first respond with 192.168.1.1 then 192.168.1.2. Now respond 192.168.1.3 forever.
A.192.168.1.1.1time.192.168.1.2.2times.192.168.1.3.forever.rebind.network

# respond with 52.23.194.42 the first time, then whatever `whonow --default-address`
# is set to forever after that (default: 127.0.0.1)
A.52.23.194.42.1time.rebind.network

 

Limitations

Each label [subdomain] may contain zero to 63 characters… The full domain name may not exceed the length of 253 characters in its textual representation. (from the DNS Wikipedia page)

Additionally, there may not be more than 127 labels/subdomains.

 

Gotchas


Use Unique Domain Names

Each unique domain name request to whonow creates a small state-saving program in the server’s RAM. The next time that domain name is requested the program counter increments and the state may be mutated. All unique domain names are their own unique program instances. To avoid clashing with other users or having your domain name program’s state inadvertently incremented you should add a UUID subdomain after your rule definitions. That UUID should never be reused.

# this
A.127.0.0.1.1time.10.0.0.1.1time.repeat.8f058b82-4c39-4dfe-91f7-9b07bcd7fbd4.rebind.network

# not this
A.127.0.0.1.1time.10.0.0.1.1time.repeat.rebind.network

 

–max-ram-domains

The program state associated with each unique domain name is stored by whonow in RAM. To avoid running out of RAM an upper-bound is placed on the number of unique domains who’s program state can be managed at the same time. By default, this value is set to 10,000,000, but can be configured with the --max-ram-domains. Once this limit is reached, domain names and their saved program state will be removed in the order they were added (FIFO).

 

Running your own whonow server

To run your own whonow server in the cloud use your domain name provider’s admin panel to configure a custom nameserver pointing to your VPS. Then install whonow on that VPS and make sure it’s running on port 53 (the default DNS port) and that port 53 is accessible to the Internet.

# install
npm install --cli -g whonow@latest

# run it!
whonow --port 53

 

 

Usage

$ whonow --help
usage: whonow [-h] [-v] [-p PORT] [-d DEFAULT_ANSWER] [-b MAX_RAM_DOMAINS]

A malicious DNS server for executing DNS Rebinding attacks on the fly.

Optional arguments:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit.
  -p PORT, --port PORT  What port to run the DNS server on (default: 53).
  -d DEFAULT_ANSWER, --default-answer DEFAULT_ANSWER
                        The default IP address to respond with if no rule is
                        found (default: "127.0.0.1").
  -b MAX_RAM_DOMAINS, --max-ram-domains MAX_RAM_DOMAINS
                        The number of domain name records to store in RAM at
                        once. Once the number of unique domain names queried
                        surpasses this number domains will be removed from
                        memory in the order they were requested. Domains that
                        have been removed in this way will have their program
                        state reset the next time they are queried (default:
                        10000000).

 

Dynamic DNS Rebinding: Whonow DNS Server Download

Post navigation

OWASP SecureTea Tool Project
Sandmap – Network and System Reconnaissance Tool

Related Articles

Samba Issues Security Updates to Patch Three Vulnerabilities

Samba Issues Security Updates to Patch Three Vulnerabilities

- Hack Tools
March 31, 2023
New APT Exploits Zimbra Vulnerability to Target European Military and Diplomatic Entities

New APT Exploits Zimbra Vulnerability to Target European Military and Diplomatic Entities

- Hack Tools
March 30, 2023
MSI Dump - A Tool That Analyzes Malicious MSI Installation Packages, Extracts Files, Streams, Binary Data And Incorporates YARA Scanner

MSI Dump – A Tool That Analyzes Malicious MSI Installation Packages, Extracts Files, Streams, Binary Data And Incorporates YARA Scanner

- Hack Tools
March 30, 2023
hacker gadgets
hacker phone covers

Recent Posts

Samba Issues Security Updates to Patch Three Vulnerabilities

Samba Issues Security Updates to Patch Three Vulnerabilities

March 31, 2023
New APT Exploits Zimbra Vulnerability to Target European Military and Diplomatic Entities

New APT Exploits Zimbra Vulnerability to Target European Military and Diplomatic Entities

March 30, 2023
MSI Dump - A Tool That Analyzes Malicious MSI Installation Packages, Extracts Files, Streams, Binary Data And Incorporates YARA Scanner

MSI Dump – A Tool That Analyzes Malicious MSI Installation Packages, Extracts Files, Streams, Binary Data And Incorporates YARA Scanner

March 30, 2023
aerleon: Generate firewall configs for multiple firewall platforms

aerleon: Generate firewall configs for multiple firewall platforms

March 30, 2023
hashtopolis v0.13.1 released: A Hashcat wrapper for distributed hashcracking

hashtopolis v0.13.1 released: A Hashcat wrapper for distributed hashcracking

March 30, 2023
Artemis: modular web reconnaissance tool and vulnerability scanner

Artemis: modular web reconnaissance tool and vulnerability scanner

March 29, 2023

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs

About Us

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Join Our Community!

Please wait...
Get the latest News and Hacking Tools delivered to your inbox.
Don't Worry ! You will not be spammed

Active Members

Submit a Tool

Hackers Handbook 2018


Grab your copy here

ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW