当前位置:网站首页>Penetration tool environment - installing sqli labs in centos7 environment

Penetration tool environment - installing sqli labs in centos7 environment

2022-06-25 12:33:00 Litbai_ zhang

A particularly attentive introduction

sqli-labs It's a SQL Penetration environment for injection testing

The installation process

Before building, we need to have lamp Environment
install Apache Server for

yum install httpd

Then start Apache

service httpd start

see Apache state

service httpd status

Set up httpd At run level 2、3、4、5 In all cases on The state of ( If you find a test php When the web page displays the source code , Try this code again )

chkconfig --level 2345 httpd on
firewall-cmd --permanent --zone=public --add-service=httpd


install MySQL

// Because the latest version linux The system starts , The default is Mariadb
instead of mysql~//

Check whether the system is equipped with mysql, Returning a null value indicates that... Is not installed

rpm -qa |grep mysql

//yum install Although executable , But it's just for updating Mariadb Of //

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

install mysql-community-release-el7-5.noarch.rpm

rpm -ivh mysql-community-release-el7-5.noarch.rpm

install Mysql

yum install mysql-server

Check again after installation MySQL

rpm -qa | grep mysql

If the error message contains

Error: Package: mysql-community-libs-5.6.35-2.el7.x86_64 (mysql56-community) Requires: libc.so.6(GLIBC_2.17)(64bit) Error: Package: mysql-community-server-5.6.35-2.el7.x86_64 (mysql56-community) Requires: libc.so.6(GLIBC_2.17)(64bit) Error: Package: mysql-community-server-5.6.35-2.el7.x86_64 (mysql56-community) Requires: systemd Error: Package: mysql-community-server-5.6.35-2.el7.x86_64 (mysql56-community) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) Error: Package: mysql-community-client-5.6.35-2.el7.x86_64 (mysql56-community) Requires: libc.so.6(GLIBC_2.17)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

solve :

yum install glibc.i686
yum list libstdc++*

Reset password
First log in

mysql -u root

It is possible to report such an error when logging in :

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

as a result of /var/lib/mysql The access rights of . Here's the order /var/lib/mysql The owner of is changed to the current user

chown -R root:root /var/lib/mysql

Restart the service

service mysqld restart

land MySQL Reset password

mysql -u root
mysql > use mysql;
mysql > update user set password=password(‘123456’) where user=‘root’;
mysql > exit;

restart Mysq service

service mysqld restart

install PHP

yum install php.x86_64 php-mysql.x86_64 php-pear php-pear-DB php-gb


download sqli-labs

https://github.com/Audi-1/sqli-labs

1 After that, unzip it and put it in the directory of the website , Xiaobai's is in /home/www/htdocs/ Next . Then open the file sqli-labs/sql-connections/db-creds.ins, hold IP Change the address and database password to correct to access .


原网站

版权声明
本文为[Litbai_ zhang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200531021516.html

随机推荐