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

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

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

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

工具目录

分类

查看所有分类
Loading categories
statiStrings — YARA规则字符串统计计算器与恶意软件研究助手 | Kitploit
工具/GitHubGitHub/sh3llyr/statistrings
静态分析恶意软件分析威胁情报
GitHubsh3llyr/statistrings

statiStrings

YARA规则字符串统计计算器与恶意软件研究助手

查看仓库
144455年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

statiStrings

root@kitploit:~
      _        _   _ ____  _        _
  ___| |_ __ _| |_(_) ___|| |_ _ __(_)_ __   __ _ ___
 / __| __/ _` | __| \___ \| __| '__| | '_ \ / _` / __|
 \__ \ || (_| | |_| |___) | |_| |  | | | | | (_| \__ \
 |___/\__\__,_|\__|_|____/ \__|_|  |_|_| |_|\__, |___/
 		       			    |___/
 YARA Rule Strings Statistics Calculator
 Shelly Raban (Sh3llyR), February 2021, Version 0.1
目录
  1. 关于项目
    • 构建工具
  2. 开始使用
    • 安装
  3. 用法
  4. 联系
  5. 致谢

关于项目

statiStrings 是一个用于 YARA 规则的字符串统计计算器。

其目标是辅助恶意软件研究,具体包括:

  • 查找恶意软件样本中常见和独特的字符串
  • 查找干净文件中的常见字符串
  • 通过自动发现恶意软件样本的常见特征来节省时间

该工具帮助你基于自定义的恶意文件和干净文件数据库,编写更精确的 YARA 规则,用于恶意软件检测和威胁狩猎。

对于给定的 YARA 规则和一个文件目录,该工具返回规则中每个字符串在匹配到的文件中的出现频率。

构建工具

  • Python

开始使用

要使用此工具,你必须安装 Python。

安装

安装 yara-python

root@kitploit:~
pip install yara

克隆仓库

root@kitploit:~
git clone https://github.com/Sh3llyR/statiStrings.git

用法

root@kitploit:~
 usage: statiStrings.py [-h] [-y YARA_RULE] [-d TEST_DIR] [-t OUTPUT_TYPE]

 YARA Rule Strings Statistics Generator and Malware Research Helper

 optional arguments:
   -h, --help      show this help message and exit
   -y YARA_RULE    Path to the YARA Rule
   -d TEST_DIR     Path to the Directory of Files to be Scanned
   -t OUTPUT_TYPE  Output Type: s (sum - number of files in which each string
 				  from the YARA rule ocuured) / p (percentage - percent of
 				  files in which each string from the YARA rule ocuured).
 				  Default is s

用法示例

针对恶意批处理脚本中的常见字符串研究: 首先,我编写了一个 YARA 规则,包含恶意脚本中发现的许多命令。条件设置为"any of them"——非常通用。 然后,我使用该规则对我的恶意脚本目录运行此工具(如下例所示)。 最后,我对一个包含干净脚本的目录运行了它。 在分析了干净和恶意脚本的结果后,我能够:

  1. 将 YARA 规则中的字符串分组为可疑的($s_...),例如 tskill,和噪声的($n_...),例如 echo。
  2. 为我的规则创建一个条件,使其能捕获恶意样本但不捕获干净样本,从而最小化误报。
  • python statiStrings.py -y .\batch_commands.yar -d .\batch_samples -t s
  • 结果:
    root@kitploit:~
    {'$s_ren': 1, '$n_set': 8, '$s_mem': 1, '$s_reg_add': 8, '$s_taskkill': 4, '$n_exit': 9, '$s_maybe_block_sites_hosts_file': 1, '$s_move': 2, '$s_attrib': 6, '$n_copy': 6, '$n_start': 10, '$n_type': 7, '$n_echo': 26, '$n_reg': 11, '$s_aes': 1, '$s_cscript': 1, '$s_change_mouse_settings': 1, '$n_net': 3, '$n_find': 6, '$s_infinite_loop': 2, '$s_shutdown': 9, '$n_del': 6, '$n_goto': 12, '$s_generic_bat_maybe_copy_itself': 5, '$n_ipconfig': 2, '$n_maybe_time_change': 5, '$n_system': 2, '$s_tskill': 3, '$s_cpu_damage': 1, '$s_erase': 3, '$s_make_random_folders': 1, '$s_sleep': 4, '$n_bat_maybe_copy_itself': 9}
    Number of files scanned: 157
    
  • python statiStrings.py -y .\batch_commands.yar -d .\batch_samples -t p
  • 结果:
    root@kitploit:~
    {'$s_maybe_block_sites_hosts_file': '0.64%', '$s_sleep': '2.55%', '$s_shutdown': '5.73%', '$s_attrib': '3.82%', '$s_change_mouse_settings': '0.64%', '$n_maybe_time_change': '3.18%', '$s_erase': '1.91%', '$s_move': '1.27%', '$n_net': '1.91%', '$s_aes': '0.64%', '$n_reg': '7.01%', '$n_system': '1.27%', '$n_set': '5.1%', '$s_cscript': '0.64%', '$n_find': '3.82%', '$s_generic_bat_maybe_copy_itself': '3.18%', '$s_cpu_damage': '0.64%', '$n_goto': '7.64%', '$s_tskill': '1.91%', '$s_ren': '0.64%', '$s_mem': '0.64%', '$n_type': '4.46%', '$s_taskkill': '2.55%', '$n_exit': '5.73%', '$n_echo': '16.56%', '$s_infinite_loop': '1.27%', '$n_start': '6.37%', '$s_make_random_folders': '0.64%', '$n_bat_maybe_copy_itself': '5.73%', '$n_ipconfig': '1.27%', '$s_reg_add': '5.1%', '$n_del': '3.82%', '$n_copy': '3.82%'}
    Number of files scanned: 157
    

联系

LinkedIn

项目链接:https://github.com/Sh3llyR/statiStrings

致谢

  • Img Shields
下载工具