Techniques
Sample rules
Unusually Long Command Line - MLTK
- source: splunk
- technicques:
Description
The following analytic identifies unusually long command lines executed on hosts, which may indicate malicious activity. It leverages the Machine Learning Toolkit (MLTK) to detect command lines with lengths that deviate from the norm for a given user. This is significant for a SOC as unusually long command lines can be a sign of obfuscation or complex malicious scripts. If confirmed malicious, this activity could allow attackers to execute sophisticated commands, potentially leading to unauthorized access, data exfiltration, or further compromise of the system.
Detection logic
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes by Processes.user Processes.dest Processes.process_name Processes.process
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| eval processlen=len(process)
| search user!=unknown
| apply cmdline_pdfmodel threshold=0.01
| rename "IsOutlier(processlen)" as isOutlier
| search isOutlier > 0
| table firstTime lastTime user dest process_name process processlen count
| `unusually_long_command_line___mltk_filter`