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
36
37
38
39
40
41
42
43
|
package tracee.TRC_11
import data.tracee.helpers
__rego_metadoc__ := {
"id": "TRC-11",
"version": "0.1.0",
"name": "Container Device Mount Detected",
"eventName": "disk_mount",
"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/")
# exclude runc
not runc_process with input as input
res := {"mounted device": devname}
}
runc_process {
startswith(input.processName, "runc:")
input.threadId == 1
}
|