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

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

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

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

工具目录

分类

查看所有分类
Loading categories
Uchihash — 一个用于处理恶意软件嵌入哈希的小型实用工具。 | Kitploit
工具/GitHubGitHub/n1ght-w0lf/uchihash
哈希分析逆向工程脚本与自动化恶意软件分析二进制分析
GitHubn1ght-w0lf/uchihash

Uchihash

一个用于处理恶意软件嵌入哈希的小型实用工具。

查看仓库
527502年前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Uchihash

Uchihash 是一款小工具,可帮助恶意软件分析师节省处理各种嵌入式哈希值的时间,这些哈希值用于多种用途,例如:

  • 动态导入 API(特别是在 shellcode 中)
  • 检查分析工具使用的进程(反分析)
  • 检查 VM 或反病毒/EDR 的产品标识(反分析)

特性

  • 使用标准算法或自定义哈希算法生成哈希值。
  • 生成脚本(IDC、IDAPython、Ghidra)以在分析数据库中注释哈希值。
  • 生成哈希映射并搜索哈希值。

安装

root@kitploit:~
$ git clone https://github.com/N1ght-W0lf/Uchihash.git
$ pip install -r requirements.txt

使用方法

root@kitploit:~
usage: uchihash.py [-h] [--algo ALGO] [--apis] [--keywords] [--list LIST] [--script SCRIPT] [--search SEARCH]
                   [--hashes HASHES] [--idaidc] [--idapython]

options:
  -h, --help       show this help message and exit
  --algo ALGO      Hashing algorithm
  --apis           Calculate hashes of APIs
  --keywords       Calculate hashes of keywords
  --list LIST      Calculate hashes of your own word list
  --script SCRIPT  Script file containing your custom hashing algorithm
  --search SEARCH  Search a JSON File containing hashes mapped to words
  --hashes HASHES  File containing list of hashes to search for
  --idaidc         Generate an IDC script to annotate hash values in IDA Pro
  --idapython      Generate an IDAPython script to annotate hash values in IDA Pro
  --ghidra         Generate a python script to annotate hash values in Ghidra

Examples:
    * python uchihash.py --algo crc32 --apis
    * python uchihash.py --algo murmur3 --list mywords.txt
    * python uchihash.py --script myalgo.py --apis --idapython
    * python uchihash.py --search hashmap.txt --hashes myhashes.txt

注释

  • --algo:可选哈希算法之一

  • --apis:对大量 Windows API 列表进行哈希计算(参见 data/apis_list.txt)

  • --keywords:对恶意软件家族常用的关键字列表进行哈希计算,例如分析工具和 VM/反病毒/EDR 的产品标识(参见 data/keywords_list.txt)

  • --list:单词以换行符分隔(参见 examples/mywords.txt)

  • --script:哈希函数必须命名为 hashme,并接受一个参数,该参数是表示要计算哈希值的字节字符串,返回值必须为十六进制格式(参见 examples/custom_algo.txt)

  • --search:要搜索的文件必须为 JSON 格式(参见 examples/searchme.txt)

  • --hashes:哈希值以换行符分隔,且必须为十六进制格式(参见 examples/myhashes.txt)

更多详情请查看 examples 文件夹

可用的哈希算法

  • md4
  • md5
  • sha1
  • sha224
  • sha256
  • sha384
  • sha512
  • ripemd160
  • whirlpool
  • crc8
  • crc16
  • crc32
  • crc64
  • djb2
  • sdbm
  • loselose
  • fnv1_32
  • fnv1a_32
  • fnv1_64
  • fnv1a_64
  • murmur3

示例

我们以一个真实的恶意软件家族为例,这里使用的是 BuerLoader,它使用哈希值来动态导入 API,并且使用了自定义哈希算法。

首先,我们需要在 Python 中实现该哈希算法:

root@kitploit:~
def ROR4(val, bits, bit_size=32):
    return ((val & (2 ** bit_size - 1)) >> bits % bit_size) | \
           (val << (bit_size - (bits % bit_size)) & (2 ** bit_size - 1))
    
def hashme(s):
    res = 0
    for c in s:
        v3 = ROR4(res, 13)
        v4 = c - 32
        if c < 97:
            v4 = c
        res = v4 + v3
    return hex(res)

然后,使用以下命令计算所有 API 的哈希值:

root@kitploit:~
$ python uchihash.py --script custom_algo.py --apis --idapython

该命令将生成两个文件。第一个文件 "output/search_hashmap.txt" 将哈希值映射到相应的 API 名称,内容如下:

root@kitploit:~
{
  "0x8a8b468c": "LoadLibraryW",
  "0x302ebe1c": "VirtualAlloc",
  "0x1803b7e3": "VirtualProtect",
  "0xe183277b": "VirtualFree",
  "0x24e2968d": "GetComputerNameW",
  "0xab489125": "GetNativeSystemInfo",
  .......
}

第二个文件是 "output/idapython_script.py",你可以在 IDA Pro 中运行此脚本,脚本会向 IDB 中添加哈希注释,如下所示:

下载工具