剑庭安
首页
黑客安全首页全部安全栏目 黑客技术黑客技术、渗透测试、漏洞利用工具与教程 安全软件安全工具、扫描器、检测与审计软件 病毒分析恶意软件分析、样本、逆向与沙箱 CTF思路CTF 题目、writeup、解题思路与工具 防护思路防御技术、加固、检测响应与蓝队 红蓝攻防红队攻击模拟、蓝队对抗、攻防演练 漏洞知识库漏洞、CVE、PoC、EXP 与安全研究
逆向|反编译
PHP源码PHP 网站源码、程序、系统 APP源码安卓/iOS APP 源码 ASP源码ASP 网站源码与程序 NET源码.NET 网站源码与系统 小程序源码微信/支付宝小程序源码 Dedecms风格模板Dedecms 织梦风格模板 Empirecms风格模板EmpireCMS 帝国风格模板 Discuz商业模板/插件Discuz 商业模板与插件 WordPress主题/插件WordPress 主题与插件 其它源码、模板其它各类源码与模板 游戏源码游戏源码与引擎项目 加密货币源码加密货币、区块链、钱包、USDT/比特币相关源码与工具 手游源码手机游戏源码、服务端、客户端与引擎项目 传奇源码热血传奇、传奇世界、复古传奇等客户端/服务端/引擎源码 页游源码网页游戏、H5 游戏、浏览器游戏源码 端游源码电脑单机游戏、PC 网游客户端/服务端源码
最新万能免驱动支持所有型号打印机下载程序 日历天气老黄历 · 每天同步真实日期与天气
站长工具站长工具 自助开通会员浏览该分类 其他资源qtziy SEO工具SEO工具 站群源码站群源码 泛程序泛程序 蜘蛛模板蜘蛛模板 蜘蛛池蜘蛛池 外链工具外链工具
搜索 自助开通会员🔓 破甲 API
登录 注册
首页 分类列表 黑客技术 DVWA - Damn Vulnerable Web A…
DVWA - Damn Vulnerable Web Application (DVWA) 黑客技术 点击放大
作者:admin 发布:2026-10-05

DVWA - Damn Vulnerable Web Application (DVWA)

项目说明DAMN WEB APPLICATIONDamn Web Application (DVWA) is a PHP/MariaDB web application that is damn . Its main goal is to be an aid for security profess…
资源可下载 免费下载 0 条讨论
会员资源
开通会员后即可下载全部资源。
登录后开通会员
会员方案
270浏览量
0讨论
2下载链接
可下载资源状态
内容可验证
更新 2026-10-05
人工审核发布
评论区答疑

DVWA - Damn Vulnerable Web Application (DVWA)

DVWA - Damn Vulnerable Web Application (DVWA)

项目说明

DAMN WEB APPLICATION

Damn Web Application (DVWA) is a PHP/MariaDB web application that is damn . Its main goal is to be an aid for security professionals to test their skills and tools in a legal en, help web de 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 en.

The aim of DVWA is to practice some of the most common web , with levels of difficulty, with a simple straightforward interface.
Please note, there are both documented and undocumented with this software. This is intentional. You are encouraged to try and discover as many issues as possible.

  • - -
  • WARNING!

    Damn Web Application is damn ! 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 machine (such as or ), which is set to NAT networking mode. Inside a guest machine, you can download and install XAMPP for the web 服务端 and 数据库.

    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 ha warnings and taken measures to prevent users from installing DVWA on to live web servers. If your web 服务端 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 Web Application (DVWA).

    Damn 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 3 of the License, or
    (at your option) any later .

    Damn 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 ha a copy of the GNU General Public License
    along with Damn Web Application (DVWA). If not, see <

  • - -
  • Internationalisation

    This file is a in multiple languages:

  • Arabic: العربية

  • Chinese: 简体中文

  • French: Français

  • Korean: 한국어

  • Persian: فارسی

  • Polish: Polski

  • Portuguese: Português

  • Spanish: Español

  • Turkish: Türkçe

  • Indonesia: Indonesia

  • :

  • Italian: Italiano

  • Ukrainian: Українська

  • Russian: Русский
  • If you would like to contribute a translation, please submit a PR. Note though, this does not mean just run it through Google Translate and send that in, those will be rejected. Submit your translated by adding a new 'README.xx.md' file where xx is the two-letter 代码 of your desired language (based on ISO 639-1).

  • - -
  • Download

    While there are of D, the only supported is the latest 源码 from the official GitHub repository. You can either clone it from the repo:

    Or download a ZIP of the files.

  • - -
  • Installation

    Automated Installation 🛠️

    Note, this is not an official D, it was written by and is maintained at D. A lot of work went into creating the script and, when it was created, it did not do anything malicious, however it is recommended you review the script before blindly running it on your system, just in case. Please report any bugs to the D repository, not here.

    An automated installation script for DVWA on Debian-based machines, including Kali, Ubuntu, Kubuntu, Linux Mint, Zorin OS... It automatically installs dependencies, configures PHP/Apache, and initializes the 数据库 tables ready for login (admin / password).

    Note: This script requires root pri and is tailored for Debian-based systems. Ensure you are running it as the root user.

    #### Installation Requirements

  • Operating System: Debian-based system (Kali, Ubuntu, Kubuntu, Linux Mint, Zorin OS)

  • Pri: Execute as root user
  • #### Installation Steps

    ##### One-Liner

    This will download an install script written by and run it automatically. This would not be included here if we did not trust the author and the script as it was when we re it, but there is always the chance of someone going rogue, and so if you don't feel safe running someone else's 代码 without re it yourself, follow the manual process and you can review it once downloaded.

    ##### Manually Running the Script

    1. Download the script:

    2. Make the script executable:

    3. Run the script as root:

    Installation

  • Installing DVWA on Kali running in

  • Installing DVWA on Windows using XAMPP

  • Installing Damn Web Application (DVWA) on Windows 10
  • Windows + XAMPP

    The easiest way to install DVWA is to download and install XAMPP if you do not already have a web ser.

    XAMPP is a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package includes the Apache web 服务端, MySQL, PHP, Perl, a FTP 服务端 and phpMyAdmin.

    This video walks you through the installation process for Windows but it should be similar for other OSs.

    Docker

    Thanks to hoang-himself and JGillam, every commit to the master branch causes a Docker image to be built and ready to be pulled down from GitHub Container Registry.

    For more information on what you are getting, you can browse the prebuilt Docker images.

    #### Getting Started

    Prerequisites: Docker and Docker Compose.

  • If you are using Docker Desktop, both of these should be already installed.

  • If you prefer Docker 引擎 on Linux, make sure to follow their installation guide.
  • We provide support for the latest Docker release as shown above.
    If you are using Linux and the Docker package that came with your package manager, it will probably work too, but support will only be best-effort.

    Upgrading Docker from the package manager to upstream requires that you uninstall the old as seen in their manuals for Ubuntu, Fedora and others.
    Your Docker data (containers, images, , etc.) should not be affected, but in case you do run into a problem, make sure to tell Docker and use search engines in the mean time.

    Then, to get started:

    1. Run docker and docker compose to see if you ha and Docker Compose properly installed. You should be able to see their in the output.

    For example:

    If you don't see anything or get a command not found error, follow the prerequisites to setup Docker and Docker Compose.

    2. Clone or download this repository and extract (see Download).
    3. Open a terminal of your choice and change its working directory into this folder (DVWA).
    4. Run docker compose up -d.

    DVWA is now a at .

    Notice that for running DVWA in containers, the web 服务端 is listening on port 4280 instead of the usual port of 80.
    For more information on this decision, see I want to run DVWA on a different port.

    #### Local Build

    If you made local changes and want to build the project from local, go to compose.yml and change pull_policy: always to pull_policy: build.

    Running docker compose up -d should trigger Docker to build an image from local regardless of what is a in the registry.

    See also: pull_policy.

    #### Ser files

    If your making local changes and don't want to build the project for every change :
    1. Go to compose.yml and uncomment :

    2. Run cp config/config.inc.php.dist config/config.inc.php to copy the default config file.
    3. Run docker compose up -d and changes to local files will reflect on the container.

    PHP

    Ideally you should be using the latest stable of PHP as that is the that this app will be de and tested on.

    Support will not be given for anyone trying to use PHP 5.x.

    less than 7.3 ha issues that will cause problems, most of the app will work, but random things may not. Unless you have a very good reason for using such an old , support will not be given.

    Linux Packages

    If you are using a Debian based Linux distribution, you will need to install the following packages _(or their equi)_:

  • apache2

  • libapache2-mod-php

  • mariadb-server

  • mariadb-client

  • php php-mysqli

  • php-gd
  • I would recommend doing an update before this, just so you make sure you are going to get the latest of e.

    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.

    Apache Modules

    If you want to use the API lab you must have the Apache module mod_rewrite enabled. To do this in Linux run:

    And then restart Apache with:

    Files

    If you want to use the API module you will need to install a set of files using Composer.

    First, make sure you ha installed. There seem to be backward compatibility issues so I always get the latest from here:

    Follow the instructions the site gives to get it installed.

    Now go into the /api directory and run:

    If you did not install Composer to the system path, make sure you reference its full location.

    Configurations

    Config File

    D with a dummy copy of its config file which you will need to copy into place and then make the appropriate changes. On Linux, assuming you are in the D, this can be done as follows:

    cp config/config.inc.php.dist config/config.inc.php

    On Windows, this can be a bit harder if you are hiding file extensions, if you are unsure about this, this blog post explains more about it:

    How to Make Windows Show File Extensions

    Config with en

    Instead of modifying the configuration file, you can also set most settings using en . In a Docker or Kubernetes deployment, this allows you to modify the configuration without creating a new Docker image. You'll find the in the config/config.inc.php.dist file.

    If you want to set the default security level to "low", simply add the following line to the compose.yml file:

    Database Setup

    To set up the 数据库, simply click on the Setup DVWA button in the main menu, then click on the Create / Reset Database button. This will create / reset the 数据库 for you with some data in.

    If you receive an error while trying to create your 数据库, make sure your 数据库 credentials are correct within ./config/config.inc.php. _This differs from config.inc.php.dist, which is an example file._

    The are set to the following by default:

    Note, if you are using MariaDB rather than MySQL (MariaDB is default in Kali), then you can't use the 数据库 root user, you must create a new 数据库 user. To do this, connect to the 数据库 as the root user then use the following commands:

    Disable Authentication

    Some tools don't work well with authentication so can't be used with DVWA. To get around this, there is a config option to disable authentication checking. To do this, simply set the following in the config file:

    You will also need to set the security level to one that is appropriate to the testing you want to do:

    In this state, you can access all the features without needing to log in and set any cookies.

    Folder Permissions

  • ./hackable/uploads/ - Needs to be writeable by the web service (for File Upload).
  • PHP Configuration

    On Linux systems, likely found in /etc/php/x.x/fpm/php.ini or /etc/php/x.x/apache2/php.ini.

  • To allow Remote File Inclusions (RFI):

  • - allow_url_include = on [allow_url_include]
    - allow_url_fopen = on [allow_url_fopen]

  • To make sure PHP shows all error messages:

  • - display_errors = on [display_errors]
    - display_startup_errors = on [display_startup_errors]

    Make sure you restart the php service or Apache after making the changes.

    reCAPTCHA

    This is only required for the "Insecure CAPTCHA" lab, if you aren't playing with that lab, you can ignore this section.

    Generated a pair of API keys from <

    These then go in the following sections of ./config/config.inc.php:

  • $_DVWA[ 'recaptcha_public_key' ]

  • $_DVWA[ 'recaptcha_pri' ]
  • Default Credentials

    Default username = admin

    Default password = password

    _...can easily be brute forced ;)_

    Login URL: <

    _Note: This will be different if you installed DVWA into a different directory._

  • - -
  • 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.

    If you'd rather watch a video than read words, the most common issues are covered in the video Fixing D Issues.

    Containers

    #### I want to access the logs

    If you are using Docker Desktop, logs can be accessed from the graphical application.
    Some minor details may change with newer , but the access method should be the same.

    !O of D
    ! DVWA logs

    Logs can also be accessed from the terminal.

    1. Open a terminal and change its working directory to DVWA
    2. Show the merged logs

    In case you want to export the logs to a file, e.g. dvwa.log

    #### I want to run DVWA on a different port

    We don't use port 80 by default for a few reasons:

  • Some users might already be running something on port 80.

  • Some users might be using a rootless container 引擎 (like Podman), and 80 is a pri port (< 1024). Additional configuration (e.g. setting net.ipv4.ip_unpri) is required, but you will have to research on your own.
  • You can expose DVWA on a different port by changing the port binding in the compose.yml file.
    For example, you can change

    to

    DVWA is now accessible at .

    In cases in which you want DVWA to not only be accessible exclusively from your own device, but
    on your local 网络 too (e.g. because you are setting up a test machine for a workshop), you
    can remove the 127.0.0.1: from the port mapping (or replace it with you LAN IP). This way it
    will listen on all a device. The safe default should always be to only listen on your
    local loopback device. After all, it is a damn web application, running on your machine.

    #### DVWA auto starts when Docker runs

    The included compose.yml file automatically runs DVWA and its 数据库 when Docker starts.

    To disable this, you can delete or comment out the restart: unless-stopped lines in the compose.yml file.

    If you want to disable this behavior temporarily, you can run docker compose stop, or use Docker Desktop, find dvwa and click Stop.
    Additionally, you can delete the containers, or run docker compose down.

    Log files

    On Linux systems Apache generates two log files by default, access.log and error.log and on Debian based system these are usually found in /var/log/apache2/.

    When submitting error reports, problems, anything like that, please include at least the last fi from each of these files. On Debian based systems you can get these like this:

    I browsed to the site and got a 404 or Apache2 default page

    Video Help

    If you are having this problem you need to understand file locations. By default, the Apache document root (the place it starts looking for web content) is /var/www/html. If you put the file hello.txt in this directory, to access it you would browse to .

    If you created a directory and put the file in there - /var/www/html/mydir/hello.txt - you would then need to browse to .

    Linux is by default case sensitive and so in the example above, if you tried to browse to any of these, you would get a 404 Not Found:



  • How does this affect DVWA? Most people use git to clone DVWA into /var/www/html, this gives them the directory /var/www/html/DVWA/ with all the D inside it. They then browse to and get either a 404 or the default Apache welcome page. As the files are in DVWA, you must browse to .

    The other common mistake is to browse to which will give a 404 because dvwa is not DVWA as far as Linux directory matching is concerned.

    So after setup, if you try to visit the site and get a 404, think about where you installed the files to, where they are relative to the document root, and what the case of the directory you used is.

    I browsed to the site and got a blank screen

    Video Help

    This is usually one configuration issue hiding another issue. By default, PHP does not display errors, and so if you forgot to turn error display on during the setup process, any other problems, such as failure to connect to the 数据库, will stop the app from loading but the message to tell you what is wrong will be hidden.

    To fix this, make sure you set display_errors and display_startup_errors as covered in PHP Configuration and then restart Apache.

    "Access denied" running setup

    If you see the following when running the setup script it means the username or password in the config file do not match those configured on the 数据库. Video Help

    The error is telling you that you are using the username notdvwa.

    The following error says you ha the config file at the wrong 数据库. Video Help

    It is saying that you are using the user dvwa and trying to connect to the database notdvwa.

    The first thing to do is to double check what you think you put in the config file is what is actually there.

    If it matches what you expect, the next thing to do is to check you can log in as the user on the command line. Assuming you have a 数据库 user of dvwa and a password of p, run the following command:

    _Note: There is no space after the -p_

    If you see the following, the password is correct:

    As you can connect on the command line, it is likely something wrong in the config file, double check that and then raise an issue if you still can't get things working.

    If you see the following, the username or password you are using is wrong. Repeat the 数据库 Setup steps and make sure you use the same username and password throughout the process.

    If you get the following, the user credentials are correct but the user does not ha to the 数据库. Again, repeat the setup steps and check the 数据库 name you are using.

    The final error you could get is this:

    This is not an authentication issue but tells you that the 数据库 服务端 is not running. Start it with the following

    Connection Refused

    Video Help

    An error similar to this one:

    Means your 数据库 服务端 is not running or you've got the wrong IP address in the config file.

    Check this line in the config file to see where the 数据库 服务端 is expected to be:

    Then go to this 服务端 and check that it is running. In Linux this can be done with:

    And you are looking for something like this, the important bit is that it says acti).

    If it is not running, you can start it with:

    Note the sudo and make sure you put your Linux user password in if requested.

    In Windows, check the status in the XAMPP console.

    Unknown authentication method

    With the most recent of MySQL, PHP can no longer talk to the 数据库 in its default configuration. If you try to run the setup script and get the following message it means you ha.

    You have two options, the easiest is to uninstall MySQL and install MariaDB. The following is the official guide from the MariaDB project:

    <

    Alternatively, follow these steps:

    1. As root, edit the following file: /etc/mysql/mysql.conf.d/mysqld.cnf
    1. Under the line [mysqld], add the following:
    default-authentication-plugin=mysql_nati
    1. Restart the database: sudo service mysql restart
    1. Check the authentication method for your 数据库 user:

    1. You'll likely see caching_sha2_password. If you do, run the following command:

    1. Re-running the check, you should now see mysql_nati.

    After all that, the setup process should now work as normal.

    If you want more information see the following page: <

    数据库 Error #2002: No such file or directory

    The 数据库 服务端 is not running. In a Debian based distro this can be done with:

    Errors "MySQL 服务端 has gone away" and "Packets out of order"

    There are a few reasons you could be getting these errors, but the most likely is the of 数据库 服务端 you are running is not compatible with the of PHP.

    This is most commonly found when you are running the latest of MySQL as PHP and it do not get on well. Best advice, ditch MySQL and install MariaDB as this is not something we can support.

    For more information, see:

    <

    Why can't the 数据库 connect on CentOS?

    You may be running into problems with SELinux. Either disable SELinux or run this command to allow the web 服务端 to talk to the 数据库:

    MariaDB Docker does not start

    If you see the following error in the Docker logs while trying to start MariaDB, it is likely due to the host machine not having enough memory. If you are using this in a hosted en, the best solution is to step up a machine size to get more memory and to try again.

    You might also need to add the following line to the section of your compose.yml file:

    Doing that would change the section of a default config file to the following:

    For more information on why this works, see this issue.

    Anything Else

    For the latest troubleshooting information please read both open and closed tickets in the git repo:

    <

    Before submitting a ticket, please make sure you are running the latest of the 代码 from the repo. This is not the latest release, this is the latest 代码 from the master branch.

    If raising a ticket, please submit at least the following information:

  • Operating System

  • The last 5 lines from the web ser log directly after whate you are reporting occurs

  • If it is a 数据库 authentication problem, go through the steps above and screenshot each step. Submit these along with a screenshot of the section of the config file showing the 数据库 user and password.

  • A full description of what is going wrong, what you expect to happen, and what you ha to do to fix it. "login broken" is no enough for us to understand your problem and to help fix it.
  • - -
  • Tutorials

    I am going to try to put together some tutorial that walk through some of the and show how to detect them and then how to exploit them. Here are the ones I've made so far:

    Finding and Exploiting Reflected XSS

  • - -
  • SQLite3 SQL Injection

    _Support for this is limited, before raising issues, please ensure you are prepared to work on debugging, do not simply claim "it does not work"._

    By default, SQLi and Blind SQLi are done against the MariaDB/MySQL 服务端 used by the site but it is possible to switch to do the SQLi testing against SQLite3 instead.

    I am not going to cover how to get SQLite3 working with PHP, but it should be a simple case of installing the php-sqlite3 package and making sure it is enabled.

    To make the switch, simply edit the config file and add or edit these lines:

    By default it uses the file database/sqli.db, if you mess it up, simply copy database/sqli.db.dist over the top.

    The challenges are exactly the same as for MariaDB, they just run against SQLite3 instead.

  • - -
  • 👨‍💻 Contributors
    -----

    Thanks for all your contributions and keeping this project updated. :heart:

    If you have an idea, some kind of impro or just simply want to collaborate, you are welcome to contribute and participate in the Project, feel free to send your PR.

    <p align="center">
    <a href="
    <img src="
    </a>
    </p>

  • - -
  • Reporting

    To put it simply, please don't!

    Once a year or so, someone will submit a report for a they' in the app, some are well written, sometimes better than I've seen in paid pen test reports, some are just "you are missing headers, pay me".

    In 2023, this elevated to a whole new level when someone decided to request a CVE for one of the , they were given C. Much hilarity ensued and time was wasted getting this corrected.

    The app has , it is deliberate. Most are the well documented ones that you work through as lessons, others are "hidden" ones, ones to find on your own. If you really want to show off your skills at finding the hidden extras, write a blog post or create a video as there are probably people out there who would be interested in learning about them and about how your found them. If you send us the link, we may e it in the references.

    Links

    Project Home: <

    _Created by the D

    项目信息

    开发语言:PHP

    Star 数:13771

    技术要点

    该项目属于黑客技术方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Damn Vulnerable Web Application (DVWA)展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。

    从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。

    使用与学习建议

    1. 下载源码压缩包,解压到本地环境。

    2. 根据项目类型准备对应的运行环境与依赖。

    3. 按照 README 中的步骤完成配置与部署。

    4. 在隔离的测试环境中运行验证,避免影响生产系统。

    免责声明

    本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。

    资源标题DVWA - Damn Vulnerable Web Application (DVWA)
    所属分类黑客技术
    发布作者admin
    发布时间2026-10-05 22:29:07
    下载权限 免费下载
    附件数量2 个下载链接
    浏览次数270
    讨论数量0
    主题状态正常讨论中

    本资源免费,登录后即可在本页「下载链接」区域获取全部附件。

    请在评论区留言说明具体链接,或联系作者补档。楼主更新后本页会同步最新的下载地址。

    请先阅读正文中的授权说明;未注明的默认仅限站内学习交流,禁止直接搬运到其他站点二次售卖。
    还没有讨论,快来抢沙发~
    登录 后才能参与讨论
    下载链接
    会员才能下载
    登录后开通会员
    同分类推荐
    暂无同类资源
    免费登录即可下载
    查看会员
    放大预览

    © 2026 剑庭安 - 网站开发定制 SEO 优化蜘蛛池代做 在线看手相算命. 保留所有权利。

    Powered by 酷像SEOv3.0

    网站地图 Sitemap.xml
    首页 全部分类 黑客安全 逆向|反编译 精品源码 站长工具自助开通会员其他资源SEO工具站群源码泛程序蜘蛛模板蜘蛛池外链工具创意乐园 搜索 会员服务 登录 注册