1
1
name : Remote System Discovery with Dsquery
2
2
id : 9fb562f4-42f8-4139-8e11-a82edf7ed718
3
- version : 6
4
- date : ' 2025-05-02 '
3
+ version : 7
4
+ date : ' 2025-08-27 '
5
5
author : Mauricio Velazco, Splunk
6
6
status : 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.
16
17
data_source :
17
18
- Sysmon EventID 1
18
19
- Windows Event Log Security 4688
@@ -26,22 +27,54 @@ search: '| tstats `security_content_summariesonly` count min(_time) as firstTime
26
27
Processes.process_id Processes.process_integrity_level Processes.process_name Processes.process_path
27
28
Processes.user Processes.user_id Processes.vendor_product | `drop_dm_object_name(Processes)`
28
29
| `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.
39
42
references :
40
43
- https://attack.mitre.org/techniques/T1018/
41
44
- 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
42
74
tags :
43
75
analytic_story :
44
76
- Active Directory Discovery
77
+ - LAMEHUG
45
78
asset_type : Endpoint
46
79
mitre_attack_id :
47
80
- T1018
53
86
tests :
54
87
- name : True Positive Test
55
88
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
57
91
source : XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
58
92
sourcetype : XmlWinEventLog
0 commit comments