Content-Type
is either text/*
or application/json
are sent.HTTP Upgrade
), such as exec
, the authorization plugin is only called for the initial HTTP requests. Once the plugin approves the command, authorization is not applied to the rest of the flow. Specifically, the streaming data is not passed to the authorization plugins. For commands that return chunked HTTP response, such as logs
and events
, only the HTTP request is sent to the authorization plugins.{"name":"policy_3","users":["alice","bob"],"actions":["container_create"]}
README
and the plugin.go
code to understand how is it working.run --privileged
--privileged
flag or give any extra capability to the container:--privileged
flag or give any extra capability to the container, and he only allowed to mount the /tmp
folder:/tmp
but you can mount a different writable folder. You can find writable directories using: find / -writable -type d 2>/dev/null
mount | grep -v "nosuid"
For example usually /dev/shm
, /run
, /proc
, /sys/fs/cgroup
and /var/lib/lxcfs
don't support the suid bit./etc
or any other folder containing configuration files, you may change them from the docker container as root in order to abuse them in the host and escalate privileges (maybe modifying /etc/shadow
)Binds
param as a root level key in the JSON but in the API it appears under the key HostConfig
HostConfig
is the key that usually contains the interesting privileges to escape from the container. However, as we have discussed previously, note how using Binds outside of it also works and may allow you to bypass restrictions.