dvwa ubantu
时间: 2023-11-03 18:01:51 浏览: 120
根据提供的引用内容,搭建DVWA(Damn Vulnerable Web Application)在Ubuntu上的步骤如下:
1. 更新系统并安装mysql-server和apache2:
- sudo apt update
- sudo apt install mysql-server
- sudo apt install apache2
2. 配置mysql:
- sudo mysql
- create database dvwa;
- alter user 'root'@'localhost' identified with mysql_native_password by '123456';
- exit
3. 安装php和php-mysql:
- sudo apt install php php-mysql
4. 克隆DVWA并将其移动到/var/www/html/目录下:
- git clone https://github.com/digininja/DVWA
- mv DVWA dvwa
5. 配置DVWA:
- sudo mv dvwa /var/www/html/
- sudo chmod -R 755 /var/www/html/dvwa/
- sudo cp /var/www/html/dvwa/config/config.inc.php.dist /var/www/html/dvwa/config/config.inc.php
- sudo vim /var/www/html/dvwa/config/config.inc.php
- 修改以下两行配置:
- $_DVWA[ 'db_user' ] = 'dvwa'; 改为 $_DVWA[ 'db_user' ] = 'root';
- $_DVWA[ 'db_password' ] = 'p@ssw0rd'; 改为 $_DVWA[ 'db_password' ] = '123456';
6. 重启apache服务器:
- sudo service apache2 restart
阅读全文