Skip to content

Bitros/apache-log4j-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Apache-Log4j

Apache Log4j 远程代码执行复现 JDK11

攻击者可直接构造恶意远程RMI reference 类, JDK 11默认以下参数false,所以面对漏洞或者bug早点升级jdk才是关键

设置以下参数重现

System.setProperty("com.sun.jndi.rmi.object.trustURLCodebase", "true"); System.setProperty("com.sun.jndi.ldap.object.trustURLCodebase", "true");

编译后 cd target/classes && python -m http.server 8000 --bind 127.0.0.1

修复方案:

(1)修改jvm参数 -Dlog4j2.formatMsgNoLookups=true

(2)修改配置 在应用classpath下添加log4j2.component.properties配置文件,log4j2.formatMsgNoLookups=true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages