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

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

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

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

工具目录

分类

查看所有分类
Loading categories
telfhash — ELF文件的符号哈希 | Kitploit
工具/GitHubGitHub/trendmicro/telfhash
哈希分析取证分析恶意软件分析二进制分析
GitHubtrendmicro/telfhash

telfhash

ELF文件的符号哈希

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Trend Micro ELF哈希 (telfhash)

telfhash 是针对 ELF 文件的符号哈希,就像 imphash 是 PE 文件的导入哈希一样。通过 telfhash,你可以根据符号对 ELF 文件进行聚类。这对于对恶意样本进行聚类特别有用。如果样本没有符号,telfhash 会使用其调用地址的目标来模拟一个符号列表。更多信息请参见 资源 部分。

安装

pip

最简单的让 telfhash 工作的方法是通过 pip 安装它:

pip install telfhash

手动

要求

telfhash 在生成哈希时使用 TLSH。为了 telfhash 正常工作,必须在你的系统中安装 TLSH。

你可以从这里安装 TLSH:

  • https://github.com/trendmicro/tlsh/

TLSH git 仓库有关于如何编译和安装 TLSH 二进制文件及库的详细说明。别忘了还要安装 TLSH Python 库。telfhash 使用 TLSH Python 库来生成实际的哈希。

安装

从以下位置克隆 telfhash 仓库:

  • https://github.com/trendmicro/telfhash

使用 setup.py 安装 telfhash 库:

root@kitploit:~
python setup.py install

使用

命令行

如果 telfhash 是通过 python setup.py install 命令安装的,将会提供 telfhash 可执行文件。

root@kitploit:~
$ telfhash -h
usage: telfhash.py [-h] [-g] [-t THRESHOLD] [-r] [-d] files [files ...]

positional arguments:
  files                 Target ELF file(s). Accepts wildcards

optional arguments:
  -h, --help            show this help message and exit
  -g, --group           Group the files according to how close their telfhashes
                        are
  -t THRESHOLD, --threshold THRESHOLD
                        Minimum distance betweeen telfhashes to be considered
                        as related. Only works with -g/--group. Defaults to 50
  -r, --recursive       Deep dive into all the subfolders. Input should be a
                        folder
  -d, --debug           Print debug messages

$ telfhash /bin/trace*
/bin/tracepath    09d097025c0b40af18cb0c08ac3f2f5df100d850483bc1404f108809113290a2d6ae4f
/bin/traceroute   65e02002d9b9552f56f35e709caf6fa57115f841e83b87148f04b592c023542ed0549f
/bin/traceroute6  65e02002d9b9552f56f35e709caf6fa57115f841e83b87148f04b592c023542ed0549f

$ telfhash -g /sbin/ip*
/sbin/ip                        33c15268ac66484d58be0e68ed2d7e68c25b5b97edf02b10dff4c412d2c3586725f01b
/sbin/ip6tables                 083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/ip6tables-legacy          083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/ip6tables-legacy-restore  083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/ip6tables-legacy-save     083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/ip6tables-restore         083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/ip6tables-save            083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/ipmaddr                   7dc08c0a6622ad4b2af66e781c3322864248e073b06ccb56aaaf854088062091c6011c
/sbin/ipset                     e4a0029085e66bce4ed2146959136540409454e38028d780613002a6d70154d5023d6a
/sbin/iptables                  083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/iptables-apply            -
/sbin/iptables-legacy           083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/iptables-legacy-restore   083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/iptables-legacy-save      083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/iptables-restore          083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/iptables-save             083169fc5722ee8734bfb9357cf23b41a5092db0b9a8d0a95d08d743464636ca143c66
/sbin/iptstate                  1ef02223f4318ca385920c9910f975a131268721a1dbb80dff038e758bad21e65718cf
/sbin/iptunnel                  d5c08c4aa612ad5b3ae72e781c3330868248e0b2b05c8b52aa2a854089062090c60518

Group 1:
    /sbin/ipmaddr
    /sbin/iptunnel
Group 2:
    /sbin/ip6tables
    /sbin/ip6tables-legacy
    /sbin/ip6tables-legacy-restore
    /sbin/ip6tables-legacy-save
    /sbin/ip6tables-restore
    /sbin/ip6tables-save
    /sbin/iptables
    /sbin/iptables-legacy
    /sbin/iptables-legacy-restore
    /sbin/iptables-legacy-save
    /sbin/iptables-restore
    /sbin/iptables-save
Cannot be grouped:
    /sbin/iptstate
    /sbin/ipset
    /sbin/ip

Python 模块

root@kitploit:~
>>> import telfhash
>>> import pprint
>>> telfhash.telfhash("/bin/ping")
{'file': '/bin/ping', 'telfhash': '6901d303587a847f9aa30ce44c3f3f5c6101e9525eb2d354cf1297948022b40aa4a99f', 'msg': ''}
>>>
>>> results = telfhash.telfhash("telfhash/tests/samples/hdumps/*")
>>> groups = telfhash.group(results)
>>> pprint.pprint(groups)
{'grouped': (('telfhash/tests/samples/hdumps/hdump_32_so_stat_stripped',
              'telfhash/tests/samples/hdumps/hdump_32_stat_stripped'),
             ('telfhash/tests/samples/hdumps/hdump_64_so_stat_stripped',
              'telfhash/tests/samples/hdumps/hdump_64_stat_stripped'),
             ('telfhash/tests/samples/hdumps/hdump_32_so_stat',
              'telfhash/tests/samples/hdumps/hdump_32_stat',
              'telfhash/tests/samples/hdumps/hdump_64_so_stat',
              'telfhash/tests/samples/hdumps/hdump_64_stat',
              'telfhash/tests/samples/hdumps/hdump_static'),
             ('telfhash/tests/samples/hdumps/hdump',
              'telfhash/tests/samples/hdumps/hdump32',
              'telfhash/tests/samples/hdumps/hdump_32_dyn',
              'telfhash/tests/samples/hdumps/hdump_32_dyn_stripped',
              'telfhash/tests/samples/hdumps/hdump_32_so_dyn',
              'telfhash/tests/samples/hdumps/hdump_32_so_dyn_stripped',
              'telfhash/tests/samples/hdumps/hdump_64_dyn',
              'telfhash/tests/samples/hdumps/hdump_64_dyn_stripped',
              'telfhash/tests/samples/hdumps/hdump_64_so_dyn',
              'telfhash/tests/samples/hdumps/hdump_64_so_dyn_stripped',
              'telfhash/tests/samples/hdumps/hdump_dynamic',
              'telfhash/tests/samples/hdumps/hdump_stripped')),
 'nogroup': []}
>>>
>>> telfhash.telfhash("samples/LinuxMoose/LinuxMoose.arm7.2015.0.bin")
{'file': 'samples/LinuxMoose/LinuxMoose.arm7.2015.0.bin', 'telfhash': None, 'msg': 'No symbols found'}
>>> telfhash.telfhash("/bin/ls", "/bin/lsattr")
[{'file': '/bin/ls', 'telfhash': '1ff0994248230af71762c8b15c0533da9a208b2656e5bf302f1985d04e2a5be779284f', 'msg': ''}, {'file': '/bin/lsattr', 'telfhash': '69c08017dd0fe4f35dd90d589c07380ae7dee06057b9d7400d3c46c1755058c5d5555d', 'msg': ''}]

资源

  • 相似性将威胁狩猎提升到新水平 - VirusTotal / Trend Micro / Trinity Cyber - 2020年11月25日
  • VirusTotal 现已支持 Trend Micro ELF 哈希 - Trend Micro Research - 2020年10月13日
  • 使用 Trend Micro ELF 哈希(又名 telfash)对 Linux IoT 恶意软件样本进行分组 - Trend Micro 博客 - 2020年4月20日
下载工具