Detection rules › Sigma
Container With A hostPath Mount Created
Detects creation of a container with a hostPath mount. A hostPath volume mounts a directory or a file from the node to the container. Attackers who have permissions to create a new pod in the cluster may create one with a writable hostPath volume and chroot to escape to the underlying node.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | T1611 Escape to Host |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Kubernetes-pods | create-pods | create pods |
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- Creation Of Pod In System Namespace (Sigma)
- Kubernetes Anonymous User Create/Update/Patch Pods Request (Elastic)
- Kubernetes Container Created with Excessive Linux Capabilities (Elastic)
- Kubernetes Create or Update Privileged Pod (Splunk)
- Kubernetes Pod Created in Default Namespace (Splunk)
- Kubernetes Pod Created with a Sensitive hostPath Volume (Elastic)
- Kubernetes Pod Created With HostIPC (Elastic)
- Kubernetes Pod Created With HostNetwork (Elastic)
Rule body yaml
title: Container With A hostPath Mount Created
id: 402b955c-8fe0-4a8c-b635-622b4ac5f902
status: test
description: |
Detects creation of a container with a hostPath mount.
A hostPath volume mounts a directory or a file from the node to the container.
Attackers who have permissions to create a new pod in the cluster may create one with a writable hostPath volume and chroot to escape to the underlying node.
references:
- https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/Writable%20hostPath%20mount/
- https://blog.appsecco.com/kubernetes-namespace-breakout-using-insecure-host-path-volume-part-1-b382f2a6e216
author: Leo Tsaousis (@laripping)
date: 2024-03-26
tags:
- attack.t1611
- attack.privilege-escalation
logsource:
category: application
product: kubernetes
service: audit
detection:
selection:
verb: 'create'
objectRef.resource: 'pods'
hostPath: '*' # Note: Add the "exists" when it's implemented in SigmaHQ/Aurora
condition: selection
falsepositives:
- The DaemonSet controller creates pods with hostPath volumes within the kube-system namespace.
level: low
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
verb: 'create'
objectRef.resource: 'pods'
hostPath: '*'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
hostPath | wildcard |
|
objectRef.resource | eq |
|
verb | eq |
|