Skip to content

Commit 64a5506

Browse files
Update latest docs
1 parent 51028b3 commit 64a5506

File tree

152 files changed

+4288
-386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+4288
-386
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
[[prebuilt-rule-8-12-25-active-directory-forced-authentication-from-linux-host-smb-named-pipes]]
2+
=== Active Directory Forced Authentication from Linux Host - SMB Named Pipes
3+
4+
Identifies a potential forced authentication using related SMB named pipes. Attackers may attempt to force targets to authenticate to a host controlled by them to capture hashes or enable relay attacks.
5+
6+
*Rule type*: eql
7+
8+
*Rule indices*:
9+
10+
* logs-endpoint.events.network-*
11+
* logs-system.security-*
12+
* winlogbeat-*
13+
14+
*Severity*: medium
15+
16+
*Risk score*: 47
17+
18+
*Runs every*: 5m
19+
20+
*Searches indices from*: now-9m ({ref}/common-options.html#date-math[Date Math format], see also <<rule-schedule, `Additional look-back time`>>)
21+
22+
*Maximum alerts per execution*: 100
23+
24+
*References*:
25+
26+
* https://github.com/p0dalirius/windows-coerced-authentication-methods
27+
* https://www.thehacker.recipes/a-d/movement/mitm-and-coerced-authentications
28+
* https://attack.mitre.org/techniques/T1187/
29+
30+
*Tags*:
31+
32+
* Domain: Endpoint
33+
* OS: Windows
34+
* OS: Linux
35+
* Use Case: Threat Detection
36+
* Tactic: Credential Access
37+
* Data Source: Elastic Defend
38+
* Data Source: Active Directory
39+
* Use Case: Active Directory Monitoring
40+
* Data Source: System
41+
42+
*Version*: 3
43+
44+
*Rule authors*:
45+
46+
* Elastic
47+
48+
*Rule license*: Elastic License v2
49+
50+
51+
==== Setup
52+
53+
54+
55+
*Setup*
56+
57+
58+
This rule uses Elastic Endpoint network events from Linux hosts and system integration events from Domain controllers
59+
for correlation. Both data sources should be collected from the hosts for this detection to work.
60+
61+
The 'Audit Detailed File Share' audit policy must be configured (Success Failure).
62+
Steps to implement the logging policy with Advanced Audit Configuration:
63+
```
64+
Computer Configuration >
65+
Policies >
66+
Windows Settings >
67+
Security Settings >
68+
Advanced Audit Policies Configuration >
69+
Audit Policies >
70+
Object Access >
71+
Audit Detailed File Share (Success,Failure)
72+
```
73+
74+
75+
==== Rule query
76+
77+
78+
[source, js]
79+
----------------------------------
80+
sequence with maxspan=15s
81+
[network where host.os.type == "linux" and event.action == "connection_attempted" and destination.port == 445 and not startswith~(string(destination.ip), string(host.ip))] by host.ip, data_stream.namespace
82+
[file where host.os.type == "windows" and event.code == "5145" and file.name : ("Spoolss", "netdfs", "lsarpc", "lsass", "netlogon", "samr", "efsrpc", "FssagentRpc")] by source.ip, data_stream.namespace
83+
84+
----------------------------------
85+
86+
*Framework*: MITRE ATT&CK^TM^
87+
88+
* Tactic:
89+
** Name: Credential Access
90+
** ID: TA0006
91+
** Reference URL: https://attack.mitre.org/tactics/TA0006/
92+
* Technique:
93+
** Name: Forced Authentication
94+
** ID: T1187
95+
** Reference URL: https://attack.mitre.org/techniques/T1187/
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
[[prebuilt-rule-8-12-25-enumerating-domain-trusts-via-nltest-exe]]
2+
=== Enumerating Domain Trusts via NLTEST.EXE
3+
4+
Identifies the use of nltest.exe for domain trust discovery purposes. Adversaries may use this command-line utility to enumerate domain trusts and gain insight into trust relationships, as well as the state of Domain Controller (DC) replication in a Microsoft Windows NT Domain.
5+
6+
*Rule type*: eql
7+
8+
*Rule indices*:
9+
10+
* winlogbeat-*
11+
* logs-endpoint.events.process-*
12+
* logs-windows.forwarded*
13+
* logs-windows.sysmon_operational-*
14+
* endgame-*
15+
* logs-system.security*
16+
* logs-m365_defender.event-*
17+
18+
*Severity*: low
19+
20+
*Risk score*: 21
21+
22+
*Runs every*: 5m
23+
24+
*Searches indices from*: now-9m ({ref}/common-options.html#date-math[Date Math format], see also <<rule-schedule, `Additional look-back time`>>)
25+
26+
*Maximum alerts per execution*: 100
27+
28+
*References*:
29+
30+
* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc731935(v=ws.11)
31+
* https://redcanary.com/blog/how-one-hospital-thwarted-a-ryuk-ransomware-outbreak/
32+
33+
*Tags*:
34+
35+
* Domain: Endpoint
36+
* OS: Windows
37+
* Use Case: Threat Detection
38+
* Tactic: Discovery
39+
* Data Source: Elastic Endgame
40+
* Resources: Investigation Guide
41+
* Data Source: Elastic Defend
42+
* Data Source: System
43+
* Data Source: Microsoft Defender for Endpoint
44+
* Data Source: Sysmon
45+
46+
*Version*: 113
47+
48+
*Rule authors*:
49+
50+
* Elastic
51+
52+
*Rule license*: Elastic License v2
53+
54+
55+
==== Investigation guide
56+
57+
58+
59+
*Triage and analysis*
60+
61+
62+
63+
*Investigating Enumerating Domain Trusts via NLTEST.EXE*
64+
65+
66+
Active Directory (AD) domain trusts define relationships between domains within a Windows AD environment. In this setup, a "trusting" domain permits users from a "trusted" domain to access resources. These trust relationships can be configurable as one-way, two-way, transitive, or non-transitive, enabling controlled access and resource sharing across domains.
67+
68+
This rule identifies the usage of the `nltest.exe` utility to enumerate domain trusts. Attackers can use this information to enable the next actions in a target environment, such as lateral movement.
69+
70+
71+
*Possible investigation steps*
72+
73+
74+
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
75+
- Identify the user account that performed the action and whether it should perform this kind of action.
76+
- Investigate other alerts associated with the user/host during the past 48 hours.
77+
78+
79+
*False positive analysis*
80+
81+
82+
- Discovery activities are not inherently malicious if they occur in isolation and are done within the user business context (e.g., an administrator in this context). As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.
83+
84+
85+
*Related rules*
86+
87+
88+
- Enumerating Domain Trusts via DSQUERY.EXE - 06a7a03c-c735-47a6-a313-51c354aef6c3
89+
90+
91+
*Response and remediation*
92+
93+
94+
- Initiate the incident response process based on the outcome of the triage.
95+
- Isolate the involved hosts to prevent further post-compromise behavior.
96+
- Restrict PowerShell usage outside of IT and engineering business units using GPOs, AppLocker, Intune, or similar software.
97+
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
98+
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
99+
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
100+
101+
102+
==== Rule query
103+
104+
105+
[source, js]
106+
----------------------------------
107+
process where host.os.type == "windows" and event.type == "start" and
108+
process.name : "nltest.exe" and process.args : (
109+
"/DCLIST:*", "/DCNAME:*", "/DSGET*",
110+
"/LSAQUERYFTI:*", "/PARENTDOMAIN",
111+
"/DOMAIN_TRUSTS", "/BDC_QUERY:*"
112+
) and
113+
not process.parent.name : "PDQInventoryScanner.exe" and
114+
not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20")
115+
116+
----------------------------------
117+
118+
*Framework*: MITRE ATT&CK^TM^
119+
120+
* Tactic:
121+
** Name: Discovery
122+
** ID: TA0007
123+
** Reference URL: https://attack.mitre.org/tactics/TA0007/
124+
* Technique:
125+
** Name: Remote System Discovery
126+
** ID: T1018
127+
** Reference URL: https://attack.mitre.org/techniques/T1018/
128+
* Technique:
129+
** Name: Domain Trust Discovery
130+
** ID: T1482
131+
** Reference URL: https://attack.mitre.org/techniques/T1482/
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
[[prebuilt-rule-8-12-25-enumeration-of-administrator-accounts]]
2+
=== Enumeration of Administrator Accounts
3+
4+
Identifies instances of lower privilege accounts enumerating Administrator accounts or groups using built-in Windows tools.
5+
6+
*Rule type*: eql
7+
8+
*Rule indices*:
9+
10+
* logs-endpoint.events.process-*
11+
* winlogbeat-*
12+
* logs-windows.forwarded*
13+
* endgame-*
14+
* logs-system.security*
15+
* logs-m365_defender.event-*
16+
17+
*Severity*: low
18+
19+
*Risk score*: 21
20+
21+
*Runs every*: 5m
22+
23+
*Searches indices from*: now-9m ({ref}/common-options.html#date-math[Date Math format], see also <<rule-schedule, `Additional look-back time`>>)
24+
25+
*Maximum alerts per execution*: 100
26+
27+
*References*: None
28+
29+
*Tags*:
30+
31+
* Domain: Endpoint
32+
* OS: Windows
33+
* Use Case: Threat Detection
34+
* Tactic: Discovery
35+
* Resources: Investigation Guide
36+
* Data Source: Elastic Endgame
37+
* Data Source: Elastic Defend
38+
* Data Source: System
39+
* Data Source: Microsoft Defender for Endpoint
40+
41+
*Version*: 114
42+
43+
*Rule authors*:
44+
45+
* Elastic
46+
47+
*Rule license*: Elastic License v2
48+
49+
50+
==== Investigation guide
51+
52+
53+
54+
*Triage and analysis*
55+
56+
57+
58+
*Investigating Enumeration of Administrator Accounts*
59+
60+
61+
After successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.
62+
63+
This rule looks for the execution of the `net` and `wmic` utilities to enumerate administrator-related users or groups in the domain and local machine scope. Attackers can use this information to plan their next steps of the attack, such as mapping targets for credential compromise and other post-exploitation activities.
64+
65+
66+
*Possible investigation steps*
67+
68+
69+
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
70+
- Identify the user account that performed the action and whether it should perform this kind of action.
71+
- Investigate other alerts associated with the user/host during the past 48 hours.
72+
- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.
73+
74+
75+
*False positive analysis*
76+
77+
78+
- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.
79+
80+
81+
*Related rules*
82+
83+
84+
- AdFind Command Activity - eda499b8-a073-4e35-9733-22ec71f57f3a
85+
86+
87+
*Response and remediation*
88+
89+
90+
- Initiate the incident response process based on the outcome of the triage.
91+
- Isolate the involved hosts to prevent further post-compromise behavior.
92+
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
93+
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
94+
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
95+
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
96+
97+
98+
==== Rule query
99+
100+
101+
[source, js]
102+
----------------------------------
103+
process where host.os.type == "windows" and event.type == "start" and
104+
(
105+
(
106+
(
107+
(process.name : "net.exe" or ?process.pe.original_file_name == "net.exe") or
108+
((process.name : "net1.exe" or ?process.pe.original_file_name == "net1.exe") and not process.parent.name : "net.exe")
109+
) and
110+
process.args : ("group", "user", "localgroup") and
111+
process.args : ("*admin*", "Domain Admins", "Remote Desktop Users", "Enterprise Admins", "Organization Management")
112+
and not process.args : ("/add", "/delete")
113+
) or
114+
(
115+
(process.name : "wmic.exe" or ?process.pe.original_file_name == "wmic.exe") and
116+
process.args : ("group", "useraccount")
117+
)
118+
) and not user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20")
119+
120+
----------------------------------
121+
122+
*Framework*: MITRE ATT&CK^TM^
123+
124+
* Tactic:
125+
** Name: Discovery
126+
** ID: TA0007
127+
** Reference URL: https://attack.mitre.org/tactics/TA0007/
128+
* Technique:
129+
** Name: Permission Groups Discovery
130+
** ID: T1069
131+
** Reference URL: https://attack.mitre.org/techniques/T1069/
132+
* Sub-technique:
133+
** Name: Local Groups
134+
** ID: T1069.001
135+
** Reference URL: https://attack.mitre.org/techniques/T1069/001/
136+
* Sub-technique:
137+
** Name: Domain Groups
138+
** ID: T1069.002
139+
** Reference URL: https://attack.mitre.org/techniques/T1069/002/
140+
* Technique:
141+
** Name: Account Discovery
142+
** ID: T1087
143+
** Reference URL: https://attack.mitre.org/techniques/T1087/
144+
* Sub-technique:
145+
** Name: Local Account
146+
** ID: T1087.001
147+
** Reference URL: https://attack.mitre.org/techniques/T1087/001/
148+
* Sub-technique:
149+
** Name: Domain Account
150+
** ID: T1087.002
151+
** Reference URL: https://attack.mitre.org/techniques/T1087/002/

0 commit comments

Comments
 (0)