appshark is a free, open source compliance & risk management project written in Kotlin and released under Apache-2.0. It has 1,751 GitHub stars, 181 forks and 17 open issues, and was last pushed 42 hours ago. On this registry it ranks #35 of 45 tracked projects in Compliance & Risk Management, with 5 head-to-head comparisons available.

What is appshark?

What it is

AppShark is static taint analysis platform for Android app. It scans APK file for vulnerability and compliance problem. It lives in Android security and compliance ecosystem. Analysis output reports app package, permissions, components, deep link, HTTP API, JS bridge, and native interface data. It finds risk paths by taint analysis. It is written in Kotlin and licensed under Apache-2.0.

AppShark solves concrete problem of checking Android application binary with rule-based static analysis. It gives local analysis workflow: configure target APK, choose rules, run Java command, inspect JSON result. Result includes source, sink, entry method, target path, hash, possibility, and report URL for risk such as unZipSlip.

Key capabilities

  • Static taint analysis platform scans Android APK for vulnerability and compliance issue.
  • Rule engine reads JSON rule files from rulePath and lets user select rules by comma-separated list.
  • Configuration supports apkPath, out, rules, rulePath, maxPointerAnalyzeTime, and debugRule, with timeout for analysis started from entry point and rule logging.
  • Analysis can record app metadata, permissions, components, JS native interface, deep link, HTTP API, and JS bridge information.
  • Output file results.json stores risk category, model, name, possibility, wiki, deobf APK path, and vulnerability details.
  • Each vulnerability record can include source, sink, entry method, target path, hash, position, and generated report URL.
  • Local UI and server are available as auxiliary testing tools for examining results.

Who uses it and how

  • Security and compliance teams scan APK file by building AppShark from source and running jar with JSON5 config.
  • Compliance teams use it to find compliance problems with rule-based analysis.
  • Researchers or engineers write custom rules through how to write rules documentation and enable debugRule to log rule execution.
  • Teams use local UI or server only for testing result, not production deployment.
  • Reviewers inspect results.json and generated HTML report URLs to trace source-to-sink paths.

Getting started

Install JDK 11, because README says other LTS versions JDK 8 and JDK 16 fail due dependency compatibility. Build with ./gradlew build -x test, then run java -jar build/libs/AppShark-0.1.2-all.jar config/config.json5.

When to use it — and when not to

Use AppShark when need local static taint analysis of Android APK, custom rule checking, and source-to-sink evidence for compliance or security review. Do not use UI or server in production, because README says auxiliary testing tool only for local testing. Do not expect packaged Docker image, hosted service, database, storage, or SMTP setup, because README only gives JDK 11, Gradle build, jar run, and local config file.

project readme (upstream, from github) — read inline

Document Index

AppShark

Appshark is a static taint analysis platform to scan vulnerabilities in an Android app.

Prerequisites

Appshark requires a specific version of JDK -- JDK 11. After testing, it does not work on other LTS versions, JDK 8 and JDK 16, due to the dependency compatibility issue.

Building/Compiling AppShark

We assume that you are working in the root directory of the project repo. You can build the whole project with the gradle tool.

$ ./gradlew build  -x test 

After executing the above command, you will see an artifact file AppShark-0.1.2-all.jar in the directory build/libs.

Running AppShark

Like the previous step, we assume that you are still in the root folder of the project. You can run the tool with

$ java -jar build/libs/AppShark-0.1.2-all.jar  config/config.json5

The config.json5 has the following configuration contents.

{
  "apkPath": "/Users/apks/app1.apk"
} 

Each JSON has these basic field.

  • apkPath: the path of the apk file to analyze
  • out: the path of the output directory
  • rules: specifies the rules, split by ,. Default is all *.json files in the $rulePath directory
  • rulePath: specifies the rule's parent directory, default is ./config/rules
  • maxPointerAnalyzeTime: the timeout duration in seconds set for the analysis started from an entry point
  • debugRule: specify the rule name that enables logging for debugging

For more config field, please visit net.bytedance.security.app.ArgumentConfig

If you provide a configuration JSON file which sets the output path as out in the project root directory, you will find the result file out/results.json after running the analysis.

Interpreting the Results

Below is an example of the results.json.

{
  "AppInfo": {
    "AppName": "test",
    "PackageName": "net.bytedance.security.app",
    "min_sdk": 17,
    "target_sdk": 28,
    "versionCode": 1000,
    "versionName": "1.0.0"
  },
  "SecurityInfo": {
    "FileRisk": {
      "unZipSlip": {
        "category": "FileRisk",
        "detail": "",
        "model": "2",
        "name": "unZipSlip",
        "possibility": "4",
        "vulners": [
          {
            "details": {
              "position": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolderFix1(java.lang.String,java.lang.String)>",
              "Sink": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolderFix1(java.lang.String,java.lang.String)>->$r31",
              "entryMethod": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void f()>",
              "Source": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolderFix1(java.lang.String,java.lang.String)>->$r3",
              "url": "/Volumes/dev/zijie/appshark-opensource/out/vuln/1-unZipSlip.html",
              "target": [
                "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolderFix1(java.lang.String,java.lang.String)>->$r3",
                "pf{obj{<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolderFix1(java.lang.String,java.lang.String)>:35=>java.lang.StringBuilder}(unknown)->@data}",
                "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolderFix1(java.lang.String,java.lang.String)>->$r11",
                "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolderFix1(java.lang.String,java.lang.String)>->$r31"
              ]
            },
            "hash": "ec57a2a3190677ffe78a0c8aaf58ba5aee4d2247",
            "possibility": "4"
          },
          {
            "details": {
              "position": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolder(java.lang.String,java.lang.String)>",
              "Sink": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolder(java.lang.String,java.lang.String)>->$r34",
              "entryMethod": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void f()>",
              "Source": "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolder(java.lang.String,java.lang.String)>->$r3",
              "url": "/Volumes/dev/zijie/appshark-opensource/out/vuln/2-unZipSlip.html",
              "target": [
                "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolder(java.lang.String,java.lang.String)>->$r3",
                "pf{obj{<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolder(java.lang.String,java.lang.String)>:33=>java.lang.StringBuilder}(unknown)->@data}",
                "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolder(java.lang.String,java.lang.String)>->$r14",
                "<net.bytedance.security.app.pathfinder.testdata.ZipSlip: void UnZipFolder(java.lang.String,java.lang.String)>->$r34"
              ]
            },
            "hash": "26c6d6ee704c59949cfef78350a1d9aef04c29ad",
            "possibility": "4"
          }
        ],
        "wiki": "",
        "deobfApk": "/Volumes/dev/zijie/appshark-opensource/app.apk"
      }
    }
  },
  "DeepLinkInfo": {
  },
  "HTTP_API": [
  ],
  "JsBridgeInfo": [
  ],
  "BasicInfo": {
    "ComponentsInfo": {
    },
    "JSNativeInterface": [
    ]
  },
  "UsePermissions": [
  ],
  "DefinePermissions": {
  },
  "Profile": "/Volumes/dev/zijie/appshark-opensource/out/vuln/3-profiler.json"
}

License

AppShark is licensed under the APACHE LICENSE, VERSION 2.0

Security Notice

UI/Server is an auxiliary testing tool that should not be used in production environments and can only be deployed for local testing.

Contact Us

Lark

Frequently asked questions

Is appshark free to use?

appshark is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does appshark do?

Appshark is a static taint analysis platform to scan vulnerabilities in an Android app.

What is appshark written in?

appshark is primarily written in Kotlin. Its source is publicly available at https://github.com/bytedance/appshark, and it has 1,751 GitHub stars.