strazzere / android-unpacker

Android Unpacker presented at Defcon 22: Android Hacker Protection Level 0
Apache License 2.0
1.12k stars 331 forks source link

x86 support #17

Closed hubert3 closed 9 years ago

hubert3 commented 9 years ago

Compiled this on x86 and tried it on Genymotion just for fun - pread() seems to fail - Any idea how to fix?

root@vbox86p:/data/local/tmp # uname -a Linux localhost 3.10.0-genymotion-g1d178ae-dirty #1 SMP PREEMPT Mon Apr 27 11:57:12 CEST 2015 i686 GNU/Linux root@vbox86p:/data/local/tmp # ./kisskiss com.android.mms [] Android Dalvik Unpacker/Unprotector - diff@lookout.com [+] Hunting for com.android.mms [+] 6589 is service pid [+] 6998 is clone pid [+] Attempting to detect packer/protector... [] Nothing special found, assuming Bangcle... [+] Unpacked odex found in memory! [+] Attempting to dump memory region 0xb7745000 to 0xb7746000 [!] pread seems to have failed! [!] An issue occured trying to dump the memory to a file!

CalebFenton commented 9 years ago

An md5 or sha1 of the sample might be helpful :D

strazzere commented 9 years ago

Mmm yes an identifier on the app would be useful, can you also give more information about your Genymotion emulator build? Potentially a getprop dump of it? I'm not 100% versed in all their emulator builds - though they might have restrictions on things or even SELinux enabled in odd ways.

strazzere commented 9 years ago

I fired up a general Genymotion emulator, it appeared to have SELinux enabled, which would cause this to fail. You either need to disable SELinux or use a device with it not enabled already.

I did just test this on a x86 emulator and it worked fine.