CentOS SimpleRisk Install Guide (PHP8)
CentOS SimpleRisk Install Guide (PHP8)
Introduction
SimpleRisk is a simple and free tool to perform risk management activities. Based entirely
on open source technologies and sporting a Mozilla Public License 2.0, a SimpleRisk
instance can be stood up in minutes and instantly provides the security professional with
the ability to submit risks, plan mitigations, facilitate management reviews, prioritize for
project planning, and track regular reviews. It is highly configurable and includes dynamic
reporting and the ability to tweak risk formulas on the fly. It is under active development
with new features being added all the time and can be downloaded for free or demoed at
https://www.simplerisk.it/.
Disclaimer
The lucky security professionals work for companies who can afford expensive GRC tools to
aide in managing risk. The unlucky majority out there usually end up spending countless
hours managing risk via spreadsheets. It’s cumbersome, time consuming, and just plain
sucks. When Josh Sokol started writing SimpleRisk, it was out of pure frustration with the
other options out there. What he’s put together is undoubtedly better than spreadsheets
and gets you most of the way towards the “R” in GRC without breaking the bank. That said,
humans can make mistakes, and therefore the SimpleRisk software is provided to you with
no warranties expressed or implied. If you get stuck, you can always try sending an e-mail
to [email protected] and we’ll do our best to help you out. Also, while SimpleRisk was
written by a security practitioner with security in mind, there is no way to promise that it is
100% secure. You accept that as a risk when using the software, but if you do find any
issues, please report them to us so that we can fix them ASAP.
Installing Lamp
Once you have your CentOS 8 environment you must first decide if your going to do this with
SELinux on or off and if you wish for it to be on follow this guide to set it up
(https://simplerisk.freshdesk.com/solution/articles/6000053609-how-do-i-get-simplerisk-to-wor
k-with-selinux-) if you wish to turn it off we need to edit the CentOS config by typing
“vi /etc/selinux/config” and change the line “SELINUX=Enforcing” and make it
”SELINUX=Permissive” reboot CentOS and verify with “getenforce” if it returns permissive you can
continue. We now start by installing a lamp server this is comprised of Apache, MySQL, and PHP.
Open terminal and begin the following process to install LAMP
1) Type “sudo bash”. This will a require the root password made at installation
2) Type “yum update”. This will update your Linux environment.
3) Type “yum install httpd”. This installs apache
4) Type “systemctl enable httpd” and “systemctl start httpd” this will enable and start the
apache process.
5) Next we install MariaDB a MySQL manager. Type “yum install mariadb-server” and then
“systemctl enable mariadb” and finally “systemctl start mariadb” this will install, enable, and
start MariaDB.
6) Finally type “mysql_secure_installation” to better secure your sql databases and
environment.
The following should display and should answer accordingly this will also be where you set
your MySQL database root password so store it and keep it handy for later
[root@localhost ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
In case, if you need to install any other version, you can reset the current module enabled and
set the new using the below commands:
# yum module reset php
This section entails downloading the software placing it properly setting the config files for
the virtualhost as well as installation of the database. The following steps should result in a
functional SimpleRisk environment to be spawned.
Click to download and save the Web Bundle. Once you have the files downloaded, you can close
the browser.
Next change the owner of the SimpleRisk directory to apache using “chown -R apache:
/var/www/html/simplerisk/”
Next we need to set httpd to set up our config for the virtualhost there are a few steps here
and I will list them below.
1) First we need to create a folder. Type “cd /etc/httpd”
2) Create the folder using “mkdir sites-enabled”
<VirtualHost *:80>
ServerName simplerisk
DocumentRoot "/var/www/html/simplerisk"
<Directory "/var/www/html/simplerisk">
Options -Indexes
AllowOverride All
allow from all
</Directory>
</VirtualHost
One more configuration change that will be necessary for deploying your instance. We will
need to now set the SQL-Mode.
1) vi /etc/my.cnf
2) Scroll to the bottom and add the following line:
sql-mode="NO_ENGINE_SUBSTITUTION"
3) systemctl restart mariadb
Last we must open the port for HTTP traffic so SimpleRisk may be accessed from other
machines.
1) sudo firewall-cmd --add-service=http --permanent
2) sudo firewall-cmd --reload
You should now see the database configuration page. You will be required to enter the
credentials for the MySQL root user which was configured in an earlier step. An example of
this page is shown below.
Please note before continuing if you are setting up with an MySQL instance that is not local
to the web server you will need to configure the Database IP/Hostname and port. In basic
installations this step is not required and these values can be left as their defaults. Click
“continue” once the credentials to access the MySQL server have been configured. You will
now be able to configure the details of the SimpleRisk database. In a general installation all
of these can be left default.
We have now arrived at the final setup screen as seen above. Here you will configure your
admin account and assign the details you will use to login to SimpleRisk with for that admin
account. Please note that the use of a valid email address is highly recommended as this
will be where password recovery emails will be sent. You are also given the opportunity to
opt into our mailing list by checking the box at the bottom. In this you will receive product
release updates and educational content related to the SimpleRisk platform. Once you see
the image below in your browser you are finished and may click the “Go to SimpleRisk”
button to login and begin using the application.
Logging in to SimpleRisk
You should now have performed all of the steps you need to for SimpleRisk to be up and
running. Now is the moment of truth where we hopefully get to see if all of your hard work
paid off. You now need to point your web browser to the URL where SimpleRisk would be
installed. If you followed the optional instructions, then it should be located at
http://simplerisk/ if not you will need to guide your browser to http://yourserverip/. You
will know that you’ve got the right page when you see something like this:
Enter username “admin” and password “admin” to get started. Then, select the “Admin”
dropdown at the top right and click on “My Profile”.
Enter your current password as “admin” and place a new long and randomly generated
password into the “New Password” and “Confirm Password” fields. Then click “Submit”.
You should receive a message saying that your password was updated successfully. If so,
then this is your new “admin” password for SimpleRisk. If you received a message saying
that “The password entered does not adhere to the password policy”, you can change the
policy by selecting “Configure” from the menu at the top followed by “User Management” on
the left side. You will see a “Password Policy” section at the bottom of the page where you
can change the policy and try changing your password again.
Registering SimpleRisk
This step is completely optional, but without it upgrades of SimpleRisk will require manual
downloads of the new version, backing up your configuration file, extracting the new files,
restoring the configuration file, and a database upgrade. It sounds like more effort than it
really is, but we’ve made the process far simpler if you’re willing to tell us who you are. To
register your SimpleRisk instance, select “Configure” from the menu at the top followed by
“Register & Upgrade” from the menu at the left.
Enter your information and select the “Register” button. This will create a unique Instance
ID for your SimpleRisk instance and download the Upgrade Extra which enables
functionality for one-click backups and upgrades. If you run into issues with the
registration process, we recommend that you check to ensure that the “simplerisk”
directory and its sub-directories are writeable by the www-data user (or whatever user
Apache is running as).