UofT Cybersecurity Project1
The files in this repository were used to configure the network depicted below:
These files have been tested and used to generate a live ELK deployment on Azure. They can be used to either recreate the entire deployment pictured above, or select portions of the Project 1 Red-Team Network Diagram file to install specific components, such as Filebeat:
This document contains the following details:
The main purpose of this network is to expose a load-balanced and monitored instance of DVWA, the Dmn Vulnerable Web Application.*
Security Aspects of Load Balancers:
Advantages of a Jump Box:
Integrating an ELK server allows users to easily monitor vulnerable VMs for changes in network and system logs:
The configuration details of each machine are listed below. Use the Markdown Table Generator to add/remove values from the table.
🖥️ Name | 📦 Function | 🌐 IP Address | 🐧 Operating System |
---|---|---|---|
Jump-Box-Provisioner | Gateway | 10.0.0.5 (Private) / 23.96.123.102 (Public) | Linux |
ELK-VM | Server | 10.1.0.4 (Private) / 13.66.196.172 (Public) | Linux |
WEB-1 | Server | 10.0.0.7 (Private) | Linux |
WEB-2 | Server | 10.0.0.6 (Private) | Linux |
WEB-3 | Server | 10.0.0.8 (Private) | Linux |
The machines on the internal network are not exposed to the public Internet:
Internal machines can only be accessed via Jump-Box-Provisioner:
Summary of the access policies:
🖥️ Name | 🌐 Publicly Accessible | 📜 Allowed IP Addresses |
---|---|---|
Jump-Box-Provisioner | Yes | 71.59.34.72 |
ELK-VM | No | 10.0.0.4 |
WEB-1 | No | 10.0.0.4 |
WEB-2 | No | 10.0.0.4 |
WEB-3 | No | 10.0.0.4 |
Note: All these VMs can only be accessed from the Jump-Box-Provisioner.
Ansible was used to automate the configuration of the ELK machine. No manual configuration was performed, which offers the following advantages:
The playbook implements the following tasks:
/etc/ansible/roles
directory and create the ELK playbook (Elk_Playbook.yml
).The following screenshot displays the result of running docker ps
after successfully configuring the ELK instance:
This ELK server is configured to monitor the following machines:
Installed Beats on these machines:
Beats collect the following information:
To use the playbook, you need a pre-configured Ansible control node. SSH into the control node and follow these steps:
filebeat-configuration.yml
file to /etc/ansible/roles/files
.filebeat-configuration.yml
file to include the ELK private IP in lines 1106 and 1806.metricbeat-configuration.yml
file to /etc/ansible/roles/files
.metricbeat-configuration.yml
file to include the ELK private IP in lines 62 and 96.filebeat-playbook.yml
/etc/ansible/roles
/etc/ansible/hosts
/etc/ansible/hosts
: one for webservers (Filebeat) and another for elkservers (ELK).
nano filebeat-configuration.yml
name: installing and launching filebeat
hosts: webservers
become: true
tasks:
name: download filebeat deb
command: curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.7.1-amd64.deb
name: install filebeat deb
command: dpkg -i filebeat-7.7.1-amd64.deb
name: drop in filebeat.yml
copy:
src: ./files/filebeat-configuration.yml
dest: /etc/filebeat/filebeat.yml
name: enable and configure system module
command: filebeat modules enable system
name: setup filebeat
command: filebeat setup
name: start filebeat service
command: service filebeat start
```
———- Metricbeat ————-
ansible-playbook filebeat-playbook.yml
nano metricbeat-configuration.yml
name: installing and launching metricbeat
hosts: webservers
become: true
tasks:
name: download metricbeat deb
command: curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.7.1-amd64.deb
name: install metricbeat deb
command: sudo dpkg -i metricbeat-7.7.1-amd64.deb
name: drop in metricbeat.yml
copy:
src: /etc/ansible/roles/files/metricbeat-configuration.yml
dest: /etc/metricbeat/metricbeat.yml
name: enable and configure system module
command: metricbeat modules enable system
name: setup metricbeat
command: metricbeat setup
name: start metricbeat service
command: service metricbeat start
```
ansible-playbook metricbeat-playbook.yml