Skip to content

Commit c2c32cf

Browse files
authored
Merge branch 'develop' into backwards
2 parents 0823e53 + 8a3d8a5 commit c2c32cf

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Linux Magic SysRq Key Abuse
2+
id: 22c03600-f84a-47fa-abaa-ffbe3e72c782
3+
version: 1
4+
date: '2025-08-28'
5+
author: Milad Cheraghi
6+
status: production
7+
type: TTP
8+
description: |
9+
Detects potential abuse of the Linux Magic SysRq (System Request) key by adversaries
10+
with root or sufficient privileges to manipulate or destabilize a system.
11+
Writing to /proc/sysrq-trigger can crash the system, kill processes, or bypass standard logging.
12+
Monitoring SysRq abuse helps detect stealthy post-exploitation activity.
13+
data_source:
14+
- Linux Auditd Path
15+
search: '`linux_auditd` type=Path name="/proc/sysrq-trigger" OR name="/proc/sys/kernel/sysrq" OR name="/etc/sysctl.conf"
16+
| rename host as dest
17+
| stats count min(_time) as firstTime max(_time) as lastTime by dest name
18+
| `security_content_ctime(firstTime)`
19+
| `security_content_ctime(lastTime)`
20+
| `linux_magic_sysrq_key_abuse_filter`'
21+
how_to_implement: |
22+
To implement this detection, ensure auditd is configured to watch:
23+
- /proc/sysrq-trigger
24+
- /proc/sys/kernel/sysrq
25+
- /etc/sysctl.conf
26+
with write and attribute changes (`-p wa`) and key `sysrq`.
27+
Use the Splunk Add-on for Unix and Linux for proper ingestion and CIM normalization.
28+
This enables effective monitoring of Linux endpoints for SysRq abuse.
29+
known_false_positives: Legitimate administrative activity modifying SysRq for debugging or recovery.
30+
Please update the filter macros to remove false positives.
31+
references:
32+
- https://www.kernel.org/doc/html/v4.10/_sources/admin-guide/sysrq.txt
33+
- https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/4/html/reference_guide/s3-proc-sys-kernel
34+
- https://www.splunk.com/en_us/blog/security/threat-update-awfulshred-script-wiper.html
35+
drilldown_searches:
36+
- name: View the detection results for - "$dest$"
37+
search: '%original_detection_search% | search dest="$dest$"'
38+
earliest_offset: $info_min_time$
39+
latest_offset: $info_max_time$
40+
- name: View risk events for the last 7 days for - "$dest$"
41+
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$")
42+
starthoursago=168
43+
| stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name"
44+
values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories"
45+
values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic)
46+
as "ATT&CK Tactics" by normalized_risk_object
47+
| `security_content_ctime(firstTime)`
48+
| `security_content_ctime(lastTime)`'
49+
earliest_offset: $info_min_time$
50+
latest_offset: $info_max_time$
51+
rba:
52+
message: Abuse of the Linux Magic System Request key detected on host - [$dest$]
53+
risk_objects:
54+
- field: dest
55+
type: system
56+
score: 70
57+
threat_objects: []
58+
tags:
59+
analytic_story:
60+
- Compromised Linux Host
61+
asset_type: Endpoint
62+
mitre_attack_id:
63+
- T1059.004
64+
- T1529
65+
- T1489
66+
- T1499
67+
product:
68+
- Splunk Enterprise
69+
- Splunk Enterprise Security
70+
- Splunk Cloud
71+
security_domain: endpoint
72+
tests:
73+
- name: True Positive Test
74+
attack_data:
75+
- data:
76+
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1529/linux_sysrq_abuse/linux_sysrq_abuse.log
77+
source: auditd
78+
sourcetype: auditd

0 commit comments

Comments
 (0)