sensepost / kwetza

Python script to inject existing Android applications with a Meterpreter payload.
GNU General Public License v2.0
637 stars 237 forks source link

apk file is not generated #11

Closed romola4 closed 7 years ago

romola4 commented 7 years ago

[+] MMMMMMMM KWETZA [] DECOMPILING TARGET APK [+] ENDPOINT IP: 11X.XX.XX.XX [+] ENDPOINT PORT: 323 Destination directory (/root/Downloads/kwetza-master/sw) already exists. Use -f switch if you want to overwrite it. [+] APKTOOL DECOMPILED SUCCESS [] BYTING COMMS... [] ANALYZING ANDROID MANIFEST [+] TARGET ACTIVIY: com.james.status.activities.SplashActivity [] INJECTING INTO APK... [+] CHECKING IF ADDITIONAL PERMS TO BE ADDED [] INJECTION OF CRAZY PERMISSIONS TO BE DONE! [+] TIME TO BUILD INFECTED APK... [] EXECUTING APKTOOL BUILD COMMAND... W: /root/Downloads/kwetza-master/sw/res/values-v24/styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.OptionsPanel'. W: W: /root/Downloads/kwetza-master/sw/res/values-v24/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.LockScreen'. W: Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4550594108641908121.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 30, --version-name, 3.2, --no-version-vectors, -F, /tmp/APKTOOL4787348994072919752.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/kwetza-master/sw/res, -M, /root/Downloads/kwetza-master/sw/AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:477) at brut.androlib.Androlib.buildResources(Androlib.java:411) at brut.androlib.Androlib.build(Androlib.java:310) at brut.androlib.Androlib.build(Androlib.java:263) at brut.apktool.Main.cmdBuild(Main.java:227) at brut.apktool.Main.main(Main.java:84) Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4550594108641908121.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 30, --version-name, 3.2, --no-version-vectors, -F, /tmp/APKTOOL4787348994072919752.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/kwetza-master/sw/res, -M, /root/Downloads/kwetza-master/sw/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:440) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:463) ... 5 more Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_4550594108641908121.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 30, --version-name, 3.2, --no-version-vectors, -F, /tmp/APKTOOL4787348994072919752.tmp, -0, arsc, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /root/Downloads/kwetza-master/sw/res, -M, /root/Downloads/kwetza-master/sw/AndroidManifest.xml] at brut.util.OS.exec(OS.java:95) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:434) ... 6 more [+] BUILD RESULT ##################################### I: Using Apktool 2.2.2 I: Checking whether sources has changed... I: Smaling smali folder into classes.dex... I: Checking whether resources has changed... I: Building resources...

##################################### [*] EXECUTING JARSIGNER COMMAND... Enter Passphrase for keystore: password [+] JARSIGNER RESULT ##################################### jarsigner: unable to open jar file: /root/Downloads/kwetza-master/sw/dist/sw.apk

#####################################

[+] L00t located at /root/Downloads/kwetza-master/sw/dist/sw.apk

This are the logs created no sw.apk file was created
apktool used : 2.2.2

brompwnie commented 7 years ago

Good day, It seems that apktool is unable to decompile the targeted apk, this occurs occasionally. I recommend running the following apktool commands to help debug this, "apktool d sw.apk" and "apktool d -r sw.apk". If the same error occurs for both commands, then it may be that apktool is unable to be used on the target application thus kwetza will not function correctly.