SQL注入攻击技术(二)---注入分类

一、注入分类

用到网站:http://192.168.18.147:666/pikachu/index.php

 打开burp suite

1、数字型

有注入点就带入注入漏洞进行操作 

mysql> select username,email from member where id=1 or 1=1;(正常SQL语句)                                                                         

2、字符型

正常情况下在数据库中搜索是这样的语句

mysql> select id,email from member where username='vince or 1=1';(or 1=1是万能密码的感觉有木有)

 

3、搜索型

正常情况下在数据库中搜索是这样的语句

mysql> select * from member where username like '%vince%' or 1=1;

搜索都是两边都带%,不加or 1=1的时候只会出现一条数据,加入的话所有的数据都可以显示出来,

在sql server中--是注释,在mysql中#是注释,如果不注释的话就会报错

4、XX型(也叫特殊型)

XX型是由于SQL语句拼接方式不同,注入语句如下:

mysql> select * from member where username=('xx') or 1=1;(其实后面的)

在注入的时候有时候也要看对方的代码是如何写的

看看对方的代码是如何写的

原文地址:https://www.cnblogs.com/1996-11-01-614lb/p/14193927.html