# DAMN VULNERABLE WEB APPLICATION
Damn Vulnerable Web Application (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goal is to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and to aid both students & teachers to learn about web application security in a controlled class room environment.
The aim of DVWA is to **practice some of the most common web vulnerabilities**, with **various levels of difficulty**, with a simple straightforward interface.
Please note, there are **both documented and undocumented vulnerabilities** with this software. This is intentional. You are encouraged to try and discover as many issues as possible.
- - -
## WARNING!
Damn Vulnerable Web Application is damn vulnerable! **Do not upload it to your hosting provider's public html folder or any Internet facing servers**, as they will be compromised. It is recommended using a virtual machine (such as [VirtualBox](https://www.virtualbox.org/) or [VMware](https://www.vmware.com/)), which is set to NAT networking mode. Inside a guest machine, you can download and install [XAMPP](https://www.apachefriends.org/en/xampp.html) for the web server and database.
### Disclaimer
We do not take responsibility for the way in which any one uses this application (DVWA). We have made the purposes of the application clear and it should not be used maliciously. We have given warnings and taken measures to prevent users from installing DVWA on to live web servers. If your web server is compromised via an installation of DVWA, it is not our responsibility, it is the responsibility of the person/s who uploaded and installed it.
- - -
## License
This file is part of Damn Vulnerable Web Application (DVWA).
Damn Vulnerable Web Application (DVWA) is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Damn Vulnerable Web Application (DVWA) is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Damn Vulnerable Web Application (DVWA). If not, see <http://www.gnu.org/licenses/>.
- - -
## Download
While there are various versions of DVWA around, the only supported version is the latest source from the official GitHub repository. You can either clone it from the repo:
```
git clone https://github.com/digininja/DVWA.git
```
Or [download a ZIP of the files](https://github.com/digininja/DVWA/archive/master.zip).
- - -
## Installation
**Please make sure your config/config.inc.php file exists. Only having a config.inc.php.dist will not be sufficient and you'll have to edit it to suit your environment and rename it to config.inc.php. [Windows may hide the trailing extension.](https://support.microsoft.com/en-in/help/865219/how-to-show-or-hide-file-name-extensions-in-windows-explorer)**
### Installation Videos
- [Installing Damn Vulnerable Web Application (DVWA) on Windows 10](https://www.youtube.com/watch?v=cak2lQvBRAo) [12:39 minutes]
### Windows + XAMPP
The easiest way to install DVWA is to download and install [XAMPP](https://www.apachefriends.org/en/xampp.html) if you do not already have a web server setup.
XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.
XAMPP can be downloaded from:
https://www.apachefriends.org/en/xampp.html
Simply unzip dvwa.zip, place the unzipped files in your public html folder, then point your browser to: `http://127.0.0.1/dvwa/setup.php`
### Linux Packages
If you are using a Debian based Linux distribution, you will need to install the following packages _(or their equivalent)_:
`apt-get -y install apache2 mariadb-server php php-mysqli php-gd libapache2-mod-php`
The site will work with MySQL instead of MariaDB but we strongly recommend MariaDB as it works out of the box whereas you have to make changes to get MySQL to work correctly.
### Database Setup
To set up the database, simply click on the `Setup DVWA` button in the main menu, then click on the `Create / Reset Database` button. This will create / reset the database for you with some data in.
If you receive an error while trying to create your database, make sure your database credentials are correct within `./config/config.inc.php`. *This differs from config.inc.php.dist, which is an example file.*
The variables are set to the following by default:
```php
$_DVWA[ 'db_user' ] = 'dvwa';
$_DVWA[ 'db_password' ] = 'p@ssw0rd';
$_DVWA[ 'db_database' ] = 'dvwa';
```
Note, if you are using MariaDB rather than MySQL (MariaDB is default in Kali), then you can't use the database root user, you must create a new database user. To do this, connect to the database as the root user then use the following commands:
```mysql
mysql> create database dvwa;
Query OK, 1 row affected (0.00 sec)
mysql> create user dvwa@localhost identified by 'p@ssw0rd';
Query OK, 0 rows affected (0.01 sec)
mysql> grant all on dvwa.* to dvwa@localhost;
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
```
### Other Configuration
Depending on your Operating System, as well as version of PHP, you may wish to alter the default configuration. The location of the files will be different on a per-machine basis.
**Folder Permissions**:
* `./hackable/uploads/` - Needs to be writeable by the web service (for File Upload).
* `./external/phpids/0.6/lib/IDS/tmp/phpids_log.txt` - Needs to be writable by the web service (if you wish to use PHPIDS).
**PHP configuration**:
* `allow_url_include = on` - Allows for Remote File Inclusions (RFI) [[allow_url_include](https://secure.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include)]
* `allow_url_fopen = on` - Allows for Remote File Inclusions (RFI) [[allow_url_fopen](https://secure.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen)]
* `safe_mode = off` - (If PHP <= v5.4) Allows for SQL Injection (SQLi) [[safe_mode](https://secure.php.net/manual/en/features.safe-mode.php)]
* `magic_quotes_gpc = off` - (If PHP <= v5.4) Allows for SQL Injection (SQLi) [[magic_quotes_gpc](https://secure.php.net/manual/en/security.magicquotes.php)]
* `display_errors = off` - (Optional) Hides PHP warning messages to make it less verbose [[display_errors](https://secure.php.net/manual/en/errorfunc.configuration.php#ini.display-errors)]
**File: `config/config.inc.php`**:
* `$_DVWA[ 'recaptcha_public_key' ]` & `$_DVWA[ 'recaptcha_private_key' ]` - These values need to be generated from: https://www.google.com/recaptcha/admin/create
### Default Credentials
**Default username = `admin`**
**Default password = `password`**
_...can easily be brute forced ;)_
Login URL: http://127.0.0.1/login.php
_Note: This will be different if you installed DVWA into a different directory._
- - -
## Docker Container
- [dockerhub page](https://hub.docker.com/r/vulnerables/web-dvwa/)
`docker run --rm -it -p 80:80 vulnerables/web-dvwa`
Please ensure you are using aufs due to previous MySQL issues. Run `docker info` to check your storage driver. If it isn't aufs, please change it as such. There are guides for each operating system on how to do that, but they're quite different so we won't cover that here.
- - -
## Troubleshooting
These assume you are on a Debian based distro, such as Debian, Ubuntu and Kali. For other distros, follow along, but update the command where appropriate.
### "Access denied" running setup
If you see the following when running the
用Burp对DVWA重放爆破攻击文章的配套资源
需积分: 0 74 浏览量
更新于2023-05-26
收藏 87.53MB RAR 举报
在IT安全领域,尤其是Web应用安全测试中,Burp Suite是一款强大的工具,它被广泛用于进行漏洞检测和攻击模拟。本篇文章的配套资源是针对DVWA(Damn Vulnerable Web Application)进行重放爆破攻击的一个实践教程。DVWA是一个开源的安全学习平台,旨在帮助安全专业人员和开发人员了解常见Web漏洞并进行实战演练。
我们来了解一下Burp Suite。它是一个集成化的平台,包含了多种模块,如拦截代理、扫描器、入侵者、比较器等,适用于全面的Web应用安全测试。其中,拦截代理(Proxy)可以捕获和修改HTTP/HTTPS流量,这对于重放攻击和爆破攻击至关重要。重放攻击是将之前捕获的合法请求数据包再次发送,以尝试欺骗系统;而爆破攻击则是通过大量尝试不同的参数组合,以期望找到有效的登录凭据或其他敏感信息。
在本套资源中,火狐浏览器(Firefox)被推荐使用,因为它的扩展支持与Burp Suite的集成非常好,允许我们将浏览器的网络流量直接路由到Burp代理。安装Burp Suite的扩展后,配置火狐的网络设置,将代理设置为Burp Suite的监听地址,这样就可以监控和操作所有通过浏览器发出的网络请求。
PHPStudy是一款集成了多种PHP环境的开发工具,它包含了Apache服务器和MySQL数据库,方便我们在本地搭建DVWA。安装PHPStudy后,启动服务,将DVWA的源代码导入到相应的Web根目录,通过浏览器访问即可运行DVWA应用。这使得我们能够在可控的环境中模拟真实世界的攻击场景。
对于DVWA,它设计了一系列的安全级别,每个级别都包含了不同类型的漏洞,例如SQL注入、XSS跨站脚本、CSRF跨站请求伪造等。重放爆破攻击通常针对的是认证或授权过程,例如密码重置功能、登录接口等。在DVWA中,我们可以选择合适的漏洞场景,如弱口令或验证码绕过,利用Burp Suite来捕获合法请求,然后通过篡改参数,进行爆破尝试。
具体操作步骤包括:
1. 使用火狐浏览器访问DVWA并触发目标请求。
2. 在Burp Suite的拦截代理中捕获请求。
3. 编辑请求,可能需要修改参数值或添加额外的头信息。
4. 将修改后的请求重放到服务器,观察响应以判断是否成功。
5. 如果是爆破攻击,可能需要编写自动化脚本来快速尝试大量可能的组合。
这个配套资源提供了进行Web安全测试的完整环境,包括了工具、靶场和实际操作的步骤。通过这个实践,你可以加深对重放和爆破攻击的理解,掌握Burp Suite的使用技巧,并提高对Web应用安全问题的识别和防护能力。

hello-bug1
- 粉丝: 6
最新资源
- 本库是个基于python的工具集,用于记录数据到文件。 使用方便,代码简洁, 是一个可靠、省心且实用的工具。 支持多线程同时写入。.zip
- 本科毕业设计,基于python的图像复制粘贴篡改识别软件。.zip
- 本项目是基于计算机视觉的端到端交通路口智能监控系统.采用的设计架构由SRS
- 碧蓝航线ios平台自动脚本,基于python+opencv+facebook_wda实现.zip
- 毕业设计中基于给定微博数据的反作弊识别,用python开发。.zip
- 毕业设计项目,基于深度学习的实时语义分割算法研究,python实现。.zip
- 对基于python的微博爬虫进行重写,重写语言:java.zip
- 此框架是基于Python+Pytest+Requests+Allure+Yaml+Json实现全链路接口自动化测试
- 程序语言课程作业在线评测平台(实现Java、C、Python的选择、填空、代码题在线评测),基于SpringBoot+Layui+MySQL实现.zip
- 非官方的科大讯飞语音合成(用于朗读,配音场景)python API (基于官方demo增加了:超过2000字上限自动分割再合并音频的功能).zip
- 非官方的简易中国铁路列车运行图系统,基于Python + PyQt5
- 超市POS销售与后台管理系统_商品录入收银业务会员管理进货销售库存人员权限断网收银断电保护_实现超市前台POS销售商品扫描条形码输入收银计算找零打印清单会员折扣累计消费以及后台管理.zip
- 俄罗斯方块闯关版,基于Python实现.zip
- 该项目是基于Python和数据库实现的学生信息管理系统.zip
- 该仓库为agv系统调度软件的前后端实现。项目基于fastapi(python后端框架)和vue2实现了RESTful风格的前后端分离.zip
- 该项目是基于Scrapy框架的Python新闻爬虫,能够爬取网易,搜狐,凤凰和澎湃网站上的新闻,将标题,内容,评论,时间等内容整理并保存到本地.zip