Kali下的DVWA靶场安装过程
(新手学习记录,有错请指出)
dvwa下载地址
往下滑动,可以看到Download,两个都可以,我下载的是zip(新手,还不太熟练命令行界面)
解压缩——>其他位置——>计算机——>var/www/html
(这里我把文件名重命名为dvwa,方便等下写)
双击(或右键)用vim打开config.inc.php把password改掉,我改成123456
(键盘i进入插入模式,改完后,esc退出插入模式,:wq保存退出)
修改dvwa权限:
root@kali:~# chomd -R 755 /var/www/html/dvwa
进入数据库mysql(默认密码是root)
root@kali:~# mysql -u root -p
root@kali:~# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 51
Server version: 10.3.23-MariaDB-1 Debian buildd-unstable
Copyright © 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>
创建新的database:dvwa
MariaDB [(none)]> create database dvwa
-> ;
Query OK, 1 row affected (0.001 sec)
查看是否创建成功:
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| dvwa |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.004 sec)
创建一个新用户dvwa并修改权限,给予所有权限:密码与上面config.inc.php设置的一样
MariaDB [(none)]> create user dvwa@localhost identified by '123456';
Query OK, 0 rows affected (0.003 sec)
MariaDB [(none)]> grant all privileges on *.* to dvwa@localhost identified by '123456';
Query OK, 0 rows affected (0.001 sec)
退出mysql:exit
MariaDB [(none)]> exit
Bye
打开apache2和mysql:
root@kali:~# service apache2 start
root@kali:~# service mysql start
root@kali:~#
打开127.0.0.1/dvwa,再点击创建create database即可
默认用户:admin
密码:password