-
Notifications
You must be signed in to change notification settings - Fork 432
Added new technique for linux - magic system request key #3666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
patel-bhavin
merged 4 commits into
splunk:develop
from
CheraghiMilad:lnx_auditd_magic_system_request_key
Sep 3, 2025
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
acaceb8
Added new technique for linux - magic system request key
CheraghiMilad 1eefd8f
Macro and message issue fixed
CheraghiMilad 8af6a90
file name issue fix
CheraghiMilad 655bd7f
Merge branch 'develop' into lnx_auditd_magic_system_request_key
CheraghiMilad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
detections/endpoint/linux_auditd_magic_system_request_key.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: Linux Magic SysRq Key Abuse | ||
| id: 22c03600-f84a-47fa-abaa-ffbe3e72c782 | ||
| version: 1 | ||
| date: '2025-08-28' | ||
| author: Milad Cheraghi | ||
| status: production | ||
| type: TTP | ||
| description: | | ||
| Detects potential abuse of the Linux Magic SysRq (System Request) key by adversaries | ||
| with root or sufficient privileges to manipulate or destabilize a system. | ||
| Writing to /proc/sysrq-trigger can crash the system, kill processes, or bypass standard logging. | ||
| Monitoring SysRq abuse helps detect stealthy post-exploitation activity. | ||
| data_source: | ||
| - Linux Auditd Path | ||
| search: '`linux_auditd` type=Path name="/proc/sysrq-trigger" OR name="/proc/sys/kernel/sysrq" OR name="/etc/sysctl.conf" | ||
| | rename host as dest | ||
| | stats count min(_time) as firstTime max(_time) as lastTime by dest name | ||
| | `security_content_ctime(firstTime)` | ||
| | `security_content_ctime(lastTime)` | ||
| | `linux_auditd_sysrq_abuse_filter`' | ||
| how_to_implement: | | ||
| To implement this detection, ensure auditd is configured to watch: | ||
| - /proc/sysrq-trigger | ||
| - /proc/sys/kernel/sysrq | ||
| - /etc/sysctl.conf | ||
| with write and attribute changes (`-p wa`) and key `sysrq`. | ||
| Use the Splunk Add-on for Unix and Linux for proper ingestion and CIM normalization. | ||
| This enables effective monitoring of Linux endpoints for SysRq abuse. | ||
| known_false_positives: | ||
| - Legitimate administrative activity modifying SysRq for debugging or recovery. | ||
| - Please update the filter macros to remove false positives. | ||
| references: | ||
| - https://www.kernel.org/doc/html/v4.10/_sources/admin-guide/sysrq.txt | ||
| - https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/4/html/reference_guide/s3-proc-sys-kernel | ||
| - https://www.splunk.com/en_us/blog/security/threat-update-awfulshred-script-wiper.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$ | ||
| rba: | ||
| message: A [$comm$] event was occurred on host - [$dest$] Used the Linux Magic SysRq mechanism. | ||
CheraghiMilad marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| risk_objects: | ||
| - field: dest | ||
| type: system | ||
| score: 70 | ||
| threat_objects: [] | ||
| tags: | ||
| analytic_story: | ||
| - Compromised Linux Host | ||
| asset_type: Endpoint | ||
| mitre_attack_id: | ||
| - T1059.004 | ||
| - T1529 | ||
| - T1489 | ||
| - T1499 | ||
| product: | ||
| - Splunk Enterprise | ||
| - Splunk Enterprise Security | ||
| - Splunk Cloud | ||
| security_domain: endpoint | ||
| tests: | ||
| - name: True Positive Test | ||
| attack_data: | ||
| - data: | ||
| https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1529/linux_sysrq_abuse/linux_sysrq_abuse.log | ||
| source: auditd | ||
| sourcetype: auditd | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.