appshark

bytedanceApache-2.0活跃维护

字节跳动开源的 Android 静态污点分析平台,用于扫描 App 中的隐私合规与安全漏洞,适合上线前的自动化检测。

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

v0.1.2发布于 2022-09-22 10:03 UTC1,754star181fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
./gradlew build -x test
java -jar build/libs/AppShark-0.1.2-all.jar config/config.json5
硬件要求按 README 说明

README 未说明硬件要求,仅要求 JDK 11 环境

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

字节开源的 Android 应用静态污点分析平台,用于扫描 APK 中的安全漏洞

字节跳动开源的 Android 静态污点分析平台,用于扫描 App 中的隐私合规与安全漏洞,适合上线前的自动化检测。

核心能力

  • 基于静态污点分析追踪 Source 到 Sink 的数据流
  • 用 JSON5 配置 apkPath、规则目录与单入口分析超时
  • 内置 unZipSlip 等文件风险规则,支持自定义规则
  • 输出 results.json 并生成带调用链的 HTML 漏洞报告
  • 可提取组件、权限、DeepLink 与 JSBridge 等基础信息

容易踩的坑

必须使用 JDK 11,JDK 8 和 JDK 16 等其它 LTS 版本因依赖兼容问题无法运行;运行前需在 config.json5 中填好 apkPath,否则无输入可分析;README 提示 UI/Server 仅为本地辅助测试工具,不可用于生产环境

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

3 个版本v0.1.2
  1. v0.1.2最新正式版2022-09-22 · 2022-09-22 10:03 UTC

    fix problems running on windows.

  2. v0.1.1version 0.1.12022-09-16 · 2022-09-16 13:53 UTC
    查看更新说明
    • add APIMode
    • add rule camile.json
  3. 0.1appshark v0.12022-09-02 · 2022-09-02 03:00 UTC
    查看更新说明

    It's the first release of appshark , see startup for instructions on how to use it.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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