Detection rules › Elastic

Potential Execution via WinRAR Exploitation

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 = "1eb1c26f-c360-4fd5-a549-6149e16d8e96"
license = "Elastic License v2"
name = "Potential Execution via WinRAR 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 = '''
process where event.action == "start" and
(
 (process.parent.name : "WinRAR.exe" and
  process.args : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*" and
  (process.args : ("* .exe", "* .cmd", "* .bat", "* .vbs", "* .js", "* .scr", "* .com", "* .wsh", "* .hta", "* .pif", "* .cpl") or
   process.args : (".exe ", ".cmd ", ".bat ", ".vbs ", ".js ", ".scr ", ".com ", ".wsh ", ".hta ", ".pif ", ".cpl"))) or

  descendant of [process where event.action == "start" and process.parent.name : "WinRAR.exe" and
                  process.args : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*" and
                  (process.args : ("* .exe", "* .cmd", "* .bat", "* .vbs", "* .js", "* .scr", "* .com", "* .wsh", "* .hta", "* .pif", "* .cpl") or
                   process.args : (".exe ", ".cmd ", ".bat ", ".vbs ", ".js ", ".scr ", ".com ", ".wsh ", ".hta ", ".pif ", ".cpl "))]
 ) and
 not (process.executable : "?:\\Program Files*\\Microsoft\\Edge\\Application\\*.exe" and
      process.parent.executable : "?:\\Program Files*\\Microsoft\\Edge\\Application\\msedge.exe") and
 not (process.executable : "?:\\Windows\\System32\\conhost.exe" and process.args : "0xffffffff")
'''

min_endpoint_version = "7.16.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[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 = "7.16.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
(
 (process.parent.name : "WinRAR.exe" and
  process.args : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*" and
  (process.args : ("* .exe", "* .cmd", "* .bat", "* .vbs", "* .js", "* .scr", "* .com", "* .wsh", "* .hta", "* .pif", "* .cpl") or
   process.args : (".exe ", ".cmd ", ".bat ", ".vbs ", ".js ", ".scr ", ".com ", ".wsh ", ".hta ", ".pif ", ".cpl"))) or

  descendant of [process where event.action == "start" and process.parent.name : "WinRAR.exe" and
                  process.args : "?:\\Users\\*\\AppData\\Local\\Temp\\Rar$*" and
                  (process.args : ("* .exe", "* .cmd", "* .bat", "* .vbs", "* .js", "* .scr", "* .com", "* .wsh", "* .hta", "* .pif", "* .cpl") or
                   process.args : (".exe ", ".cmd ", ".bat ", ".vbs ", ".js ", ".scr ", ".com ", ".wsh ", ".hta ", ".pif ", ".cpl "))]
 ) and
 not (process.executable : "?:\\Program Files*\\Microsoft\\Edge\\Application\\*.exe" and
      process.parent.executable : "?:\\Program Files*\\Microsoft\\Edge\\Application\\msedge.exe") and
 not (process.executable : "?:\\Windows\\System32\\conhost.exe" and process.args : "0xffffffff")

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argseq0xffffffffexcludes:process.args field:"process.args" value:"0xffffffff"
process.executableeq?:\Windows\System32\conhost.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\System32\conhost.exe"
process.executablewildcard?:\Program Files*\Microsoft\Edge\Application\*.exeexcludes:process.executable field:"process.executable" value:"?:\Program Files*\Microsoft\Edge\Application\*.exe"
process.parent.executablewildcard?:\Program Files*\Microsoft\Edge\Application\msedge.exeexcludes:process.parent.executable field:"process.parent.executable" value:"?:\Program Files*\Microsoft\Edge\Application\msedge.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.argswildcard
  • * .bat
  • * .cmd
  • * .com
  • * .cpl
  • * .exe
  • * .hta
  • * .js
  • * .pif
  • * .scr
  • * .vbs
  • * .wsh
  • .bat
  • .cmd
  • .com
  • .cpl
  • .exe
  • .hta
  • .js
  • .pif
  • .scr
  • .vbs
  • .wsh
  • ?:\Users\*\AppData\Local\Temp\Rar$* corpus 2 (elastic 2)
field:"process.args" kind:wildcard
process.parent.namewildcard
  • WinRAR.exe corpus 15 (elastic 14, splunk 1)
field:"parent_process_name" kind:wildcard value:"WinRAR.exe"