MEDIUM
Source
Tracee
ID
TRC-4
Version
0.1.0
Date
28 Jun 2022

Dynamic Code Loading

Writing to executable allocated memory region

MITRE ATT&CK

Defense Evasion: Obfuscated Files or Information

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
package tracee.TRC_4

import data.tracee.helpers

__rego_metadoc__ := {
	"id": "TRC-4",
	"version": "0.1.0",
	"name": "Dynamic Code Loading",
	"description": "Writing to executable allocated memory region",
	"tags": ["linux", "container"],
	"properties": {
		"Severity": 2,
		"MITRE ATT&CK": "Defense Evasion: Obfuscated Files or Information",
	},
}

eventSelectors := [{
	"source": "tracee",
	"name": "mem_prot_alert",
}]

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

tracee_match {
	input.eventName == "mem_prot_alert"
	message := helpers.get_tracee_argument("alert")
	message == "Protection changed from W+E to E!"
}