当前位置:网站首页>dvwa 通关记录1 - 暴力破解 Brute Force
dvwa 通关记录1 - 暴力破解 Brute Force
2022-08-01 21:46:00 【InfoQ】
Security Level:
low
<?php
if( isset( $_GET[ 'Login' ] ) ) {
// Get username
$user = $_GET[ 'username' ];
// Get password
$pass = $_GET[ 'password' ];
$pass = md5( $pass );
// Check the database
$query = "SELECT * FROM `users` WHERE user = '$user' AND password = '$pass';";
$result = mysqli_query($GLOBALS["___mysqli_ston"], $query ) or die( '<pre>' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)) . '</pre>' );
if( $result && mysqli_num_rows( $result ) == 1 ) {
// Get users details
$row = mysqli_fetch_assoc( $result );
$avatar = $row["avatar"];
// Login successful
echo "<p>Welcome to the password protected area {$user}</p>";
echo "<img src=\"{$avatar}\" />";
}
else {
// Login failed
echo "<pre><br />Username and/or password incorrect.</pre>";
}
((is_null($___mysqli_res = mysqli_close($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res);
}
?>- Proxy 挂代理或者直接用内置浏览器,开拦截
- 随便输入账号密码,点登陆
- Burp中拦截到,发送到Intruder中
- clear掉所有的变量,然后给username,password 挂上变量。
- 接下来重头戏,介绍下Attack Type
- Sniper 人如其名,狙击手模式,一次干一个地方。所以两个变量不适合这种情况,当然了,如果你已知账号或者已知密码,就只加一个变量,用这个模式最合适。此时只需要一个payload。
- Battering Ram 攻城锤模式,只需要一个payload,挂一个字典,你有几个变量就都用同样的值。例如你 字典有一行是 admin ,那么就一定有一条 username=admin&password=admin 的请求放出去。
- Pitchfork 叉子模式(没错就是海王那个叉子),此时需要多个payload,正常我有两个变量,就要两个payload,然后burp会从第一个payload拿出第一个,第二个payload拿出第二个作为参数发出去。所以请求次数是最小的payload的条数。
- Cluster bomb 集束炸弹,这个最暴力,其实就是两个字典的笛卡尔积,也需要多个payload,假设用户名字典有5个,密码有100个,那么就会有500次请求。
- 设置后好之后就可以发动攻击啦。
边栏推荐
猜你喜欢

递归(各经典例题分析)

Raspberry Pi information display small screen, display time, IP address, CPU information, memory information (C language), four-wire i2c communication, 0.96-inch oled screen

Shell编程之条件语句

一个关于操作数据库的建议—用户密码

SOM网络1:原理讲解

基于php在线考试管理系统获取(php毕业设计)

Based on php tourism website management system acquisition (php graduation design)

shell programming conventions and variables

基于php在线音乐网站管理系统获取(php毕业设计)

Getting Started Database Days4
随机推荐
The difference between groupByKey and reduceBykey
模拟数据之mockjs
10 Practical Uses of NFTs (NFT System Development)
SOM Network 2: Implementation of the Code
File operations of WEB penetration
树莓派的信息显示小屏幕,显示时间、IP地址、CPU信息、内存信息(c语言),四线的i2c通信,0.96寸oled屏幕
基于php旅游网站管理系统获取(php毕业设计)
熟悉的朋友
程序员必备的 “ 摸鱼神器 ” 来了 !
scikit-learn no moudule named six
Pagoda application experience
感觉自己好傻
Based on php online learning platform management system acquisition (php graduation design)
Spark cluster construction
Based on php online music website management system acquisition (php graduation design)
long investment career
基于php动漫周边商城管理系统(php毕业设计)
RecycleView的使用
用户体验 | 如何度量用户体验?
Appendix A printf, varargs and stdarg a. 2 use varargs. H to realize the variable argument list