0
点赞
收藏
分享

微信扫一扫

【愚公系列】2021年12月 攻防世界-简单题-WEB-009(xff_referer)

苦茶如歌 2022-01-31 阅读 45

文章目录

  • 一、xff_referer
  • 二、使用步骤
  • 1.点击获取在线场景
  • 2.X-Forwarded-For
  • 总结

一、xff_referer

题目链接:https://adworld.xctf.org.cn/task/task_list?type=web&number=3&grade=0&page=1

二、使用步骤

1.点击获取在线场景

【愚公系列】2021年12月 攻防世界-简单题-WEB-009(xff_referer)_css

2.X-Forwarded-For

【愚公系列】2021年12月 攻防世界-简单题-WEB-009(xff_referer)_前端_02

在burpsuit中添加请求头:X-Forwarded-For: 123.123.123.123

【愚公系列】2021年12月 攻防世界-简单题-WEB-009(xff_referer)_css_03

返回

【愚公系列】2021年12月 攻防世界-简单题-WEB-009(xff_referer)_css_04

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

【愚公系列】2021年12月 攻防世界-简单题-WEB-009(xff_referer)_前端_05

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}

总结

  • burpsuit
  • Referer
  • X-Forwarded-For
举报

相关推荐

0 条评论