forked from elastic/detection-rules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiscovery_adfind_command_activity.toml
120 lines (101 loc) · 5.55 KB
/
discovery_adfind_command_activity.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[metadata]
creation_date = "2020/10/19"
maturity = "production"
updated_date = "2021/09/23"
[rule]
author = ["Elastic"]
description = """
This rule detects the Active Directory query tool, AdFind.exe. AdFind has legitimate purposes, but it is frequently
leveraged by threat actors to perform post-exploitation Active Directory reconnaissance. The AdFind tool has been
observed in Trickbot, Ryuk, Maze, and FIN6 campaigns. For Winlogbeat, this rule requires Sysmon.
"""
from = "now-9m"
index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*"]
language = "eql"
license = "Elastic License v2"
name = "AdFind Command Activity"
note = """## Triage and analysis
### Investigating AdFind Command Activity
[AdFind](http://www.joeware.net/freetools/tools/adfind/) is a freely available command-line tool used to retrieve information from
Activity Directory (AD). Network discovery and enumeration tools like `AdFind` are useful to adversaries in the same ways
they are effective for network administrators. This tool provides quick ability to scope AD person/computer objects and
understand subnets and domain information. There are many [examples](https://thedfirreport.com/category/adfind/)
observed where this tool has been adopted by ransomware and criminal groups and used in compromises.
#### Possible investigation steps:
- `AdFind` is a legitimate Active Directory enumeration tool used by network administrators, it's important to understand
the source of the activity. This could involve identifying the account using `AdFind` and determining based on the command-lines
what information was retrieved, then further determining if these actions are in scope of that user's traditional responsibilities.
- In multiple public references, `AdFind` is leveraged after initial access is achieved, review previous activity on impacted
machine looking for suspicious indicators such as previous anti-virus/EDR alerts, phishing emails received, or network traffic
to suspicious infrastructure
### False Positive Analysis
- This rule has the high chance to produce false positives as it is a legitimate tool used by network administrators. One
option could be whitelisting specific users or groups who use the tool as part of their daily responsibilities. This can
be done by leveraging the exception workflow in the Kibana Security App or Elasticsearch API to tune this rule to your environment
- Malicious behavior with `AdFind` should be investigated as part of a step within an attack chain. It doesn't happen in
isolation, so reviewing previous logs/activity from impacted machines could be very telling.
### Related Rules
- Windows Network Enumeration
- Enumeration of Administrator Accounts
- Enumeration Command Spawned via WMIPrvSE
### Response and Remediation
- Immediate response should be taken to validate activity, investigate and potentially isolate activity to prevent further
post-compromise behavior
- It's important to understand that `AdFind` is an Active Directory enumeration tool and can be used for malicious or legitimate
purposes, so understanding the intent behind the activity will help determine the appropropriate response.
"""
references = [
"http://www.joeware.net/freetools/tools/adfind/",
"https://thedfirreport.com/2020/05/08/adfind-recon/",
"https://www.fireeye.com/blog/threat-research/2020/05/tactics-techniques-procedures-associated-with-maze-ransomware-incidents.html",
"https://www.cybereason.com/blog/dropping-anchor-from-a-trickbot-infection-to-the-discovery-of-the-anchor-malware",
"https://www.fireeye.com/blog/threat-research/2019/04/pick-six-intercepting-a-fin6-intrusion.html",
"https://usa.visa.com/dam/VCOM/global/support-legal/documents/fin6-cybercrime-group-expands-threat-To-ecommerce-merchants.pdf",
]
risk_score = 21
rule_id = "eda499b8-a073-4e35-9733-22ec71f57f3a"
severity = "low"
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Discovery"]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where event.type in ("start", "process_started") and
(process.name : "AdFind.exe" or process.pe.original_file_name == "AdFind.exe") and
process.args : ("objectcategory=computer", "(objectcategory=computer)",
"objectcategory=person", "(objectcategory=person)",
"objectcategory=subnet", "(objectcategory=subnet)",
"objectcategory=group", "(objectcategory=group)",
"objectcategory=organizationalunit", "(objectcategory=organizationalunit)",
"objectcategory=attributeschema", "(objectcategory=attributeschema)",
"domainlist", "dcmodes", "adinfo", "dclist", "computers_pwnotreqd", "trustdmp")
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1069"
name = "Permission Groups Discovery"
reference = "https://attack.mitre.org/techniques/T1069/"
[[rule.threat.technique.subtechnique]]
id = "T1069.002"
name = "Domain Groups"
reference = "https://attack.mitre.org/techniques/T1069/002/"
[[rule.threat.technique]]
id = "T1087"
name = "Account Discovery"
reference = "https://attack.mitre.org/techniques/T1087/"
[[rule.threat.technique.subtechnique]]
id = "T1087.002"
name = "Domain Account"
reference = "https://attack.mitre.org/techniques/T1087/002/"
[[rule.threat.technique]]
id = "T1482"
name = "Domain Trust Discovery"
reference = "https://attack.mitre.org/techniques/T1482/"
[[rule.threat.technique]]
id = "T1018"
name = "Remote System Discovery"
reference = "https://attack.mitre.org/techniques/T1018/"
[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"