Detect CVE-2025-6218: RARLAB WinRAR Path Traversal Exploitation in Google Chronicle
Detects exploitation of CVE-2025-6218, a path traversal vulnerability in RARLAB WinRAR. Attackers can craft malicious archive files that, when extracted, write files outside the intended extraction directory, enabling arbitrary file placement on the victim system. This vulnerability is actively exploited in the wild (CISA KEV) and can lead to code execution, persistence, or privilege escalation by dropping malicious files to sensitive locations such as startup folders, system directories, or application data paths.
MITRE ATT&CK
- Tactic
- Initial Access Execution Persistence
YARA-L Detection Query
rule cve_2025_6218_winrar_path_traversal {
meta:
author = "df00tech Detection Engineering"
description = "Detects CVE-2025-6218 WinRAR path traversal exploitation via suspicious file creation in sensitive directories"
severity = "CRITICAL"
priority = "HIGH"
events:
$e.metadata.event_type = "FILE_CREATION"
(
re.regex($e.principal.process.file.full_path, `(?i)winrar\.exe$`) or
re.regex($e.principal.process.parent_process.file.full_path, `(?i)winrar\.exe$`)
)
(
re.regex($e.target.file.full_path, `(?i)\\(Startup|System32|SysWOW64|Windows\\Tasks)\\`) or
re.regex($e.target.file.full_path, `\.\.[\\/]`)
)
condition:
$e
} Chronicle YARA-L rule for detecting WinRAR path traversal file creation in sensitive Windows directories consistent with CVE-2025-6218.
Data Sources
Required Tables
False Positives & Tuning
- Scripted deployments that use WinRAR to extract payloads to system paths in controlled environments
- WinRAR plugin or shell extension activity that creates temp files near system directories
- Legitimate archiving of files into directories that have names overlapping with sensitive path keywords
Other platforms for CVE-2025-6218
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1WinRAR Path Traversal to Startup Folder
Expected signal: Sysmon Event ID 11 (FileCreate) with Image=WinRAR.exe and TargetFilename pointing to the Startup folder path
- Test 2WinRAR Extraction with Relative Path Traversal Sequence
Expected signal: Sysmon Event ID 11 with TargetFilename containing path traversal sequence and WinRAR.exe as the initiating process
- Test 3WinRAR Drop Executable to Windows Tasks Directory
Expected signal: Sysmon Event ID 11 (FileCreate) with Image containing WinRAR.exe and TargetFilename matching C:\Windows\Tasks\*
Unlock Pro Content
Get the full detection package for CVE-2025-6218 including response playbook, investigation guide, and atomic red team tests.