Name:Windows Service Created with Suspicious Service Path id:429141be-8311-11eb-adb6-acde48001122 version:7 date:2024-09-30 author:Teoderick Contreras, Mauricio Velazco, Splunk status:production type:TTP Description:The following analytic detects the creation of a Windows Service with a binary path located in uncommon directories, using Windows Event ID 7045. It leverages logs from the `wineventlog_system` to identify services installed outside typical system directories. This activity is significant as adversaries, including those deploying Clop ransomware, often create malicious services for lateral movement, remote code execution, persistence, and execution. If confirmed malicious, this could allow attackers to maintain persistence, execute arbitrary code, and potentially escalate privileges, posing a severe threat to the environment. Data_source:
-Windows Event Log System 7045
search:`wineventlog_system` EventCode=7045 ImagePath = "*.exe" NOT (ImagePath IN ("*:\\Windows\\*", "*:\\Program File*", "*:\\Programdata\\*", "*%systemroot%\\*")) | stats count min(_time) as firstTime max(_time) as lastTime by EventCode ImagePath ServiceName ServiceType StartType Computer UserID | rename Computer as dest| `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_service_created_with_suspicious_service_path_filter`
how_to_implement:To successfully implement this search, you need to be ingesting logs with the Service name, Service File Name Service Start type, and Service Type from your endpoints. known_false_positives:Legitimate applications may install services with uncommon services paths. References: -https://www.mandiant.com/resources/fin11-email-campaigns-precursor-for-ransomware-data-theft -https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html drilldown_searches: name:'View the detection results for - "$dest$"' search:'%original_detection_search% | search dest = "$dest$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$dest$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' tags: analytic_story: - 'Clop Ransomware' - 'Active Directory Lateral Movement' - 'Brute Ratel C4' - 'Qakbot' - 'Snake Malware' - 'Flax Typhoon' - 'PlugX' - 'CISA AA23-347A' asset_type:Endpoint confidence:80 impact:70 message:A service $ImagePath$ was created from a non-standard path using $ServiceName$ on $dest$ mitre_attack_id: - 'T1569' - 'T1569.002' observable: name:'dest' type:'Hostname' - role: - 'Victim' name:'ImagePath' type:'File' - role: - 'Attacker' product: - 'Splunk Enterprise' - 'Splunk Enterprise Security' - 'Splunk Cloud' required_fields: - 'EventCode' - 'Service_File_Name' - 'Service_Type' - '_time' - 'Service_Name' - 'Service_Start_Type' - 'dest' risk_score:56 security_domain:endpoint