Applied Security Lab Project of Tobias, Adi and Sven which is to hand in until 22.11.2018
Here is a list of "what is where"
Directories:
admin
: Source code of the admin interface. Copied to/var/www/html/admin.imovie.local
during setup of thewebapp
servercertdata
: Source code of the certdata API. Copied to/var/www/html/certdata.api.imovie.local
during setup of thecertdata
servercerts
: Contains the certificates, private keys and corresponding encryption keys for all URLs. The needed files are copied to/etc/ssl
during any server setup. See the certificate README for more informationconfigs
: Contains the commonhosts
file as well as all apache virtualhost config files for all URLs. The needed virtualhost config files are copied to/etc/apache2/sites-available
during any server setupcore-ca
: Source code of the core CA API. Copied to/var/www/html/ca.api.imovie.local
during setup of thecoreca
serverdatabase
: Contains the database setup files for the certificate database as well as the user database. A file is executed usingmysql < database/filename.sql
, if needed during a server setupssh
: Contains the SSH keys for the backup script.id_rsa
andid_rsa.pub
are copied to/home/backup_user/.ssh
during setup of theuserdata
server.authorized_keys
is copied to/home/user/.ssh
during any server setupuserdata
: Source code of the userdata API. Copied to/var/www/html/userdata.api.imovie.local
during setup of theuserdata
serverwebapp
: Source code of the standard web application. Copied to/var/www/html/www.imovie.local
during setup of thewebapp
server
Files:
backup_script.php
: Backup script that is run every 10 minutes on theuserdata
server. Copied to/home/backup_user
during setup of theuserdata
serverpw_hasher.php
: Small password hashing script to hash strings with sha512 with a pseudorandom saltREADME.md
: Hey, you are reading this right now!server_setup.php
: Setup script to automatically set up a server that you would like. See below for more information
It is very simple to setup a server. Follow these steps:
- Go to the Ubuntu Server Download Page and download the Ubuntu Server 18.04.1 LTS
- Open VirtualBox and create a new virtual machine for 64-bit Ubuntu
- Select the downloaded
.iso
file as booting medium - Follow the installation guide of Ubuntu
- After restarting the machine, log in to the account you just created
- Download PHP 7.2 by running
sudo apt-get install php
- Clone this Git repository by running
git clone https://gitlab.vis.ethz.ch/app_sec_lab/applied-security-lab-project
cd
into the repo by runningcd applied-security-lab-project
- Decide what server you would like to set up. There are four possibilities:
webapp
: The web frontend for users and administratorscoreca
: The Core CA serveruserdata
: The user database and APIcertdata
: Certificate database and API
- Run
sudo php server_setup.php <servertype>
- If all goes well, you may then change the VirtualBox network settings to use an internal network (you don't have to change the netplan settings inside the virtual machine - this is automatically done by the setup script)
- Have fun :)