Advertisement
0xroot

Untitled

Aug 16th, 2011
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.11 KB | None | 0 0
  1.  
  2. Here are some examples of what the tool can do.
  3.  
  4. 1) It can dump the contents of the DEX file in human-readable form. This tends to result in a lot of output, even when done with relatively small DEX files, so instead of pasting an example here, I'm attaching it ZIPped. It's the classes.dex from one of the FakePlayer variants. The tool even disassembles the bytecode instructions, although doesn't try to produce assemblable source like baksmali. But, unlike with baksmali, you can see the actual code that has produced them.
  5.  
  6. 2) It can list the names of the classes (without anything else) of a DEX file - often this is enough to figure out whether we're dealing with a variant of some known malware or not:
  7.  
  8. c:>dexdump -c RU.apk
  9. RU.apk->classes.dex (FDB84FF8125B3790011B83CC85ADCE16->A386B4B56E3E5DF95F75D3F816DD44FB)
  10. org.me.androidapplication1.DataHelper$OpenHelper
  11. org.me.androidapplication1.DataHelper
  12. org.me.androidapplication1.HelloWorld
  13. org.me.androidapplication1.MoviePlayer
  14.  
  15. 3) It can produce identification data for each class:
  16.  
  17. c:>dexdump RU.apk
  18. RU.apk->classes.dex (FDB84FF8125B3790011B83CC85ADCE16->A386B4B56E3E5DF95F75D3F816DD44FB)
  19. D7DDB1C1 org.me.androidapplication1.DataHelper$OpenHelper
  20. B74CB67C org.me.androidapplication1.DataHelper
  21. A1DC849D org.me.androidapplication1.HelloWorld
  22. CC829975 org.me.androidapplication1.MoviePlayer
  23. Detected: trojan://AndroidOS/FakePlayer.A (Exact)
  24.  
  25. 4) It can run in identification-only mode, just telling you if the sample is identified exactly as something known or not:
  26.  
  27. c:>dexdump -t RU.apk
  28. RU.apk->classes.dex Detected: trojan://AndroidOS/FakePlayer.A (Exact)
  29.  
  30. 5) It can list the names of the malware it is able to identify:
  31.  
  32. c:>dexdump -l
  33. trojan://AndroidOS/Adrd.A
  34. trojan://AndroidOS/Adrd.B
  35. trojan://AndroidOS/Adrd.C
  36. trojan://AndroidOS/Adrd.D
  37. trojan://AndroidOS/Adrd.E
  38. trojan://AndroidOS/Adrd.F
  39. trojan://AndroidOS/Adrd.G
  40. trojan://AndroidOS/Adrd.H
  41. trojan://AndroidOS/Adrd.I
  42. trojan://AndroidOS/DroidKungFu.A
  43. trojan://AndroidOS/DroidKungFu.B
  44. trojan://AndroidOS/DroidKungFu.C
  45. trojan://AndroidOS/DroidKungFu.D
  46. trojan://AndroidOS/DroidKungFu.E
  47. trojan://AndroidOS/DroidKungFu.F
  48. trojan://AndroidOS/FakePlayer.A
  49. trojan://AndroidOS/FakePlayer.B
  50. trojan://AndroidOS/FakePlayer.C
  51. trojan://AndroidOS/FakePlayer.D
  52. trojan://AndroidOS/FakePlayer.E
  53. trojan://AndroidOS/FakePlayer.F
  54. trojan://AndroidOS/GGTracker.A
  55. trojan://AndroidOS/GGTracker.B
  56. trojan://AndroidOS/Lovetrap.A
  57. trojan://AndroidOS/MobileSpy.A
  58. trojan://AndroidOS/MobileSpy.B
  59. trojan://AndroidOS/MobileSpy.C
  60. trojan://AndroidOS/MobileSpy.D
  61. trojan://AndroidOS/MobileSpy.E
  62. trojan://AndroidOS/MobileSpy.F
  63. trojan://AndroidOS/MobileSpy.G
  64. trojan://AndroidOS/MobileSpy.H
  65. trojan://AndroidOS/MobileSpy.I
  66. trojan://AndroidOS/MobileSpy.J
  67. trojan://AndroidOS/MobileSpy.K
  68. trojan://AndroidOS/MobileSpy.L
  69. trojan://AndroidOS/NikiSpy.A
  70. trojan://AndroidOS/TapSnake.A
  71. trojan://AndroidOS/Zitmo.A
  72.  
  73. 6) It can check its database for duplicates:
  74.  
  75. c:>dexdump -k
  76. Database OK.
  77.  
  78. Read the documentation for information where to get the latest official version of the database for it.
  79.  
  80. The syntax of the above commands assumes you're using the script under Windoze. Linux weenies will have to use it as a script file specified when invoking Perl:
  81.  
  82. $ perl -f dexdump.bat [options] arguments...
  83.  
  84.  
  85.  
  86. Here is an example (from the documentation) of how an announcement should look like.
  87.  
  88. One of the Adrd variants in my collection - I'm arbitrarily calling it Adrd.A. It comes in the following Trojanized file:
  89.  
  90. geinimi.apk->classes.dex (5192AD05597E7A148F642BE43F6441F6->5F86B2E2C2D6BCCA1F580F9B5F444F6D)
  91. com.tat.cascadeswallpaper.android.CascadesWallpaperService$CascadesEngine$1
  92. com.tat.cascadeswallpaper.android.CascadesWallpaperService$CascadesEngine
  93. com.tat.cascadeswallpaper.android.CascadesWallpaperService$Config
  94. com.tat.cascadeswallpaper.android.CascadesWallpaperService
  95. com.tat.cascadeswallpaper.android.Log
  96. com.tat.livewallpaper.dandelion.Dandelion$1
  97. com.tat.livewallpaper.dandelion.Dandelion$2
  98. com.tat.livewallpaper.dandelion.Dandelion
  99. com.xxx.yyy.APNMatchTools$APNNet
  100. com.xxx.yyy.APNMatchTools
  101. com.xxx.yyy.ApkReceiver
  102. com.xxx.yyy.BBBB$LogRedirectHandler
  103. com.xxx.yyy.BBBB
  104. com.xxx.yyy.CustomBroadcastReceiver$CustomPhoneStateListener
  105. com.xxx.yyy.CustomBroadcastReceiver
  106. com.xxx.yyy.GZipInputStream
  107. com.xxx.yyy.GZipOutputStream
  108. com.xxx.yyy.MyAlarmReceiver
  109. com.xxx.yyy.MyBoolService
  110. com.xxx.yyy.MyService$APN
  111. com.xxx.yyy.MyService
  112. com.xxx.yyy.MyTools
  113. com.xxx.yyy.NetWorkReceiver
  114. com.xxx.yyy.UpdateHelper
  115. com.xxx.yyy.ZipHelper
  116. com.xxx.yyy.ZipIntMultShortHashMap$Element
  117. com.xxx.yyy.ZipIntMultShortHashMap
  118. com.xxx.yyy.ZipUtil
  119. com.xxx.yyy.adad$1
  120. com.xxx.yyy.adad
  121. com.xxx.yyy.ddda
  122. com.xxx.yyy.qzl$1
  123. com.xxx.yyy.qzl
  124.  
  125. You can see the MD5 hashes of the APK file itself and of the classes,dex file inside. They are between the parentheses.
  126.  
  127. The malware itself resides in the com.xxx.yyy.* subtree of classes. Here is the identification data for it:
  128.  
  129. trojan://AndroidOS/Adrd.A
  130. 7E8BE144 com.xxx.yyy.APNMatchTools$APNNet
  131. 08EA684E com.xxx.yyy.APNMatchTools
  132. A490446D com.xxx.yyy.ApkReceiver
  133. 3902FF59 com.xxx.yyy.BBBB$LogRedirectHandler
  134. 25B4A7E3 com.xxx.yyy.BBBB
  135. 7E4A5825 com.xxx.yyy.CustomBroadcastReceiver$CustomPhoneStateListener
  136. 8D27A0C1 com.xxx.yyy.CustomBroadcastReceiver
  137. 5CAB2F0B com.xxx.yyy.GZipInputStream
  138. 016FD1D4 com.xxx.yyy.GZipOutputStream
  139. DC1AC823 com.xxx.yyy.MyAlarmReceiver
  140. EC712BE9 com.xxx.yyy.MyBoolService
  141. E4EA5C7B com.xxx.yyy.MyService$APN
  142. 092E62A6 com.xxx.yyy.MyService
  143. B6EB634B com.xxx.yyy.MyTools
  144. 9C18FE76 com.xxx.yyy.NetWorkReceiver
  145. E468FE5A com.xxx.yyy.UpdateHelper
  146. 7ED8B247 com.xxx.yyy.ZipHelper
  147. 96088089 com.xxx.yyy.ZipIntMultShortHashMap$Element
  148. B780C5D6 com.xxx.yyy.ZipIntMultShortHashMap
  149. 9C230B97 com.xxx.yyy.ZipUtil
  150. 3CE2C554 com.xxx.yyy.adad$1
  151. 123631AD com.xxx.yyy.adad
  152. 0979EFEB com.xxx.yyy.ddda
  153. 485C4EDE com.xxx.yyy.qzl$1
  154. BE451A3A com.xxx.yyy.qzl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement