
Un escáner automatizado y confiable para la vulnerabilidad Log4Shell (CVE-2021-44228).
Un escáner automatizado y fiable para la vulnerabilidad Log4Shell CVE-2021-44228.
Demostración en vídeo:
Aquí está la ayuda de uso:
$ python3 log4jhunt.py
+--------------+
Log4JHunt
+--------------+
[+] Log4jHunt by RedHunt Labs - A Modern Attack Surface (ASM) Management Company
[+] Author: Pinaki Mondal (RHL Research Team)
[+] Continuously Track Your Attack Surface using https://redhuntlabs.com/nvadr.
[-] You have to supply at least a single host to scan!
usage: log4jhunt.py [-h] [-u URL] [-f FILE] [-d DELAY] [-t TIMEOUT] [-T TOKEN] [-E EMAIL] [-W WEBHOOK] [-S SERVER] [-ua USERAGENT] [-m METHOD] [-H HEADERS] [-p PROXY]
optional arguments:
-h, --help show this help message and exit
-u URL, --url URL URL to probe for the vulnerability.
-f FILE, --file FILE Specify a file containing list of hosts to scan.
-d DELAY, --delay DELAY
Delay in-between two concurrent requests.
-t TIMEOUT, --timeout TIMEOUT
Scan timeout for a single host.
-T TOKEN, --token TOKEN
Canary token to use in payloads for scanning.
-E EMAIL, --email EMAIL
Email to receive notifications.
-W WEBHOOK, --webhook WEBHOOK
Webhook URL to receive notifications.
-S SERVER, --server SERVER
Custom DNS callback server for receiving notifications.
-ua USERAGENT, --user-agent USERAGENT
Custom user agent string to use for requests.
-m METHOD, --methods METHOD
Comma separated list of HTTP Method to use
-H HEADERS, --headers HEADERS
Comma separated list of custom HTTP headers to use.
-p PROXY, --proxy PROXY
HTTP proxy to use (if any).
La herramienta utiliza tokens Log4Shell de Canary Tokens. La herramienta tiene la capacidad de generar tokens automáticamente, si los valores del token (--token) y del servidor (--server) están vacíos.
Una vez que el token se genera, el token y el valor de auth se escriben en un archivo llamado canary-token.json.
Puedes especificar los objetivos de dos modos:
./log4jhunt.py -u 1.2.3.4:8080 ...
./log4jhunt.py -f targets.txt ...
Hay dos formas en las que puedes recibir canales de notificación:
--email) -- servicio proporcionado por Canarytokens.--webhook) -- servicio proporcionado por Canarytokens.--server) -- tu propio servidor DNS de callback personalizado.Una vez que la herramienta encuentra un servidor vulnerable, las notificaciones se reenviarán a tu canal de comunicación preferido.
--methods.--headers, respectivamente.--user-agent.--timeout.--proxy.Dado que hay muchas peticiones HTTP involucradas, podría ser una tarea engorrosa para el host remoto manejar las peticiones. El parámetro --delay está aquí para ayudarte en esos casos. Puedes especificar un valor de delay en segundos -- que se usará entre dos peticiones consecutivas al mismo puerto de un servidor.
Hemos cubierto más detalles sobre la vulnerabilidad Log4j en nuestro Blog.
La herramienta está licenciada bajo la licencia MIT. Consulta LICENSE.
Actualmente la herramienta está en la versión v0.1.
El equipo de investigación de RedHunt Labs agradece a Thinkst Canary por el increíble proyecto Canary Token.