1. Trang chủ
  2. » Công Nghệ Thông Tin

Configure DVWA in centOS7 (Cấu hình DVWA trên CentOS7)

11 441 3

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Hướng dẫn trong này được tìm hiểu mà thực nghiệp trong mô hình lab để xem những lệnh đó có thực sự hiệu quả và thực hiện đúng chức năng trong hệ điều hành CentOS 7 không. Bạn hoàn toàn có thể tin chắc rằng những lệnh và trình tự được nêu trong này sẽ giúp bạn cấu hình DVWA chính xác trên hệ điều hành CentOS 7.

#yum update #yum install wget #vi /etc/selinux/config  SELINUX=disabled #setenforce #sestatus Disable the Firewall #service iptables stop #chkconfig iptables off Preliminary Note rpm import /etc/pki/rpm-gpg/RPM-GPG-KEY* yum -y install epel-release Install mysql #wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm #sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm #sudo yum install mysql-server #sudo systemctl start mysqld #mysql_secure_installation Sau tạo liên kết khởi động hệ thống cho MySQL (để MySQL khởi động tự động hệ thống khởi động) khởi động máy chủ MySQL: systemctl start mysqld ­ To log in to MySQL as the root user: #mysql -u root -p Cài đặt Apache httpd Server #yum -y install httpd #systemctl start httpd.service #service httpd start #ps -eaf | grep httpd #chkconfig level 2345 httpd on To be able to access the web server from outside, we have to open the HTTP (80) and HTTPS (443) ports in the firewall The default firewall on CentOS is firewalld which can be configured with the firewalld-cmd command firewall-cmd permanent zone=public add-service=http firewall-cmd permanent zone=public add-service=https firewall-cmd –-reload http://192.168.172.128 Cài đặt PHP ­ Thêm kho Remi CentOS.: rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm ­ Cài đặt yum-utils cần có tiện ích yum-config-manager yum -y install yum-utils ­ Để cài đặt PHP 5.4, chạy lệnh này: yum -y install php ­ Cài đặt PHP 7.0 yum-config-manager enable remi-php70 yum -y install php php-opcache ­ Cài đặt PHP 7.1 yum-config-manager enable remi-php71 #yum -y install php php-opcache #yum install php-mysql #yum install php-pear php-pear-DB Thử nghiệm PHP, chi tiết cài đặt PHP vi /var/www/html/info.php #http://192.168.172.128/info.php Hỗ trợ Mysql PHP Để có hỗ trợ MySQL PHP, cài đặt gói php71wmysql Đó ý tưởng tốt để cài đặt số mơ-đun PHP khác bạn cần chúng cho ứng dụng bạn Bạn tìm kiếm mơ đun PHP5 có sẵn sau: #yum search php Chọn cần cài đặt sau: #yum -y install php-mysql Trong bước tiếp theo, cài đặt số mô đun PHP phổ biến yêu cầu CMS Systems Wordpress, Joomla Drupal: #yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc phpmbstring php-soap curl curl-devel #systemctl restart httpd.service Reload: # http://192.168.172.128/info.php PHPMyAdmin cài đặt: #yum -y install phpMyAdmin Bây cấu hình phpMyAdmin Chúng ta thay đổi cấu hình Apache để phpMyAdmin cho phép kết nối khơng từ localhost (bằng cách bình luận câu thêm dòng 'Require all granted'): #vi /etc/httpd/conf.d/phpMyAdmin.conf Restart Apache #systemctl restart httpd.service http://192.168.1.100/phpmyadmin/ I Install DVWA Cài đặt mã nguồn: #cd /var/www/html #wget http://www.computersecuritystudent.com/SECURITY_TOOLS/DVWA/DVWAv1 07/lesson1/DVWA-1.0.7.zip a Grab the DVWA-1.0.7 application b Remember to down the zip file from computersecuritystudent and not googlecode #ls -l | grep DVWA c Confirm DVWA-1.0.7.zip was downloaded Unzip Package  Instructions: #unzip DVWA-1.0.7.zip Remove Zip File  Instructions: #ls -lrta #rm DVWA-1.0.7.zip y #cd /var/www/html/dvwa/config #cp config.inc.php config.inc.php.BKP #chmod 000 config.inc.php.BKP #vi config.inc.php Configure config.inc.php  Instructions: Arrow down to the line that contains db_password Arrow right and place your cursor on the second single quote Press "i"  This puts the vi editor into INSERT mode Type "dvwaPASSWORD" Press  This takes the vi editor out of INSERT mode Type ":wq!"  This save the config.inc.php file  Restart Apache o Instructions: #service httpd restart  Restart Apache #ps -eaf | grep -v grep | grep httpd  Make sure Apache is running o Start up a Web Browser o Instructions: Applications > Internet > Firefox o Notes: At this point, you can start up a web browser on any computer on your network (Windows, Mac, Whatever you want) o  DVWA Database setup o Instructions: #http://192.168.1.116/dvwa/setup.php  Replace 192.168.1.116 with the IP Address obtained from Section 3, Step Click the Create / Reset Database button o DVWA Creation Messages o Instructions: You should see the below database created, data inserted, and setup successful messages Click on Logout o Login to DVWA o Instructions: Username: admin Password: password o Welcome to DVWA o Informational (FYI): Click Here for subsequent lessons o Section Proof of Lab Proof of Lab o Instructions: echo "select user,password from dvwa.users;" | mysql -uroot -pdvwaPASSWORD date echo "An Tồn Thơng Tin"  Replace the string "Your Name" with your actual name  e.g., echo "EDU VN" o Proof of Lab Instructions: Do a PrtScn Paste into a word document Email to AnToanThongTin.Edu.VN@Gmail.Com o ... /var/www/html /dvwa/ config #cp config.inc.php config.inc.php.BKP #chmod 000 config.inc.php.BKP #vi config.inc.php Configure config.inc.php  Instructions: Arrow down to the line that contains db_password Arrow... | grep DVWA c Confirm DVWA- 1.0.7.zip was downloaded Unzip Package  Instructions: #unzip DVWA- 1.0.7.zip Remove Zip File  Instructions: #ls -lrta #rm DVWA- 1.0.7.zip y #cd /var/www/html /dvwa/ config... http://192.168.1.100/phpmyadmin/ I Install DVWA Cài đặt mã nguồn: #cd /var/www/html #wget http://www.computersecuritystudent.com/SECURITY_TOOLS /DVWA/ DVWAv1 07/lesson1 /DVWA- 1.0.7.zip a Grab the DVWA- 1.0.7 application

Ngày đăng: 26/10/2018, 15:41

Xem thêm:

TỪ KHÓA LIÊN QUAN

w