草庐IT

struts2绕过waf读写文件及另类方式执行命令

之前碰到过好几次Struts2,还都是016,项目、众测都遇到过,每次都只是证明了一下存在,由于waf的存在,没有深入去利用,这里简单的记录下。0x01背景xray或者Struts2漏扫可以扫到网站存在Struts2漏洞但是执行命令会发现直接ConnectionReset,很明显是被waf拦截了0x02探究waf规则一个一个删除关键字,发现拦截的关键字有三个:Runtime、dispatcherRuntime很熟悉,执行命令一般都用这个,拦截了这个关键字,执行命令还是比较困难的dispatcher比较陌生,查了资料以后发现是读取Struts2的请求对象中的关键字getRealPath字面意思,

Java Struts2系列的XSS漏洞(S2-002)

0x01前言复现一下S2-002的洞0x02S2-002漏洞简介Struts2-002 是一个 XSS 漏洞,该漏洞发生在 s:url 和 s:a 标签中,当标签的属性 includeParams=all 时,即可触发该漏洞。漏洞影响版本Struts2.0.0-Struts2.1.8.10x03环境搭建如果不想手动搭建的话,环境我已经配好了 https://github.com/Drun1baby/JavaSecurityLearning/tree/main/JavaSecurity/Struts2/S2-002AndS2-006因为s2-002的洞是一个XSS,与处理的Action没有任何关

Java Struts2系列的XSS漏洞(S2-002)

0x01前言复现一下S2-002的洞0x02S2-002漏洞简介Struts2-002 是一个 XSS 漏洞,该漏洞发生在 s:url 和 s:a 标签中,当标签的属性 includeParams=all 时,即可触发该漏洞。漏洞影响版本Struts2.0.0-Struts2.1.8.10x03环境搭建如果不想手动搭建的话,环境我已经配好了 https://github.com/Drun1baby/JavaSecurityLearning/tree/main/JavaSecurity/Struts2/S2-002AndS2-006因为s2-002的洞是一个XSS,与处理的Action没有任何关

关于struts2:Spring Security Method Level Security Annotations NOT working

SpringSecurityMethodLevelSecurityAnnotationsNOTworking我正在使用Struts2SpringSecurity3制作一个简单的Web应用程序。我想使用Pre-PostAnnotations来实现方法级别的安全性。但是注释不起作用。这是我的web.xml1234567891011121314151617181920212223242526272829303132333435 MyCustomSpringSecurity contextConfiguration/WEB-INF/applicationContext.xml    org.sprin

关于struts2:Spring Security Method Level Security Annotations NOT working

SpringSecurityMethodLevelSecurityAnnotationsNOTworking我正在使用Struts2SpringSecurity3制作一个简单的Web应用程序。我想使用Pre-PostAnnotations来实现方法级别的安全性。但是注释不起作用。这是我的web.xml1234567891011121314151617181920212223242526272829303132333435 MyCustomSpringSecurity contextConfiguration/WEB-INF/applicationContext.xml    org.sprin