Files
splunk-security_content/detections/endpoint/linux_at_allow_config_file_creation.yml
2022-08-26 10:46:51 -05:00

74 lines
2.8 KiB
YAML

name: Linux At Allow Config File Creation
id: 977b3082-5f3d-11ec-b954-acde48001122
version: 1
date: '2021-12-17'
author: Teoderick Contreras, Splunk
type: Anomaly
datamodel:
- Endpoint
description: The following analytic identifies a suspicious file creation of /etc/at.allow
or /etc/at.deny. These 2 files are commonly abused by malware, adversaries or red
teamers to persist on the targeted or compromised host. These config files can restrict
or allow user to execute "at" application (another schedule task application in
linux). attacker can create a user or add the compromised username to that config
file to execute "at" to schedule it malicious code. This anomaly detection can be
a good indicator to investigate further the entry in created config file and who
created it to verify if it is a false positive.
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path IN ("*/etc/at.allow",
"*/etc/at.deny") by Filesystem.dest Filesystem.file_create_time Filesystem.file_name
Filesystem.process_guid Filesystem.file_path | `drop_dm_object_name(Filesystem)`
| `security_content_ctime(lastTime)` | `security_content_ctime(firstTime)` | `linux_at_allow_config_file_creation_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting
logs with the file name, file path, and process_guid executions from your endpoints into the Endpoint datamodel.
If you are using Sysmon, you can use the Add-on for Linux Sysmon from Splunkbase.
known_false_positives: Administrator or network operator can create this file for
automation purposes. Please update the filter macros to remove false positives.
references:
- https://linuxize.com/post/at-command-in-linux/
tags:
analytic_story:
- Linux Privilege Escalation
- Linux Persistence Techniques
- Linux Living Off The Land
automated_detection_testing: passed
cis20:
- CIS 3
- CIS 5
- CIS 16
confidence: 50
context:
- Source:Endpoint
- Stage:Privilege Escalation
- Stage:Persistence
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.001/at_execution/sysmon_linux.log
impact: 50
kill_chain_phases:
- Exploitation
message: A file $file_name$ is created in $file_path$ on $dest$
mitre_attack_id:
- T1053.003
- T1053
nist:
- DE.CM
observable:
- name: dest
type: Hostname
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- Filesystem.dest
- Filesystem.file_create_time
- Filesystem.file_name
- Filesystem.process_guid
- Filesystem.file_path
risk_score: 25
security_domain: endpoint
asset_type: Endpoint