Privilege Escalation (TA0004)(opens in a new tab or window)
sequence by host.id, process.entry_leader.entity_id with maxspan=30s
[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and process.name == "gdb" and
(process.thread.capabilities.effective : "CAP_SYS_PTRACE" or process.thread.capabilities.permitted : "CAP_SYS_PTRACE") and
user.id != "0"]
[network where host.os.type == "linux" and event.action == "connection_attempted" and event.type == "start" and
process.name != null and user.id == "0"]
Install detection rules in Elastic Security
Detect Root Network Connection via GDB CAP_SYS_PTRACE in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).