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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2021-44228-Scanner — 单一二进制扫描器,用于检测 CVE-2021-44228(Log4Shell),可识别 JAR/WAR/EAR 文件中易受攻击的 log4j 版本,并通过移除 JndiLookup.class 应用缓解补丁。 | Kitploit
工具/GitHubGitHub/municipalparkingservices/cve-2021-44228-scanner
漏洞扫描器漏洞分析漏洞利用供应链安全事件响应日志分析
GitHubmunicipalparkingservices/cve-2021-44228-scanner

CVE-2021-44228-Scanner

单一二进制扫描器,用于检测 CVE-2021-44228(Log4Shell),可识别 JAR/WAR/EAR 文件中易受攻击的 log4j 版本,并通过移除 JndiLookup.class 应用缓解补丁。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
查看仓库
34年前尚未审核
分享

Logpresso Logo

log4j2-scan 是一款用于 CVE-2021-44228 漏洞扫描与缓解修复的单一二进制命令行工具。它还支持嵌套 JAR 文件扫描与修复。

下载

  • log4j2-scan 1.3.1 (Windows x64)
    • 如果原生可执行文件无法使用,请改用 JAR。不支持 32 位。
  • log4j2-scan 1.3.1 (Linux x64)
    • 如果原生可执行文件无法使用,请改用 JAR。不支持 32 位。
  • log4j2-scan 1.3.1 (Any OS, 10KB)

使用方法

直接运行 log4j2-scan.exe 或 log4j2-scan,并指定目标目录路径。

用法

root@kitploit:~
Logpresso CVE-2021-44228 Vulnerability Scanner 1.3.1 (2021-12-15)
Usage: log4j2-scan [--fix] target_path

--fix
        Backup original file and remove JndiLookup.class from JAR recursively.
--force-fix
        Do not prompt confirmation. Don't use this option unless you know what you are doing.
--trace
        Print all directories and files while scanning.
--exclude [path_prefix]
        Exclude specified paths. You can specify multiple --exclude [path_prefix] pairs
--exclude-config [file_path]
        Specify exclude path list in text file. Paths should be separated by new line. Prepend # for comment.
--all-drives
        Scan all drives on Windows
--drives c,d
        Scan specified drives on Windows. Spaces are not allowed here.

在 Windows 上

root@kitploit:~
log4j2-scan [--fix] target_path

在 Linux 上

root@kitploit:~
./log4j2-scan [--fix] target_path

在 UNIX(AIX、Solaris 等)上

root@kitploit:~
java -jar logpresso-log4j2-scan-1.3.1.jar [--fix] target_path

如果添加 --fix 选项,该程序会将存在漏洞的原始 JAR 文件复制为 .bak 文件,并创建不含 org/apache/logging/log4j/core/lookup/JndiLookup.class 条目的新 JAR 文件。在大多数环境中,不会使用 JNDI 查找功能。但是,您必须自行承担使用此选项的风险。在应用补丁之前,需要关闭所有正在运行的 JVM 进程。修复完成后,再启动受影响的 JVM 进程。

如果要自动化修补任务,请使用 --force-fix 选项。使用此选项后,程序将不再提示确认。

如果 JAR 文件中已移除 org/apache/logging/log4j/core/lookup/JndiLookup.class 条目,将显示 (mitigated) 标记。

如果添加 --trace 选项,该程序将打印所有访问过的目录和文件。请仅将此选项用于调试。

在 Windows 上:

root@kitploit:~
CMD> log4j2-scan.exe D:\tmp
[*] Found CVE-2021-44228 vulnerability in D:\tmp\elasticsearch-7.16.0\bin\elasticsearch-sql-cli-7.16.0.jar, log4j 2.11.1
[*] Found CVE-2021-44228 vulnerability in D:\tmp\elasticsearch-7.16.0\lib\log4j-core-2.11.1.jar, log4j 2.11.1
[*] Found CVE-2021-44228 vulnerability in D:\tmp\flink-1.14.0\lib\log4j-core-2.14.1.jar, log4j 2.14.1
[*] Found CVE-2021-44228 vulnerability in D:\tmp\logstash-7.16.0\logstash-core\lib\jars\log4j-core-2.14.0.jar, log4j 2.14.0
[*] Found CVE-2021-44228 vulnerability in D:\tmp\logstash-7.16.0\vendor\bundle\jruby\2.5.0\gems\logstash-input-tcp-6.2.1-java\vendor\jar-dependencies\org\logstash\inputs\logstash-input-tcp\6.2.1\logstash-input-tcp-6.2.1.jar, log4j 2.9.1
[*] Found CVE-2021-44228 vulnerability in D:\tmp\solr-7.7.3\solr-7.7.3\contrib\prometheus-exporter\lib\log4j-core-2.11.0.jar, log4j 2.11.0
[*] Found CVE-2021-44228 vulnerability in D:\tmp\solr-7.7.3\solr-7.7.3\server\lib\ext\log4j-core-2.11.0.jar, log4j 2.11.0
[*] Found CVE-2021-44228 vulnerability in D:\tmp\solr-8.11.0\contrib\prometheus-exporter\lib\log4j-core-2.14.1.jar, log4j 2.14.1
[*] Found CVE-2021-44228 vulnerability in D:\tmp\solr-8.11.0\server\lib\ext\log4j-core-2.14.1.jar, log4j 2.14.1

Scanned 5047 directories and 26251 files
Found 9 vulnerable files
Completed in 0.42 seconds

工作原理

分 5 步运行:

  1. 递归查找所有 .jar、.war、.ear 文件。
  2. 从 JAR 文件中查找 META-INF/maven/org.apache.logging.log4j/log4j-core/pom.properties 条目。
  3. 读取 groupId、artifactId 和 version。
  4. 比较 log4j2 版本并输出存在漏洞的版本。
  5. 如果使用 --fix 选项,备份存在漏洞的文件并对其进行修补。
    • 例如,原始 vulnerable.jar 会被复制为 vulnerable.jar.bak

联系方式

如果您有任何问题或疑问,请在本存储库中创建 issue。

下载工具