Threaticon
Toggle sidebar

You're viewing a limited, public preview. Log in for full access.

Log in User Guide
Log in Get started
Detection Strategies DET0369 — Detection Strategy for Event Triggered Execution via Trap (T1546.005)
DET0369

Detection Strategy for Event Triggered Execution via Trap (T1546.005)

2 analytic(s) · 1 technique(s) detected

Analytics

2
AN1038 Analytic 1038
Linux

Correlate file modifications in shell startup scripts (e.g., .bashrc, .profile) with embedded `trap` commands and observe if those changes are followed by the unexpected execution of child processes when terminal signals (e.g., SIGINT) are triggered. Use contextual linking with user session activity to detect privilege misuse.

auditd:SYSCALL execve auditd:SYSCALL Modification of user shell profile or trap registration via echo/redirection (e.g., echo "trap 'malicious_cmd' INT" >> ~/.bashrc) auditd:SYSCALL open
[TargetShellFilePath] The path to user profile scripts (e.g., ~/.bashrc, ~/.zshrc); may differ by distro or shell type.
[SignalTrapName] Trap signal (e.g., INT, HUP, TERM) can be environment-specific or attacker-tuned to evade.
[TimeWindow] Temporal threshold to correlate trap insertion and process execution (e.g., 10s-5min)
AN1039 Analytic 1039
macOS

Detect unauthorized `trap` command registrations in shell startup files (e.g., .zprofile, .bash_profile, .zshrc) followed by execution chains during user terminal interaction. Use Unified Logs and EDR telemetry to correlate shell command parsing and process tree anomalies.

macos:unifiedlog Command line containing `trap` or `echo 'trap` written to login shell files macos:unifiedlog File write or append to .zshrc, .bash_profile, .zprofile, etc.
[LoginShellConfigPaths] Startup files vary by shell (.bash_profile, .zshrc, etc.)
[TrapCommandLengthThreshold] Short benign traps may differ from longer/multi-command malicious traps
[ParentProcessAnomalyThreshold] Score or detect if new child process deviates from shell’s typical behavior

Detected Techniques

1

Privilege Escalation (1)

Details

MITRE ID
DET0369
STIX ID
x-mitre-detection-strategy--07fb6847-efcb-426e-9344-bfc9dfcdebd4
Analytics
2
Techniques Detected
1
By Tactic
Privilege Escalation
1
Leaving Threaticon

This link opens an external site that isn't part of the platform.