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

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

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

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

工具目录

分类

查看所有分类
Loading categories
log4j2-issue-check — 用于评估 Log4j2 漏洞的演示项目 | CVE-2021-44228 | Kitploit
工具/GitHubGitHub/sandarenu/log4j2-issue-check
漏洞分析代码分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育
GitHubsandarenu/log4j2-issue-check

log4j2-issue-check

用于评估 Log4j2 漏洞的演示项目 | CVE-2021-44228

查看仓库
14年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

评估 Log4Shell:RCE 0-day 问题

该仓库包含评估 Log4j2 问题 CVE-2021-44228 的代码

更多详情

  • https://www.lunasec.io/docs/blog/log4j-zero-day/

如何测试

发送带有查询参数 ${jndi:ldap://127.0.0.1:3089/} 的 GET 请求。

root@kitploit:~
http://localhost:10000/test?userParam=%24%7Bjndi%3Aldap%3A%2F%2F127.0.0.1%3A3089%2F%7D

当发送上述请求时,应用程序会尝试连接到 LDAP URL,由于我的机器上没有运行该服务,因此会打印以下错误。

root@kitploit:~
2021-12-14 09:10:25,055 http-nio-10000-exec-1 WARN Error looking up JNDI resource [ldap://127.0.0.1:3089/]. javax.naming.CommunicationException: 127.0.0.1:3089 [Root exception is java.net.ConnectException: Connection refused (Connection refused)]
	at java.naming/com.sun.jndi.ldap.Connection.<init>(Connection.java:237)
	at java.naming/com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:137)
	at java.naming/com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1610)
	at java.naming/com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2752)
	at java.naming/com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:320)
	at java.naming/com.sun.jndi.url.ldap.ldapURLContextFactory.getUsingURLIgnoreRootDN(ldapURLContextFactory.java:60)
	at java.naming/com.sun.jndi.url.ldap.ldapURLContext.getRootURLContext(ldapURLContext.java:61)
	at java.naming/com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:204)
	at java.naming/com.sun.jndi.url.ldap.ldapURLContext.lookup(ldapURLContext.java:94)
	at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
	at org.apache.logging.log4j.core.net.JndiManager.lookup(JndiManager.java:172)
	at org.apache.logging.log4j.core.lookup.JndiLookup.lookup(JndiLookup.java:56)
	at org.apache.logging.log4j.core.lookup.Interpolator.lookup(Interpolator.java:221)

临时修复

修复 1

如果 log4j-core 版本为 >=2.10,可以通过添加以下 JVM 参数来禁用此 JNDI 查找。

root@kitploit:~
-Dlog4j2.formatMsgNoLookups=true

修复 2

我们可以在 log4j2.xml 文件的日志消息模式中添加 {nolookups}。查看分支 update-log4j2-config 以了解该修复。

永久修复

  • 将 log4j 版本更新到 2.15.0。查看分支 update-log4j-to-2.15.0 中的修复。
下载工具