inside dvm tools
TRANSCRIPT
![Page 1: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/1.jpg)
Inside DVMTools
Real life hackingObfuscation
Nick Bova@mykola_bova
Nov 14 2013
![Page 2: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/2.jpg)
Basic flow
<Picture on flipchart – possible ways>
![Page 3: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/3.jpg)
How to get *.apk files for installed applications?
One of options - MyAppSharer
![Page 4: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/4.jpg)
Tool for sharing Android screen
![Page 5: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/5.jpg)
Tool for sharing Android screen
Tool for sharing Android screenhttp://droid-at-screen.ribomation.com/java -jar F:\adb\nb\droidAtScreen-1.0.2.jar
![Page 6: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/6.jpg)
What is adb?
![Page 7: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/7.jpg)
How to get *.apk files from smart phone?
<Example 1>One of options –adb shellls /sdcard/MyAppShareradb pull /sdcard/MyAppSharer .
![Page 8: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/8.jpg)
How to convert *.apk *.jar file?
<Example 2>dex2jar.bat com.adobe.reader.apk
https://code.google.com/p/dex2jar/
![Page 9: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/9.jpg)
How to convert *.jar file *.java files?
<Example 3>jd-guihttp://jd.benow.ca/If not enough – use JAD
![Page 10: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/10.jpg)
How to unzip *.apk files?
<Example 4>One of options – WinRAR
Hello, cap
![Page 11: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/11.jpg)
How to disassemble classes.dex file?
< Example 5 > One of options – dexdump.exeF:\android\sdk\build-tools\17.0.0\dexdump.exe
-d -f -h classes.dex > classes.dex.out.1
![Page 12: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/12.jpg)
Real Life example (1)
LjbeetleOpen source LiveJournal client for Androidhttps://
bitbucket.org/dotCypress/lj-beetle/wiki/Homehttps://
play.google.com/store/apps/details?id=com.dotcypress.ljbeetle&hl=ru
![Page 13: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/13.jpg)
Real Life example (1)
Автор – Виталий Домников @dotcypressHates java and Android
![Page 14: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/14.jpg)
Real Life example (2)
1) analyticscom.flurry.androidhttp://
support.flurry.com/index.php?title=Analytics
![Page 15: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/15.jpg)
Real Life example (3)
2) using http for uploading imagespackage com.dotcypress.ljbeetle.upload;public String upload(String paramString)http://pics.livejournal.com/interface/simple
![Page 16: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/16.jpg)
Additional tools
What is your suggestion(s)? <flipchart>
![Page 17: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/17.jpg)
smali
https://code.google.com/p/smali/https://
code.google.com/p/smali/source/browse/examples/HelloWorld/HelloWorld.smali
<Example 200 Additional>
![Page 18: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/18.jpg)
smali tests
https://android.googlesource.com/platform/external/smali/+/
0856f098c0c7296fba137e8f5d039482060cb5cd/smali-integration-tests/src/test/smali/junit-tests
<Example 200 Additional>
![Page 19: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/19.jpg)
smali examples
https://code.google.com/p/smali/source/browse/#
git%2Fexamples%2FMethodOverloading
![Page 20: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/20.jpg)
Beginner’s guide to smali coding
http://forum.xda-developers.com/showthread.php?t=2193735
http://forum.xda-developers.com/showpost.php?p=39218738&postcount=2
http://forum.xda-developers.com/showpost.php?p=39218750&postcount=3
http://forum.xda-developers.com/showpost.php?p=39218761&postcount=4
http://forum.xda-developers.com/showpost.php?p=39228373&postcount=6
![Page 21: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/21.jpg)
Smalli Hello World
java -jar F:\adb\tools\smali-2.0.2.jar -o classes.dex HelloWorld.smali
F:\adb\adb.exe push HelloWorld.zip /sdcard/F:\adb\adb.exe shell mkdir /sdcard/dalvik-cacheF:\adb\adb.exe shell ANDROID_DATA=/sdcard
dalvikvm -cp /sdcard/HelloWorld.zip HelloWorld
![Page 22: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/22.jpg)
dedexer
http://dedexer.sourceforge.netCreate folder dedexer.outjava -jar F:\adb\ddx1.26.jar -o -D -r -d
./dedexer.out classes.dex <Example 201 Additional>
![Page 23: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/23.jpg)
dexter
Dexterhttp://dexter.dexlabs.org/Web tool<Example 202 Additional>
![Page 24: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/24.jpg)
Android apps
- DexDump- Dexplorer
![Page 25: Inside Dvm tools](https://reader036.vdocuments.mx/reader036/viewer/2022062513/55518086b4c90596028b4806/html5/thumbnails/25.jpg)
Hello World java
javac HelloWorld.javaF:\android\sdk\build-tools\17.0.0\dx.bat --dex --
output="F:\adb\Example 200 Additional Smali\classes.dex" HelloWorld.class
zip HelloWorld.zip classes.dexF:\adb\adb.exe push HelloWorld.zip /sdcard/F:\adb\adb.exe shell mkdir /sdcard/dalvik-cacheF:\adb\adb.exe shell ANDROID_DATA=/sdcard
dalvikvm -cp /sdcard/HelloWorld.zip HelloWorld