Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
permhash — 对 Chromium 扩展和 APK 中声明的权限进行哈希处理的框架,支持对潜在恶意软件包进行聚类、搜寻和关联拓展。 | Kitploit
工具/GitHubGitHub/google/permhash
Android安全静态分析哈希分析恶意软件分析数字取证移动安全
GitHubgoogle/permhash

permhash

对 Chromium 扩展和 APK 中声明的权限进行哈希处理的框架,支持对潜在恶意软件包进行聚类、搜寻和关联拓展。

查看仓库
45108个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

PyPi Version

Permhash 是一个可扩展的框架,用于对应用于基于 Chromium 的浏览器扩展和 APK 的已声明权限进行哈希处理,从而支持类似于导入哈希(import hashing)和富头部哈希(rich header hashing)的聚类、狩猎和枢轴分析(pivoting)。

Permhash 目前能够处理四种类型的文件,但在此基础上还可进一步扩展:

  1. Android 软件包(APK)文件。
  2. 基于 Chromium 的扩展(CRX)文件。
  3. 位于 APK 根目录中的 AXML Android Manifest 文件。
  4. 来自基于 Chromium 扩展的 JSON 扩展 Manifest 文件。

下载与用法

安装 permhash 库

root@kitploit:~
pip install permhash

库用法

导入 permhash

root@kitploit:~
from permhash import functions as permhash

使用 permhash

root@kitploit:~
# The path variable should be the full path to the file you wish to use to calculate the permhash.

# Calculate the permhash for a CRX
ph = permhash.permhash_crx(path)

# Calculate the permhash for a CRX manifest
ph = permhash.permhash_crx_manifest(path)

# Calculate the permhash for an APK
ph = permhash.permhash_apk(path)

# Calculate the permhash for an APK manifest
ph = permhash.permhash_apk_manifest(path)

示例

一个批量计算 permhash 的示例。

root@kitploit:~
import csv
import os
from permhash import functions as permhash


def bulk_permhash_crx_manifest(path, output):
    """
    Computes the permhash from a directory of CRX manifests
    Outputs the results in a csv passed as input

    :param path: The targeted directory
    :type path: string
    :param output:
    :type path: string

    """
    with open(output, mode="w", encoding="utf-8") as results:
        out_writer = csv.writer(
            results, delimiter=",", quotechar='"', quoting=csv.QUOTE_MINIMAL
        )
        out_writer.writerow(["filename", "permhash"])
        for filename in os.listdir(path):
            if path.endswith("/"):
                full_path = path + filename
            else:
                full_path = path + "/" + filename
            calculated_permhash = permhash.permhash_crx_manifest(full_path)
            if calculated_permhash:
                out_writer.writerow([filename, calculated_permhash])

命令行用法

Permhash 也可以作为命令行工具使用。在 --path/-p 开关中提供要计算 permhash 的文件的完整路径,并在 --type/-t 开关中提供所分析文件的类型。该命令将输出 permhash;如果文件无效,则输出 False。

root@kitploit:~
permhash --type crx --path '[PATH TO CRX File]'
permhash --type crx_manifest --path '[PATH TO CRX Manifest File]'
permhash --type apk --path '[PATH TO APK File]'
permhash --type apk_manifest --path '[PATH TO APK Manifest Files]'

更多信息

Permhash

有关更多详细信息,请参阅 Mandiant Permhash 博客。

讨论

可通过 Permhash Google Group 进行讨论。

免责声明

这不是 Google 官方支持的产品。

下载工具