DVWA-01-kali on the environment to build

1. From github, clone

git clone https://github.com/ethicalhack3r/DVWA


2. Copy to /var/www/html

cp -a DVWA/ /var/www/html

3.cd /var/www/html, give DVWA 777 permissions

chmod 777 -R DVWA/

4. Restart apache and mysql, and download php7.4-gd

apt-get install php7.4-gd
systemctl start mysql
systemctl start apache2 

Check if the port is listening

5. Enter mysql, create dvwa database

Set permissions for the dvwa database

MariaDB [(none)]> grant all privileges on *.* to [email protected] identified by "123456";
Query OK, 0 rows affected (0.002 sec)

6. Configure config

cd config

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

vim config.inc.php 

$_DVWA[ 'recaptcha_public_key' ]  = '6LdK7xITAAzzAAJQTfL7fu6I-0aPl8KHHieAT_yJg';
$_DVWA[ 'recaptcha_private_key' ] = '6LdK7xITAzzAAL_uw9YXVUOPoIHPZLfw2K1n5NVQ';

7. Open 127.0.0.1/DVWA/setup.php in the browser

Here we first click create/reset Database, and then solve the red letter.

After clicking, we jump to the login page, enter the user name admin, and the default password password. After logging in, the configuration is temporarily successful.

 

Next, let's do the scarlet letter

1. Find the php.ini location

If you don’t know where it is, vim is a php file with the content

  <?php

      phpinfo();

    ?>

mv xx.php / var / www / html

You can see the location of php.ini at 127.0.0.1/xx.php

 

2.vim php.ini

 

3. Restart apache

systemctl restart apache2

4. There may be red letters in the follow-up, but it does not affect the use anymore

 

 

 

 

 

Guess you like

Origin blog.csdn.net/weixin_43198291/article/details/114015212