This is based on my implementation of SQLIA vulnerable web app called 'The Gadget Shop'. With the titles and database renamed to 'sensors', to fit the context of IoT Security. For the purposes of project demonstration to my supervisors.
- Install PHP 7.3
sudo apt update
sudo apt install php7.3 php7.3-mysql
- Enable Short Open Tags
sudo vim /etc/php/7.3/cli/php.ini
# replace this line with the value below
short_open_tags = On
- Install MariaDB
sudo apt install mariadb-server
- Configure The Database
sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
# append the following to the [mysqld] section excluding this comment
[mysqld]
secure_file_priv = ""
sudo mysql < sql/init_db.sql
- Apply/Remove Firewall Rules
sudo bash ufw-rules.sh on
sudo bash ufw-rules.sh off
- Install PHP 7.4.29
sudo apt update
sudo apt install php7.4 php7.4-mysql
- Enable Short Open Tags
sudo vim /etc/php/7.4/cli/php.ini
# replace this line with the value below
short_open_tags = On
- Install MySQL 8.0
sudo apt mysql-server
- Configure The Database
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
# append the following to the [mysqld] section excluding this comment
[mysqld]
secure_file_priv = ""
sudo mysql < sql/init_db.sql
- Apply/Remove Firewall Rules
sudo bash ufw-rules.sh on
sudo bash ufw-rules.sh off
chmod 777 31261-The-Sensor-DB
cd 31261-The-Sensor-DB
php -S 0.0.0.0:8000