HIGH
Source
Tracee
ID
TRC-11
Version
0.1.0
Date
28 Jun 2022

Container Device Mount Detected

Container device filesystem mount detected. A mount of a host device filesystem can be exploited by adversaries to perform container escape.

MITRE ATT&CK

Privilege Escalation: Escape to Host

Rego Policy

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package tracee.TRC_11

import data.tracee.helpers

__rego_metadoc__ := {
	"id": "TRC-11",
	"version": "0.1.0",
	"name": "Container Device Mount Detected",
	"description": "Container device filesystem mount detected. A mount of a host device filesystem can be exploited by adversaries to perform container escape.",
	"tags": ["container"],
	"properties": {
		"Severity": 3,
		"MITRE ATT&CK": "Privilege Escalation: Escape to Host",
	},
}

eventSelectors := [{
	"source": "tracee",
	"name": "security_sb_mount",
	"origin": "container",
}]

tracee_selected_events[eventSelector] {
	eventSelector := eventSelectors[_]
}

tracee_match = res {
	input.eventName == "security_sb_mount"

	devname := helpers.get_tracee_argument("dev_name")
	startswith(devname, "/dev/")

	res := {"mounted device": devname}
}