11name : Executables Or Script Creation In Temp Path
22id : e0422b71-2c05-4f32-8754-01fb415f49c9
3- version : 15
4- date : ' 2025-08-07 '
3+ version : 16
4+ date : ' 2025-09-10 '
55author : Teoderick Contreras, Splunk
66status : production
77type : Anomaly
8- description : The following analytic identifies the creation of executables or scripts
9- in suspicious file paths on Windows systems. It leverages the Endpoint.Filesystem
10- data model to detect files with specific extensions (e.g., .exe, .dll, .ps1) created
11- in uncommon directories (e.g., \windows\fonts\, \users\public\). This activity is
12- significant as adversaries often use these paths to evade detection and maintain
13- persistence. If confirmed malicious, this behavior could allow attackers to execute
14- unauthorized code, escalate privileges, or persist within the environment, posing
15- a significant security threat.
8+ description : The following analytic identifies the creation of executables or
9+ scripts in suspicious file paths on Windows systems. It leverages the
10+ Endpoint.Filesystem data model to detect files with specific extensions (e.g.,
11+ .exe, .dll, .ps1) created in uncommon directories (e.g., \windows\fonts\,
12+ \users\public\). This activity is significant as adversaries often use these
13+ paths to evade detection and maintain persistence. If confirmed malicious,
14+ this behavior could allow attackers to execute unauthorized code, escalate
15+ privileges, or persist within the environment, posing a significant security
16+ threat.
1617data_source :
1718- Sysmon EventID 11
1819search : ' | tstats `security_content_summariesonly` values(Filesystem.file_path) as
1920 file_path count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem
2021 where Filesystem.file_name IN ("*.exe", "*.dll", "*.sys", "*.com", "*.vbs", "*.vbe",
21- "*.js", "*.ps1", "*.bat", "*.cmd", "*.pif", "*.msc") AND Filesystem.file_path IN ("*\\AppData\\Local\\Temp\\*",
22- "*:\\Windows\\Temp\\*", "*:\\Temp*") by Filesystem.action Filesystem.dest Filesystem.file_access_time
23- Filesystem.file_create_time Filesystem.file_hash Filesystem.file_modify_time Filesystem.file_name
24- Filesystem.file_path Filesystem.file_acl Filesystem.file_size Filesystem.process_guid
25- Filesystem.process_id Filesystem.user Filesystem.vendor_product | `drop_dm_object_name(Filesystem)`
26- | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `executables_or_script_creation_in_temp_path_filter`'
27- how_to_implement : To successfully implement this search you need to be ingesting information
28- on process that include the name of the Filesystem responsible for the changes from
29- your endpoints into the `Endpoint` datamodel in the `Filesystem` node.
30- known_false_positives : Administrators may allow creation of script or exe in the paths
31- specified. Filter as needed.
22+ "*.js", "*.ps1", "*.bat", "*.cmd", "*.pif", "*.msc") AND Filesystem.file_path IN
23+ ("*\\AppData\\Local\\Temp\\*", "*:\\Windows\\Temp\\*", "*:\\Temp*") by Filesystem.action
24+ Filesystem.dest Filesystem.file_access_time Filesystem.file_create_time Filesystem.file_hash
25+ Filesystem.file_modify_time Filesystem.file_name Filesystem.file_path Filesystem.file_acl
26+ Filesystem.file_size Filesystem.process_guid Filesystem.process_id Filesystem.user
27+ Filesystem.vendor_product | `drop_dm_object_name(Filesystem)` | `security_content_ctime(firstTime)`
28+ | `security_content_ctime(lastTime)` | `executables_or_script_creation_in_temp_path_filter`'
29+ how_to_implement : To successfully implement this search you need to be ingesting
30+ information on process that include the name of the Filesystem responsible for
31+ the changes from your endpoints into the `Endpoint` datamodel in the
32+ ` Filesystem` node.
33+ known_false_positives : Administrators may allow creation of script or exe in the
34+ paths specified. Filter as needed.
3235references :
3336- https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/
3437- https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/
@@ -49,8 +52,9 @@ drilldown_searches:
4952 earliest_offset : $info_min_time$
5053 latest_offset : $info_max_time$
5154rba :
52- message : Potentially suspicious executable or script with file name $file_name$,
53- $file_path$ and process_id $process_id$ was created in temporary folder by $user$
55+ message : Potentially suspicious executable or script with file name
56+ $file_name$, $file_path$ and process_id $process_id$ was created in
57+ temporary folder by $user$
5458 risk_objects :
5559 - field : user
5660 type : user
@@ -102,6 +106,7 @@ tags:
102106 - Amadey
103107 - IcedID
104108 - Interlock Rat
109+ - PromptLock
105110 asset_type : Endpoint
106111 mitre_attack_id :
107112 - T1036
@@ -113,6 +118,7 @@ tags:
113118tests :
114119- name : True Positive Test
115120 attack_data :
116- - data : https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log
121+ - data :
122+ https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log
117123 source : XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
118124 sourcetype : XmlWinEventLog
0 commit comments