Josue87 / apkvuln

Static analysis of APKs with regular expressions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supported Python versions License

ApkVuln

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

With ApkVuln you will obtain the .java files of an APK and they will be analyzed in search of possible vulnerabilities in the code, for it will make use of regular expressions.

Note: The accuracy of the results will depend on the regular expressions. They are customizable.

Dependencies

To run this app you need to install Python 3.6+ and apkx.

For full operation, check signature version and AndroidManifest you need to install: apksigner and aapt

How to extend

Adding a module with our own regular expressions is very easy, just create a .py file in regex, create our class that inherits from Template, for example:

from regex._template import Template

class Regex(Template):

    def __init__(self):
        pattern_list = [r"exprexion1", r"expresion1000"]
        file_type = ["xml", "html", "js", "java", "json"] # specifies the type of files to be applied
        desc = "This is the vulnerability description"
        super(Regex, self).__init__(pattern_list, "Vulnerability Test", file_type, desc)

PoC

Here is an example of the tool analyzing the vulnerable Diva apk

image

Author

Disclaimer!

The software has been developed to check an apk in order to improve its security. The author is not responsible for any illegitimate use.

About

Static analysis of APKs with regular expressions

License:GNU General Public License v3.0


Languages

Language:Python 100.0%