-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Rule] Active Directory Forced Authentication from Linux Host #3912
base: main
Are you sure you want to change the base?
Changes from all commits
4b0453e
62464ad
56cbf83
dbf8fea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,65 @@ | ||||||||||||||||||||||||||||||
[metadata] | ||||||||||||||||||||||||||||||
creation_date = "2024/07/22" | ||||||||||||||||||||||||||||||
integration = ["endpoint", "system"] | ||||||||||||||||||||||||||||||
maturity = "production" | ||||||||||||||||||||||||||||||
updated_date = "2024/07/22" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
[rule] | ||||||||||||||||||||||||||||||
author = ["Elastic"] | ||||||||||||||||||||||||||||||
description = """ | ||||||||||||||||||||||||||||||
Identifies a potential forced authentication. Attackers may attempt to force targets to authenticate to a Linux machine | ||||||||||||||||||||||||||||||
controlled by them to capture hashes or enable relay attacks. | ||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
from = "now-9m" | ||||||||||||||||||||||||||||||
index = ["logs-endpoint.events.network-*", "logs-system.security-*"] | ||||||||||||||||||||||||||||||
language = "eql" | ||||||||||||||||||||||||||||||
license = "Elastic License v2" | ||||||||||||||||||||||||||||||
name = "Active Directory Forced Authentication from Linux Host" | ||||||||||||||||||||||||||||||
references = [ | ||||||||||||||||||||||||||||||
"https://www.thehacker.recipes/a-d/movement/mitm-and-coerced-authentications/ms-efsr", | ||||||||||||||||||||||||||||||
"https://www.thehacker.recipes/a-d/movement/mitm-and-coerced-authentications/ms-rprn", | ||||||||||||||||||||||||||||||
"https://www.thehacker.recipes/a-d/movement/mitm-and-coerced-authentications/ms-dfsnm", | ||||||||||||||||||||||||||||||
Comment on lines
+19
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tested with: petitpotam -> MS-EFSR |
||||||||||||||||||||||||||||||
"https://attack.mitre.org/techniques/T1187/", | ||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||
risk_score = 47 | ||||||||||||||||||||||||||||||
rule_id = "c24e9a43-f67e-431d-991b-09cdb83b3c0c" | ||||||||||||||||||||||||||||||
setup = """## Setup | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
This rule uses Elastic Endpoint network events from Linux hosts and system integration events from Domain controllers | ||||||||||||||||||||||||||||||
for correlation. Both data should be collected from the hosts for this detection to work. | ||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||
severity = "medium" | ||||||||||||||||||||||||||||||
tags = [ | ||||||||||||||||||||||||||||||
"Domain: Endpoint", | ||||||||||||||||||||||||||||||
"OS: Windows", | ||||||||||||||||||||||||||||||
"OS: Linux", | ||||||||||||||||||||||||||||||
"Use Case: Threat Detection", | ||||||||||||||||||||||||||||||
"Tactic: Credential Access", | ||||||||||||||||||||||||||||||
"Data Source: Elastic Defend", | ||||||||||||||||||||||||||||||
"Data Source: Active Directory", | ||||||||||||||||||||||||||||||
"Use Case: Active Directory Monitoring", | ||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||
timestamp_override = "event.ingested" | ||||||||||||||||||||||||||||||
type = "eql" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
query = ''' | ||||||||||||||||||||||||||||||
sequence with maxspan=15s | ||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Works with |
||||||||||||||||||||||||||||||
[network where host.os.type == "linux" and event.action == "connection_attempted" and destination.port == 445] by host.ip | ||||||||||||||||||||||||||||||
[authentication where host.os.type == "windows" and event.action == "logged-in" and | ||||||||||||||||||||||||||||||
winlog.event_data.AuthenticationPackageName : "NTLM" and winlog.event_data.SubjectUserSid == "S-1-0-0"] by source.ip | ||||||||||||||||||||||||||||||
Comment on lines
+48
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe you want to limit to host.name containing
Comment on lines
+47
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You may want to limit to private IPs and exclude loopback. |
||||||||||||||||||||||||||||||
''' | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
[[rule.threat]] | ||||||||||||||||||||||||||||||
framework = "MITRE ATT&CK" | ||||||||||||||||||||||||||||||
[[rule.threat.technique]] | ||||||||||||||||||||||||||||||
Comment on lines
+53
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May want to add https://attack.mitre.org/techniques/T1557/ |
||||||||||||||||||||||||||||||
id = "T1187" | ||||||||||||||||||||||||||||||
name = "Forced Authentication" | ||||||||||||||||||||||||||||||
reference = "https://attack.mitre.org/techniques/T1187/" | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
[rule.threat.tactic] | ||||||||||||||||||||||||||||||
id = "TA0006" | ||||||||||||||||||||||||||||||
name = "Credential Access" | ||||||||||||||||||||||||||||||
reference = "https://attack.mitre.org/tactics/TA0006/" | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this explains better what it tries to detect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forced auth means we have evidence that the DC is connecting back to the linux box, so maybe inverting the sequence (auth from window followed by incoming netcon to linux) ?