11name : Remote System Discovery with Dsquery
22id : 9fb562f4-42f8-4139-8e11-a82edf7ed718
3- version : 6
4- date : ' 2025-05-02 '
3+ version : 7
4+ date : ' 2025-08-27 '
55author : Mauricio Velazco, Splunk
66status : production
7- type : Hunting
8- description : The following analytic detects the execution of `dsquery.exe` with the
9- ` computer` argument, which is used to discover remote systems within a domain. This
10- detection leverages data from Endpoint Detection and Response (EDR) agents, focusing
11- on process names and command-line arguments. Remote system discovery is significant
12- as it indicates potential reconnaissance activities by adversaries or Red Teams
13- to map out network resources and Active Directory structures. If confirmed malicious,
14- this activity could lead to further exploitation, lateral movement, and unauthorized
15- access to critical systems within the network.
7+ type : Anomaly
8+ description : The following analytic detects the execution of `dsquery.exe` with
9+ the `computer` argument, which is used to discover remote systems within a
10+ domain. This detection leverages data from Endpoint Detection and Response
11+ (EDR) agents, focusing on process names and command-line arguments. Remote
12+ system discovery is significant as it indicates potential reconnaissance
13+ activities by adversaries or Red Teams to map out network resources and Active
14+ Directory structures. If confirmed malicious, this activity could lead to
15+ further exploitation, lateral movement, and unauthorized access to critical
16+ systems within the network.
1617data_source :
1718- Sysmon EventID 1
1819- Windows Event Log Security 4688
@@ -26,22 +27,54 @@ search: '| tstats `security_content_summariesonly` count min(_time) as firstTime
2627 Processes.process_id Processes.process_integrity_level Processes.process_name Processes.process_path
2728 Processes.user Processes.user_id Processes.vendor_product | `drop_dm_object_name(Processes)`
2829 | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `remote_system_discovery_with_dsquery_filter`'
29- how_to_implement : The detection is based on data that originates from Endpoint Detection
30- and Response (EDR) agents. These agents are designed to provide security-related
31- telemetry from the endpoints where the agent is installed. To implement this search,
32- you must ingest logs that contain the process GUID, process name, and parent process.
33- Additionally, you must ingest complete command-line executions. These logs must
34- be processed using the appropriate Splunk Technology Add-ons that are specific to
35- the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint`
36- data model. Use the Splunk Common Information Model (CIM) to normalize the field
37- names and speed up the data modeling process.
38- known_false_positives : Administrators or power users may use this command for troubleshooting.
30+ how_to_implement : The detection is based on data that originates from Endpoint
31+ Detection and Response (EDR) agents. These agents are designed to provide
32+ security-related telemetry from the endpoints where the agent is installed. To
33+ implement this search, you must ingest logs that contain the process GUID,
34+ process name, and parent process. Additionally, you must ingest complete
35+ command-line executions. These logs must be processed using the appropriate
36+ Splunk Technology Add-ons that are specific to the EDR product. The logs must
37+ also be mapped to the `Processes` node of the `Endpoint` data model. Use the
38+ Splunk Common Information Model (CIM) to normalize the field names and speed
39+ up the data modeling process.
40+ known_false_positives : Administrators or power users may use this command for
41+ troubleshooting.
3942references :
4043- https://attack.mitre.org/techniques/T1018/
4144- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc732952(v=ws.11)
45+ drilldown_searches :
46+ - name : View the detection results for - "$user$" and "$dest$"
47+ search : ' %original_detection_search% | search user = "$user$" dest = "$dest$"'
48+ earliest_offset : $info_min_time$
49+ latest_offset : $info_max_time$
50+ - name : View risk events for the last 7 days for - "$user$" and "$dest$"
51+ search : ' | from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$",
52+ "$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time)
53+ as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk
54+ Message" values(analyticstories) as "Analytic Stories" values(annotations._all)
55+ as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics"
56+ by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
57+ earliest_offset : $info_min_time$
58+ latest_offset : $info_max_time$
59+ rba :
60+ message : An instance of $parent_process_name$ spawning $process_name$ was identified
61+ on endpoint $dest$ by user $user$.
62+ risk_objects :
63+ - field : user
64+ type : user
65+ score : 3
66+ - field : dest
67+ type : system
68+ score : 3
69+ threat_objects :
70+ - field : parent_process_name
71+ type : parent_process_name
72+ - field : process_name
73+ type : process_name
4274tags :
4375 analytic_story :
4476 - Active Directory Discovery
77+ - LAMEHUG
4578 asset_type : Endpoint
4679 mitre_attack_id :
4780 - T1018
5386tests :
5487- name : True Positive Test
5588 attack_data :
56- - data : https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log
89+ - data :
90+ https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log
5791 source : XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
5892 sourcetype : XmlWinEventLog
0 commit comments