Detection rules › Elastic

Potential WinRAR CVE-2023-38831 Exploitation

Time window
10s
Sequence by
process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Identifies suspicious child processes of the WinRAR process. This may indicate the successful exploitation of the WinRAR vulnerability CVE-2023-38831.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies suspicious child processes of the WinRAR process. This may indicate the successful exploitation of the WinRAR
vulnerability CVE-2023-38831.
"""
id = "1a3b0389-eeb3-46f6-a304-e1983a4dae09"
license = "Elastic License v2"
name = "Potential WinRAR CVE-2023-38831 Exploitation"
os_list = ["windows"]
reference = [
    "https://www.group-ib.com/blog/cve-2023-38831-winrar-zero-day/",
    "https://github.com/b1tg/CVE-2023-38831-winrar-exploit/tree/main",
]
version = "1.0.5"

query = '''
sequence with maxspan=10s
 [file where event.action == "creation" and process.name : "WinRAR.exe" and
  file.path : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*\\*" and
  not file.extension :  ("exe", "cmd", "bat ", "vbs", "js", "scr ", "com", "wsh", "hta", "pif", "cpl")] by process.entity_id as event0
 [file where event.action == "creation" and process.name : "WinRAR.exe" and
  file.path : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*\\*" and
  file.extension :  ("exe", "cmd", "bat ", "vbs", "js", "scr ", "com", "wsh", "hta", "pif", "cpl") and
  startswith~(file.name, concat(event0.file.name, " "))] by process.entity_id
 [process where event.action == "start" and
  process.parent.name : "winrar.exe" and process.args : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*"] by process.parent.entity_id
'''

min_endpoint_version = "8.4.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 2

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"



[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1203"
name = "Exploitation for Client Execution"
reference = "https://attack.mitre.org/techniques/T1203/"


[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[internal]
min_endpoint_version = "8.4.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 10s, correlated by process.entity_id, process.parent.entity_id.

Stage 1: file

[file where event.action == "creation" and process.name : "WinRAR.exe" and
  file.path : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*\\*" and
  not file.extension :  ("exe", "cmd", "bat ", "vbs", "js", "scr ", "com", "wsh", "hta", "pif", "cpl")] by process.entity_id as event0

Stage 2: file

[file where event.action == "creation" and process.name : "WinRAR.exe" and
  file.path : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*\\*" and
  file.extension :  ("exe", "cmd", "bat ", "vbs", "js", "scr ", "com", "wsh", "hta", "pif", "cpl") and
  startswith~(file.name, concat(event0.file.name, " "))] by process.entity_id

Stage 3: process

[process where event.action == "start" and
  process.parent.name : "winrar.exe" and process.args : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*"] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
file.extensioneqexe, cmd, bat , vbs, js, scr , com, wsh, hta, pif, cplexcludes:file.extension

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • creation corpus 58 (elastic 58)
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq
file.extensionwildcard
  • bat
  • cmd corpus 15 (elastic 15)
  • com corpus 16 (elastic 16)
  • cpl corpus 19 (elastic 19)
  • exe corpus 32 (elastic 32)
  • hta corpus 20 (elastic 20)
  • js corpus 23 (elastic 23)
  • pif corpus 18 (elastic 18)
  • scr
  • vbs corpus 19 (elastic 19)
  • wsh corpus 16 (elastic 16)
field:"file.extension" kind:wildcard
file.namestarts_with
  • concat(event0.file.name, " ") (expression)
field:"file.name" kind:starts_with
file.pathwildcard
  • ?:\Users\*\AppData\Local\Temp\Rar$*\*
field:"TargetFilename" kind:wildcard value:"?:\Users\*\AppData\Local\Temp\Rar$*\*"
process.argswildcard
  • ?:\Users\*\AppData\Local\Temp\Rar$* corpus 2 (elastic 2)
field:"process.args" kind:wildcard value:"?:\Users\*\AppData\Local\Temp\Rar$*"
process.namewildcard
  • WinRAR.exe corpus 9 (elastic 9)
field:"process_name" kind:wildcard value:"WinRAR.exe"
process.parent.namewildcard
  • winrar.exe corpus 15 (elastic 14, splunk 1)
field:"parent_process_name" kind:wildcard value:"winrar.exe"