Execution of COM object via Xwizard
Windows Component Object Model (COM) is an inter-process communication (IPC) component of the native Windows application programming interface (API) that enables interaction between software objects or executable code. Xwizard can be used to run a COM object created in registry to evade defensive counter measures.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/01/20"
3integration = ["endpoint", "windows"]
4maturity = "production"
5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
6min_stack_version = "8.3.0"
7updated_date = "2023/02/22"
8
9[rule]
10author = ["Elastic"]
11description = """
12Windows Component Object Model (COM) is an inter-process communication (IPC) component of the native Windows application
13programming interface (API) that enables interaction between software objects or executable code. Xwizard can be used to
14run a COM object created in registry to evade defensive counter measures.
15"""
16from = "now-9m"
17index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*", "endgame-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Execution of COM object via Xwizard"
21note = """## Setup
22
23If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
24"""
25references = [
26 "https://lolbas-project.github.io/lolbas/Binaries/Xwizard/",
27 "http://www.hexacorn.com/blog/2017/07/31/the-wizard-of-x-oppa-plugx-style/",
28]
29risk_score = 47
30rule_id = "1a6075b0-7479-450e-8fe7-b8b8438ac570"
31severity = "medium"
32tags = ["Elastic", "Host", "Windows", "Threat Detection", "Execution", "Elastic Endgame"]
33timestamp_override = "event.ingested"
34type = "eql"
35
36query = '''
37process where host.os.type == "windows" and event.type == "start" and
38 process.pe.original_file_name : "xwizard.exe" and
39 (
40 (process.args : "RunWizard" and process.args : "{*}") or
41 (process.executable != null and
42 not process.executable : ("C:\\Windows\\SysWOW64\\xwizard.exe", "C:\\Windows\\System32\\xwizard.exe")
43 )
44 )
45'''
46
47
48[[rule.threat]]
49framework = "MITRE ATT&CK"
50[[rule.threat.technique]]
51id = "T1559"
52name = "Inter-Process Communication"
53reference = "https://attack.mitre.org/techniques/T1559/"
54[[rule.threat.technique.subtechnique]]
55id = "T1559.001"
56name = "Component Object Model"
57reference = "https://attack.mitre.org/techniques/T1559/001/"
58
59
60
61[rule.threat.tactic]
62id = "TA0002"
63name = "Execution"
64reference = "https://attack.mitre.org/tactics/TA0002/"
Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested
and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested
to @timestamp for this rule to work.