Enumerating Domain Trusts via DSQUERY.EXE
Elastic Stack Serverless Security
Identifies the use of dsquery.exe for domain trust discovery purposes. Adversaries may use this command-line utility to enumerate trust relationships that may be used for Lateral Movement opportunities in Windows multi-domain forest environments.
Rule type: eql
Rule indices:
- winlogbeat-*
- logs-endpoint.events.*
- logs-windows.*
- endgame-*
Severity: low
Risk score: 21
Runs every: 5m
Searches indices from: now-9m (https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#date-math[Date Math format], see also Additional look-back time
)
Maximum alerts per execution: 100
References:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc732952(v=ws.11
- https://posts.specterops.io/a-guide-to-attacking-domain-trusts-971e52cb2944
Tags:
- Elastic
- Host
- Windows
- Threat Detection
- Discovery
- Elastic Endgame
Version: 1
Rule authors:
- Elastic
Rule license: Elastic License v2
process where event.type == "start" and
(process.name : "dsquery.exe" or process.pe.original_file_name: "dsquery.exe") and
process.args : "*objectClass=trustedDomain*"
Framework: MITRE ATT&CKTM
Tactic:
- Name: Discovery
- ID: TA0007
- Reference URL: https://attack.mitre.org/tactics/TA0007/
Technique:
- Name: Domain Trust Discovery
- ID: T1482
- Reference URL: https://attack.mitre.org/techniques/T1482/