S2-045漏洞利用工具&解决方案
2024-08-28 04:20:10
简单的重复造一个轮子,漏洞危害蛮大的
影响版本:Struts 2.3.5 - Struts 2.3.31,Struts 2.5 - Struts 2.5.10
仅供学习测试使用,严禁非法操作!
修复建议:
1.很官方的解释 升级struts2版本
2.做过滤器
获取Content-Type的值,如果包含了某些特征进行过滤pass(治标不治本,有被绕过的可能) //当时写的也被证实了,确实存在绕过S2-046,所以大家尽量升级。
类似:(网上随意找,仅供参考思路)
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,FilterChain chain) throws ServletException, IOException {
String contentType=request.getContentType();
if(contentType!=null&&contentType.indexOf("ognl")!=-1){ //特征字符
System.out.println(contentType);
return;
}else{
chain.doFilter(request, response);
}
}
最新文章
- web api添加拦截器
- springmvc:jsp fmt标签格式化Date时间,格式化后可以用于页面展示
- XCodeGhost 笔记
- StgCreateDocfileOnILockBytes复合文档
- BZOJ3173 TJOI2013最长上升子序列(Treap+ZKW线段树)
- Source not found The JAR file …has no source attachment.
- sunlime操作
- 无法关闭的QT程序(覆盖closeEvent,新建QProcess并脱离关系)
- QT皮肤框架-TQUI
- 新手必看:如何快速看懂VC++项目
- Bash shell编程的语法知识点(1)
- java中的stream的泛型方法的使用示例
- laravel----------Client error: `POST http://47.98.116.219/oauth/token` resulted in a `401 Unauthorized` response: {";error";:";invalid_client";,";message";:";Client authentication failed";}
- java 反射简说
- 如何理解Minkowski不等式
- shell编程之函数
- Visual Studio 2013编辑器+SourceTree代码管理工具及扩展工具
- itertools库中product函数用法 (即可以随机出所有组合,因果图那样的)
- 使用Python实时获取cmd的输出
- 配置caffe过程中,生成解决方案出错。无法打开包括文件: “gpu/mxGPUArray.h”