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"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Windows Component Object Model (COM) is an inter-process communication (IPC) component of the native Windows application
11programming interface (API) that enables interaction between software objects or executable code. Xwizard can be used to
12run a COM object created in registry to evade defensive counter measures.
13"""
14from = "now-9m"
15index = [
16    "winlogbeat-*",
17    "logs-endpoint.events.process-*",
18    "logs-windows.*",
19    "endgame-*",
20    "logs-system.security*",
21]
22language = "eql"
23license = "Elastic License v2"
24name = "Execution of COM object via Xwizard"
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"
31setup = """## Setup
32
33If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
34events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
35Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
36`event.ingested` to @timestamp.
37For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
38"""
39severity = "medium"
40tags = [
41    "Domain: Endpoint",
42    "OS: Windows",
43    "Use Case: Threat Detection",
44    "Tactic: Execution",
45    "Data Source: Elastic Endgame",
46    "Data Source: Elastic Defend",
47]
48timestamp_override = "event.ingested"
49type = "eql"
50
51query = '''
52process where host.os.type == "windows" and event.type == "start" and
53 (process.name : "xwizard.exe" or ?process.pe.original_file_name : "xwizard.exe") and
54 (
55   (process.args : "RunWizard" and process.args : "{*}") or
56   (process.executable != null and
57     not process.executable : ("C:\\Windows\\SysWOW64\\xwizard.exe", "C:\\Windows\\System32\\xwizard.exe")
58   )
59 )
60'''
61
62
63[[rule.threat]]
64framework = "MITRE ATT&CK"
65[[rule.threat.technique]]
66id = "T1559"
67name = "Inter-Process Communication"
68reference = "https://attack.mitre.org/techniques/T1559/"
69[[rule.threat.technique.subtechnique]]
70id = "T1559.001"
71name = "Component Object Model"
72reference = "https://attack.mitre.org/techniques/T1559/001/"
73
74
75
76[rule.threat.tactic]
77id = "TA0002"
78name = "Execution"
79reference = "https://attack.mitre.org/tactics/TA0002/"

References

Related rules

to-top