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 = "2024/03/28"
 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.process-*", "logs-windows.*", "endgame-*", "logs-system.security*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Execution of COM object via Xwizard"
21references = [
22    "https://lolbas-project.github.io/lolbas/Binaries/Xwizard/",
23    "http://www.hexacorn.com/blog/2017/07/31/the-wizard-of-x-oppa-plugx-style/",
24]
25risk_score = 47
26rule_id = "1a6075b0-7479-450e-8fe7-b8b8438ac570"
27setup = """## Setup
28
29If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
30events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
31Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
32`event.ingested` to @timestamp.
33For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
34"""
35severity = "medium"
36tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Execution", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
37timestamp_override = "event.ingested"
38type = "eql"
39
40query = '''
41process where host.os.type == "windows" and event.type == "start" and
42 (process.name : "xwizard.exe" or ?process.pe.original_file_name : "xwizard.exe") and
43 (
44   (process.args : "RunWizard" and process.args : "{*}") or
45   (process.executable != null and
46     not process.executable : ("C:\\Windows\\SysWOW64\\xwizard.exe", "C:\\Windows\\System32\\xwizard.exe")
47   )
48 )
49'''
50
51
52[[rule.threat]]
53framework = "MITRE ATT&CK"
54[[rule.threat.technique]]
55id = "T1559"
56name = "Inter-Process Communication"
57reference = "https://attack.mitre.org/techniques/T1559/"
58[[rule.threat.technique.subtechnique]]
59id = "T1559.001"
60name = "Component Object Model"
61reference = "https://attack.mitre.org/techniques/T1559/001/"
62
63
64
65[rule.threat.tactic]
66id = "TA0002"
67name = "Execution"
68reference = "https://attack.mitre.org/tactics/TA0002/"

References

Related rules

to-top