Container process entering the host namespaces
Matches the escape step AN0613 describes — a containerised process crossing into the host's namespaces — on the Sysmon-for-Linux process-creation source the analytic offers, in two arms. The first pairs `nsenter` in `Image` with a `CommandLine` naming PID 1 as the target, which is the direction that matters: host tooling entering a container targets that container's PID, so a target of 1 (or a `/proc/1/ns` path handed to setns) is a process reaching upward out of its own namespace set rather than downward into someone else's. The second arm matches command lines naming `release_agent`, `notify_on_release` or `/proc/sys/kernel/core_pattern`, the three host files a privileged container writes to make the host kernel execute a payload for it. The analytic's other log source, raw `auditd`, was not used: it records the syscall number rather than the name, splits arguments into positional a0/a1 fields instead of one command line, and does not watch unshare/setns/keyctl at all until an audit rule is added by hand, which no default or baseline policy does. MITRE supplies the SyscallWhitelist knob; the utility and path list here is authored. Three limits worth stating: an escape carried out entirely in-process — a program calling setns() or unshare() through libc, or a kernel exploit — creates no exec and is invisible here; a shell builtin redirect such as `echo … > /proc/sys/kernel/core_pattern` also creates no exec, so only the `sh -c` and `tee` forms of that write are seen; and Sysmon for Linux is a separate agent that no distribution installs by default, so a host running stock auditd alone produces nothing this rule can read. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0219, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 3 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Splunk · SPL
Run this as a search.
index=* ((Image="*/nsenter" AND (CommandLine="*-t 1 *" OR CommandLine="*--target 1 *" OR CommandLine="*--target=1 *" OR CommandLine="*/proc/1/ns*")) OR (CommandLine="*release_agent*" OR CommandLine="*notify_on_release*" OR CommandLine="*/proc/sys/kernel/core_pattern*"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*/nsenter" AND (TO_LOWER(CommandLine) LIKE "*-t 1 *" OR TO_LOWER(CommandLine) LIKE "*--target 1 *" OR TO_LOWER(CommandLine) LIKE "*--target=1 *" OR TO_LOWER(CommandLine) LIKE "*/proc/1/ns*")) OR (TO_LOWER(CommandLine) LIKE "*release_agent*" OR TO_LOWER(CommandLine) LIKE "*notify_on_release*" OR TO_LOWER(CommandLine) LIKE "*/proc/sys/kernel/core_pattern*"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,linux,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <!-- 2 rules: the Sigma condition ORs across different fields, which one rule cannot express. Any one matching is a hit. --> <rule id="100000" level="7"> <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. --> <field name="Image" type="pcre2">(?i)/nsenter$</field> <field name="CommandLine" type="pcre2">(?i)(-t 1 |--target 1 |--target=1 |/proc/1/ns)</field> <description>Container process entering the host namespaces (1/2)</description> <mitre> <id>T1611</id> </mitre> </rule> <rule id="100001" level="7"> <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. --> <field name="CommandLine" type="pcre2">(?i)(release_agent|notify_on_release|/proc/sys/kernel/core_pattern)</field> <description>Container process entering the host namespaces (2/2)</description> <mitre> <id>T1611</id> </mitre> </rule></group>
Sentinel · KQL
Run this as a search.
Sentinel cannot express this construct. No Sentinel table is modelled for this logsource ({"product":"linux","service":"sysmon"}), so there is nothing honest to query. Pick a logsource this translator maps, or write the KQL by hand. The Sigma source is on the first tab, unchanged.
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.