Skip to content

feat(analyzer): detect privileged container execution and escape primitives as PE5#214

Open
CharmingGroot wants to merge 1 commit into
NVIDIA:mainfrom
CharmingGroot:feat/pe5-container-escape
Open

feat(analyzer): detect privileged container execution and escape primitives as PE5#214
CharmingGroot wants to merge 1 commit into
NVIDIA:mainfrom
CharmingGroot:feat/pe5-container-escape

Conversation

@CharmingGroot

Copy link
Copy Markdown
Contributor

Summary

PE4 (#189) detects Docker socket access. This adds PE5, its CLI counterpart: privileged container execution and container-escape primitives that reach the same host takeover through docker run flags and kernel interfaces. Verified undetected on v2.3.5 in #213.

Changes

static_patterns_privilege_escalation.py gains PE5_PATTERNS (--privileged, host root mount -v /:, --cap-add=SYS_ADMIN, host namespaces --pid/net=host, --device, --security-opt …=unconfined, nsenter, cgroup release_agent, /proc/<pid>/ns/, unshare --map-root-user) and a best-confidence-per-line PE5 pass that mirrors PE4, with the documentation-example filter applied. PE5 findings are HIGH.

Testing

12 new tests cover each primitive (privileged, host root mount, cap-add, host namespaces, nsenter, release_agent, unshare), multi-flag dedup (one finding per line), a benign docker run negative, and a markdown documentation-example exclusion. make format and make lint pass; uv run pytest -m "not integration and not provider" reports 999 passed, 0 failed.

Closes #213

…itives as PE5

PE4 detects Docker socket access; PE5 is its CLI counterpart for privileged container execution and escape primitives (docker run --privileged / -v /:/ / --cap-add=SYS_ADMIN, host namespaces --pid/net=host, --device, --security-opt unconfined, nsenter, cgroup release_agent, /proc/<pid>/ns/, unshare --map-root-user) that reach the same host takeover. Mirrors PE4's best-confidence-per-line pass with the documentation-example filter.

Signed-off-by: CharmingGroot <ohyes9711@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant