/31261-The-Sensor-DB

revision of my 'gadget shop' web app to fit the context of IoT Security, using a sensor database instead of electronics database

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

31261 - The Sensor DB

15/05/2022

the-sensor-db

Description

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.

Instructions for Raspberry Pi

  1. Install PHP 7.3
  • sudo apt update
  • sudo apt install php7.3 php7.3-mysql
  1. Enable Short Open Tags
  • sudo vim /etc/php/7.3/cli/php.ini
# replace this line with the value below
short_open_tags = On
  1. Install MariaDB
  • sudo apt install mariadb-server
  1. 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
  1. Apply/Remove Firewall Rules
  • sudo bash ufw-rules.sh on
  • sudo bash ufw-rules.sh off

Instructions for WSL 2

  1. Install PHP 7.4.29
  • sudo apt update
  • sudo apt install php7.4 php7.4-mysql
  1. Enable Short Open Tags
  • sudo vim /etc/php/7.4/cli/php.ini
# replace this line with the value below
short_open_tags = On
  1. Install MySQL 8.0
  • sudo apt mysql-server
  1. 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
  1. Apply/Remove Firewall Rules
  • sudo bash ufw-rules.sh on
  • sudo bash ufw-rules.sh off

Running the Web App

chmod 777 31261-The-Sensor-DB
cd 31261-The-Sensor-DB
php -S 0.0.0.0:8000

technologies used

bootstrap mysql php