270 likes | 684 Views
Reverse Engineering on Android. Canh Le My 2014.08.11. AGENDA. Motivation Android app packing How android execute your application Available tools Demonstration. Motivation. Bright side: How to secure your app Dark side: Learn about an application
E N D
Reverse Engineering on Android Canh Le My 2014.08.11
AGENDA • Motivation • Android app packing • How android execute your application • Available tools • Demonstration
Motivation • Bright side: • How to secure your app • Dark side: • Learn about an application • Modification and its innumerous purposes • Today’s talk.
Android app packing • Apk • Jar/Zip file • Containmetadata • Manifest • Certificates • Layouts • Containcode • classes.dex • jars • native libraries • Containresources/assets
How android execute your app • /data/app/package-name-<certificate-index>.apk
How android execute your app • Dalvik
How android execute your app • Smali
Available tools • Apktool • https://code.google.com/p/android-apktool/ • Apache license 2.0 • Decompile and Recompile apk file • Decoding resources to nearly original form (including resources.arsc, XMLs and 9.png files) and rebuilding them. • Baksmali: Classes.dex→ smali files • Smali: Classes.dex← smali files • But smali code is hard to read?
Available tools • Dex2jar • https://code.google.com/p/dex2jar/ • classes.dex→ jar file contains *.class • Decompile tools • jd-gui: not support try-catch, java 5+ • jad: no longer maintained • Procyon / Java Decompiler← the best choice • https://bitbucket.org/mstrobel/procyon
Demonstration • We can use freedom to bypass IAP, but not always success • http://system.in-appstore.com/freedom/ • Expense Manager • https://play.google.com/store/apps/details?id=at.markushi.expensemanager • Freedom works, but it will lock premium features again after a day. • So, lets see what can we do…
Demonstration 2 • Practice English Grammar • https://play.google.com/store/apps/details?id=com.testsstore.app.peg0 • Freedom does NOT work. • So, lets see…
Demonstration 3 • Money Lover • https://play.google.com/store/apps/details?id=com.testsstore.app.peg0 • Freedom works perfectly… but you can do a try.