Linux centos6.5 builds its own penetration test practice environment damn vulnerable Web application__linux

Source: Internet
Author: User
Tags install php fully qualified domain name

The damn vulnerable Web application is selected

Go to download Address download PHP package, https://codeload.github.com/ethicalhack3r/DVWA/zip/v1.9

Install apache:yum-y Install httpd

Start Apache:service httpd Start

Install php:yum-y Install PHP

Install mysql-server:yum-y Install Mysql-server

Start Mysql-server:service mysqld Start (remote login assignment, etc. must be done without a detailed statement)

Install Php-mysql Association: Yum Install php-mysql php-pear php-gd-y

So far..... Need to install the software to complete


Test PHP Build
Cd/var/www/html
VI index.php

<?php
phpinfo ();



Visit ip/test.php The following figure shows the success


FAQ:

Error Httpd:could not reliably determine the server ' s fully qualified domain name

Solution: Vi/etc/httpd/conf/httpd.conf added a ServerName localhost:80


VI mysql.php

<?php
$con = mysql_connect ("localhost", "root", "");
if (! $con)
  {
  die (' Could not connect: '. Mysql_error ());
  }


mysql_select_db ("MySQL", $con);


$result = mysql_query ("SELECT * from user");


while ($row = Mysql_fetch_array ($result))
  {
  echo $row [' User ']. " " . $row [' Host '];
  echo "<br/>";
  }


Mysql_close ($con);
? >



Visit ip/mysql.php

The MySQL information appears successful


CP entire project to program publish path, default/var/www/html/


Modify the database information in config/config.inc.php, access to the address, click Create/reset db, you can see the following figure



Then you can log in, the default is Admin/password




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.