Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Deploy sqlilab

Shulou Source: shulou.com Published: 2022-06-01 09:25:56 10月02日 Update

MySQL has been installed

Apache is installed by yum

Check to see if the httpd package is available:

Yum list | grep httpd

Install Apache

Yum install httpd

Turn on Apache

Systemctl start httpd

Test Apache started successfully

File path description:

Service Directory / etc/httpd

Main configuration file / etc/httpd/conf/httpd.conf

Website data directory / var/www/html

Configure the / etc/httpd/conf.d/ directory where the configuration is stored

Access log / var/log/httpd/access_log

Error log / var/log/httpd/error_log

Download sqlilab from github to local

Cd / var/www/html

Git clone https://github.com/Audi-1/sqli-labs.git

[root@zh html] # ls-al

Total 8

Drwxr-xr-x. 3 root root 39 Nov 14 23:36.

Drwxr-xr-x. 4 root root 33 Nov 14 23:36..

-rw-r--r--. 1 root root 20 Nov 14 23:35 info.php

Drwxr-xr-x. 78 root root 4096 Nov 14 21:46 sqli-labs

[root@zh html] #

According to the Install Instructions in https://github.com/Audi-1/sqli-labs:

Open the file "db-creds.inc" which is under sql-connections folder inside the sql-labs folder.

Update your MYSQL database username and password. (default for Backtrack are used root:toor)

And further set it by accessing the following path:

Http://10.211.55.15/sqli-labs/

Click on the link setup/resetDB to create database, create tables and populate Data.

If the following occurs:

SETTING UP THE DATABASE SCHEMA AND POPULATING DATA IN TABLES:

[*] .Could not connect to DB, check the creds in db-creds.inc: Authentication plugin 'caching_sha2_password' cannot be loaded: / usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

Administrator permission to run the command prompt, log in to MySQL

Mysql-u root-p

Modify account password encryption rules and update user password

Alter user 'root'@'localhost' identified by' root@123' password expire never

Alter user 'root'@'localhost' identified with mysql_native_password by' root@123'

Refresh permissions and reset password

Flush privileges

Alter user 'root'@'localhost' identified by' 111111'

Visit http://10.211.55.15/sqli-labs/ again

Click on the link setup/resetDB to create database, create tables and populate Data.

Then you can start to learn.

For example:

Tags: Password directory file log permission path configuration success again command situation prompt data user administrator website rule account error face-to-face Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL MariaDB Docker vpn OPPO Reno