Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
18a9043
added data model to searches
rosplk Jan 26, 2022
dd7477c
fixed space before pipe
rosplk Jan 26, 2022
3068824
Branch was auto-updated.
pyth0n1c Jan 26, 2022
b095a62
minor upddates
patel-bhavin Jan 26, 2022
7078e71
Merge branch 'nixpost3' of github.com:splunk/security_content into ni…
patel-bhavin Jan 26, 2022
3d3638c
story file
patel-bhavin Jan 26, 2022
5fa5def
remove conflicts
patel-bhavin Jan 26, 2022
328417d
test files
patel-bhavin Jan 26, 2022
1e680d5
Branch was auto-updated.
pyth0n1c Jan 27, 2022
5b547fb
Branch was auto-updated.
pyth0n1c Jan 27, 2022
d720144
Branch was auto-updated.
pyth0n1c Jan 27, 2022
a279b38
Branch was auto-updated.
pyth0n1c Jan 27, 2022
39240b0
Branch was auto-updated.
pyth0n1c Jan 27, 2022
4da9c3a
Branch was auto-updated.
pyth0n1c Jan 28, 2022
8efb163
Branch was auto-updated.
pyth0n1c Jan 31, 2022
e0da035
Branch was auto-updated.
pyth0n1c Jan 31, 2022
063a133
Branch was auto-updated.
pyth0n1c Jan 31, 2022
8ecdab5
Branch was auto-updated.
pyth0n1c Jan 31, 2022
141d485
Branch was auto-updated.
pyth0n1c Jan 31, 2022
45a7446
Branch was auto-updated.
pyth0n1c Feb 2, 2022
d10d270
Branch was auto-updated.
pyth0n1c Feb 2, 2022
587302f
Branch was auto-updated.
pyth0n1c Feb 2, 2022
7bd8454
Branch was auto-updated.
pyth0n1c Feb 2, 2022
4819405
Branch was auto-updated.
pyth0n1c Feb 2, 2022
a18d1d0
Branch was auto-updated.
pyth0n1c Feb 2, 2022
dc97e81
Branch was auto-updated.
pyth0n1c Feb 2, 2022
53ac166
Branch was auto-updated.
pyth0n1c Feb 3, 2022
b9cf19d
Branch was auto-updated.
pyth0n1c Feb 3, 2022
c81f08e
Branch was auto-updated.
pyth0n1c Feb 3, 2022
1098dcd
Branch was auto-updated.
pyth0n1c Feb 4, 2022
ca4e02d
Branch was auto-updated.
pyth0n1c Feb 4, 2022
667fb7e
Branch was auto-updated.
pyth0n1c Feb 4, 2022
a642aec
Branch was auto-updated.
pyth0n1c Feb 4, 2022
4ce00fa
Branch was auto-updated.
pyth0n1c Feb 7, 2022
6fcbb47
Branch was auto-updated.
pyth0n1c Feb 7, 2022
4ccb721
Branch was auto-updated.
pyth0n1c Feb 7, 2022
eec391c
Branch was auto-updated.
pyth0n1c Feb 14, 2022
1ff2616
Branch was auto-updated.
pyth0n1c Feb 14, 2022
34f231e
version 1
patel-bhavin Feb 14, 2022
5783f37
Merge branch 'nixpost3' of github.com:splunk/security_content into ni…
patel-bhavin Feb 14, 2022
c521d07
file updates
patel-bhavin Feb 14, 2022
11ab86f
remove detections aalready covered
patel-bhavin Feb 14, 2022
e2b0e4c
mionr
patel-bhavin Feb 15, 2022
a687820
Branch was auto-updated.
pyth0n1c Feb 15, 2022
283013b
Branch was auto-updated.
pyth0n1c Feb 15, 2022
47d52db
Branch was auto-updated.
pyth0n1c Feb 15, 2022
dfaa406
Branch was auto-updated.
pyth0n1c Feb 15, 2022
47a4849
Branch was auto-updated.
pyth0n1c Feb 15, 2022
1254210
Branch was auto-updated.
pyth0n1c Feb 15, 2022
9d78070
lookupss
patel-bhavin Feb 17, 2022
c80a1fd
spl update
patel-bhavin Feb 17, 2022
d75f591
Branch was auto-updated.
pyth0n1c Feb 17, 2022
2209241
Branch was auto-updated.
pyth0n1c Feb 17, 2022
e927169
Branch was auto-updated.
pyth0n1c Feb 17, 2022
56ecc6e
Branch was auto-updated.
pyth0n1c Feb 17, 2022
52d0996
combined the rest 2
patel-bhavin Feb 18, 2022
ac9c46c
updating search conditions
patel-bhavin Feb 18, 2022
285e1bf
Branch was auto-updated.
pyth0n1c Feb 18, 2022
849bce2
Branch was auto-updated.
pyth0n1c Feb 18, 2022
3a00e27
Branch was auto-updated.
pyth0n1c Feb 18, 2022
6b41dbc
Branch was auto-updated.
pyth0n1c Feb 18, 2022
ee76f0b
Branch was auto-updated.
pyth0n1c Feb 21, 2022
b3577b3
Branch was auto-updated.
pyth0n1c Feb 22, 2022
2b44f6d
Branch was auto-updated.
pyth0n1c Feb 22, 2022
e3c5d23
Branch was auto-updated.
pyth0n1c Feb 23, 2022
39c53de
Branch was auto-updated.
pyth0n1c Feb 23, 2022
215a840
Branch was auto-updated.
pyth0n1c Feb 24, 2022
2c3f316
Update suspcious_linux_discovery_commands.test.yml
patel-bhavin Feb 24, 2022
fb6c741
Branch was auto-updated.
pyth0n1c Feb 24, 2022
7375262
updated story words
MHaggis Feb 24, 2022
68dde34
rename typo
patel-bhavin Feb 24, 2022
caf0635
typo
patel-bhavin Feb 24, 2022
55ffc28
Update linux_post_exploitation.yml
patel-bhavin Feb 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions detections/endpoint/suspicious_linux_discovery_commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Suspicious Linux Discovery Commands
id: 0edd5112-56c9-11ec-b990-acde48001122
version: 1
date: '2021-12-06'
author: Bhavin Patel, Splunk
type: TTP
datamodel:
- Endpoint
description: This search, detects execution of suspicious bash commands from various commonly leveraged bash scripts like (AutoSUID, LinEnum, LinPeas) to perform discovery of possible paths of privilege execution, password files, vulnerable directories, executables and file permissions on a Linux host.\

The search logic specifically looks for high number of distinct commands run in a short period of time.
search: '| tstats `security_content_summariesonly` count values(Processes.process) values(Processes.process_name) values(Processes.parent_process_name) dc(Processes.process) as distinct_commands dc(Processes.process_name) as distinct_process_names min(_time) as firstTime max(_time)
as lastTime from datamodel=Endpoint.Processes where [|inputlookup linux_tool_discovery_process.csv | rename process as Processes.process |table Processes.process] by _time span=5m Processes.user Processes.dest
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`| where distinct_commands > 40 AND distinct_process_names > 3| `suspicious_linux_discovery_commands_filter`'
how_to_implement: This detection search is based on Splunk add-on for Microsoft Sysmon-Linux.(https://splunkbase.splunk.com/app/6176/).
Please install this add-on to parse fields correctly and execute detection search. Consider customizing the time window and threshold values according to your environment.
known_false_positives: Unless an administrator is using these commands to troubleshoot
or audit a system, the execution of these commands should be monitored.
references:
- https://attack.mitre.org/matrices/enterprise/linux/
- https://attack.mitre.org/techniques/T1059/004/
- https://github.com/IvanGlinkin/AutoSUID
- https://github.com/carlospolop/PEASS-ng/tree/master/linPEAS
- https://github.com/rebootuser/LinEnum
tags:
analytic_story:
- Linux Post-Exploitation
automated_detection_testing: passed
confidence: 90
context:
- Source:Endpoint
- Stage:Discovery
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.004/linux_discovery_tools/sysmon_linux.log
impact: 90
kill_chain_phases:
- Exploitation
message: Suspicious Linux Discovery Commands detected on $dest$
mitre_attack_id:
- T1059.004
observable:
- name: dest
type: Endpoint
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- Processes.process
- Processes.parent_process_name
- Processes.user
- Processes.process_name
risk_score: 81
security_domain: endpoint
61 changes: 61 additions & 0 deletions lookups/linux_tool_discovery_process.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
process
cat /proc/version
cat /etc/*-release
/etc/passwd
cat /etc/*
lastlog
id
PermitRootLogin
sestatus *
ps
mysql*
netstat*
find *
head /var/mail/root
docker
cat /etc/issue
cat /etc/*-release
cat /proc/version
uname -a
uname -mrs
rpm -q kernel
dmesg | grep Linux
ls /boot | grep vmlinuz-
cat /etc/profile
cat /etc/bashrc
cat ~/.bash_profile
cat ~/.bashrc
cat ~/.bash_logout
ps -aux | grep root
ps -ef | grep root
crontab -l
cat /etc/cron*
cat /etc/cron.allow
cat /etc/cron.deny
cat /etc/crontab
grep -i user *
grep -i pass *
ifconfig
cat /etc/network/interfaces
cat /etc/sysconfig/network
cat /etc/resolv.conf
cat /etc/networks
cvelist-file:*
exploit-db*
strings -e /etc/apache2/apache2.conf
strings -e /etc/ssh/sshd_config
strings -e /etc/shadow
iptables -L
lsof -i
netstat -antup
netstat -antpx
netstat -tulpn
arp -e
route
cat /etc/passwd
cat /etc/group
cat /etc/shadow
find / -perm -u=s
find / -perm -g=s
find / -perm -4000
find / -perm -2000
7 changes: 7 additions & 0 deletions lookups/linux_tool_discovery_process.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: A list of suspicious bash commonly used by attackers via scripts
filename: linux_tool_discovery_process.csv
name: linux_tool_discovery_process
default_match: 'false'
match_type: WILDCARD(process)
min_matches: 1
case_sensitive_match: 'false'
19 changes: 19 additions & 0 deletions stories/linux_post_exploitation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Linux Post-Exploitation
id: d310ccfe-5477-11ec-ad05-acde48001122
version: 1
date: '2021-12-03'
author: Rod Soto
description: This analytic story identifies popular Linux post exploitation tools such as autoSUID, LinEnum, LinPEAS, Linux Exploit Suggesters, MimiPenguin.
narrative: These tools allow operators find possible exploits or paths for privilege escalation based on SUID binaries, user permissions, kernel version and distro version.
references:
- https://attack.mitre.org/matrices/enterprise/linux/
tags:
analytic_story:
- Linux Post-Exploitation
category:
- Adversary Tactics
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
usecase: Security Monitoring
12 changes: 12 additions & 0 deletions tests/endpoint/suspicious_linux_discovery_commands.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Suspicious Linux Discovery Commands
tests:
- name: Suspicious Linux Discovery Commands
file: endpoint/suspicious_linux_discovery_commands.yml
pass_condition: '| stats count | where count > 0'
earliest_time: '-60d'
latest_time: 'now'
attack_data:
- file_name: sysmon_linux.log
data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.004/linux_discovery_tools/sysmon_linux.log
source: Syslog:Linux-Sysmon/Operational
sourcetype: sysmon_linux