diff --git a/java/vulns/src/main/webapp/001-dir-1.jsp b/java/vulns/src/main/webapp/001-dir-1.jsp index 6c4fa6b..1d1a6d0 100644 --- a/java/vulns/src/main/webapp/001-dir-1.jsp +++ b/java/vulns/src/main/webapp/001-dir-1.jsp @@ -118,16 +118,16 @@ if (dirname != null) { else { %>
正常调用:
-curl '<%=request.getRequestURL() + normal_querystring%>'
+curl '<%=request.getRequestURI() + normal_querystring%>'
不正常调用 - Linux:
-curl '<%=request.getRequestURL() + linux_querystring%>'
+curl '<%=request.getRequestURI() + linux_querystring%>'
不正常调用 - Linux:
不正常调用 - Windows:
-curl '<%=request.getRequestURL() + windows_querystring %>'
+curl '<%=request.getRequestURI() + windows_querystring %>'
<% diff --git a/java/vulns/src/main/webapp/002-file-read.jsp b/java/vulns/src/main/webapp/002-file-read.jsp index 4f58653..cd8ddb2 100644 --- a/java/vulns/src/main/webapp/002-file-read.jsp +++ b/java/vulns/src/main/webapp/002-file-read.jsp @@ -15,18 +15,18 @@正常调用:
-curl '<%=request.getRequestURL() + normal_querystring%>
+ curl '<%=request.getRequestURI() + normal_querystring%>
' 不正常调用: curl '<%=request.getRequestURL() + linux_querystring%>
+ curl '<%=request.getRequestURI() + linux_querystring%>
' 不正常调用: curl '<%=request.getRequestURL() + windows_querystring%>
+ curl '<%=request.getRequestURI() + windows_querystring%>
' Linux 触发: curl '<%=request.getRequestURL() + linux_querystring%>
+ curl '<%=request.getRequestURI() + linux_querystring%>
' 然后检查 /tmp 是否存在 passwd 这个文件 Windows 触发: curl '<%=request.getRequestURL() + windows_querystring%>
+ curl '<%=request.getRequestURI() + windows_querystring%>
' 点击这里执行 calc.exe Linux 触发: curl '<%=request.getRequestURL()+linux_querystring%>' curl '<%=request.getRequestURI()+linux_querystring%>' Windows 触发: curl '<%=request.getRequestURL()+windows_querystring%>' curl '<%=request.getRequestURI()+windows_querystring%>' 语法错误检测: (执行命令: echo 'test' xxxx' ) curl '<%=request.getRequestURL()+error_querystring%>' curl '<%=request.getRequestURI()+error_querystring%>' 正常调用 curl '<%=request.getRequestURL()+normal_querystring%>' curl '<%=request.getRequestURI()+normal_querystring%>' 不正常调用
diff --git a/java/vulns/src/main/webapp/004-command-1.jsp b/java/vulns/src/main/webapp/004-command-1.jsp
index 3c8505f..c6631a7 100644
--- a/java/vulns/src/main/webapp/004-command-1.jsp
+++ b/java/vulns/src/main/webapp/004-command-1.jsp
@@ -28,15 +28,15 @@
}
%>
<%=output %>
diff --git a/java/vulns/src/main/webapp/005-file-write.jsp b/java/vulns/src/main/webapp/005-file-write.jsp
index 72daea0..d089222 100644
--- a/java/vulns/src/main/webapp/005-file-write.jsp
+++ b/java/vulns/src/main/webapp/005-file-write.jsp
@@ -39,8 +39,8 @@ else {
}
%>