DSQuery Domain Discovery
The following analytic detects the execution of "dsquery.exe" with arguments targeting `TrustedDomain` queries directly from the command line. This behavior is identified using Endpoint Detection and Response (EDR)…
Description
The following analytic detects the execution of "dsquery.exe" with arguments targeting `TrustedDomain` queries directly from the command line. This behavior is identified using Endpoint Detection and Response (EDR) telemetry, focusing on process names and command-line arguments. This activity is significant as it often indicates domain trust discovery, a common step in lateral movement or privilege escalation by adversaries. If confirmed malicious, this could allow attackers to map domain trusts, potentially leading to further exploitation and unauthorized access to trusted domains.
Detection logic
Detection requirements
- Platform
- Windows
The rule states no platform. This is derived from the ATT&CK technique it maps to.
- Log source category
- crowdstrike_processrollup2sysmon_eventid_1windows_event_log_security_4688
Known benign triggers
- Limited false positives. If there is a true false positive, filter based on command-line or parent process.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| blog.harmj0y.net/redteaming/a-guide-to-attacking-domain-trusts/ | 3 |
| docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc732952(v=ws.11) | Only this detection cites it |
| docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc754232(v=ws.11) | Only this detection cites it |
| github.com/redcanaryco/atomic-red-team/blob/388942adbd9641f4dfdcf079d7efe9a75ec0ac43/atomics/T1482/T1482.yaml#L5 | 4 |
| github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1482/T1482.md | 2 |
From the source
- At source
- Open at source
- Upstream identifier
- cc316032-924a-11eb-91a2-acde48001122
- Tagged by the source as
- Active Directory DiscoveryCompromised Windows HostDomain Trust DiscoveryEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Oct 13, 2026
- Version
- 2