RamRod-0 / Rods_virtual_world

Labs and tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rods_virtual_world

Automated ELK Stack Deployment

The files in this repository were used to configure the network depicted below.

TODO: Update the path with the name of your diagram

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. Alternatively, select portions of the .yml file may be used to install only certain pieces of it, such as Filebeat.

  • elk-playbook.yml

This document contains the following details:

  • Description of the Topology
  • Access Policies
  • ELK Configuration
    • Beats in Use
    • Machines Being Monitored
  • How to Use the Ansible Build

Description of the Topology

The main purpose of this network is to expose a load-balanced and monitored instance of DVWA, the D*mn Vulnerable Web Application.

Load balancing is the process of distributing network traffic across multiple servers. This ensures no single server bears too much demand. By spreading the work evenly, load balancing improves application responsiveness.

  • What aspect of security do load balancers protect? - Traffic of users or DOS attacks

What is the advantage of a jump box?

  • a gateway

Integrating an ELK server allows users to easily monitor the vulnerable VMs for changes to the servers data or containers and system files.

  • What does Filebeat watch for?
  • a lightweight shipper for forwarding and centralizing log data.

The configuration details of each machine may be found below.

NAME PUBLICLY ACCESSIBLE FUNCTION PRIVATE-IP ADDRESS OPERATING SYSTEM
Jump_Box Yes Gateway 10.1.0.9 Linux
Web_1 No Web_Server 10.1.0.10 Linux
Web_2 No Web_Server 10.1.0.11 Linux
Elk_Server No Kibana_IDS 10.0.0.4 Linux

Access Policies

The machines on the internal network are not exposed to the public Internet.

Only the Jumps_Box machine can accept connections from the Internet. Access to this machine is only allowed from the following IP addresses:

  • 123.456.78.9

Machines within the network can only be accessed by Jump_Box.

  • Which machine did you allow to access your ELK VM? What was its IP address? - WEB_1 (10.1.0.10) & WEB_2 (10.1.0.10)

A summary of the access policies in place can be found in the table below.

NAME PUBLICLY ACCESSIBLE FUNCTION PRIVATE IP ADDRESS PUBLIC IP ADDRESS OPERATING SYSTEM
Jump_Box Yes Gateway / SSH 10.1.0.9 52.247.222.221 Linux
Elk_Server No Kibana_IDS 10.0.0.4 52.254.16.91 Linux

Elk Configuration

Ansible was used to automate configuration of the ELK machine. No configuration was performed manually, which is advantageous because...

  • The main advantage of automating configuration with Ansible, is that it allows you to streamline, simplify and quickly deploy you network infulstructure. Apply Docker containers to retrieve tools and neccessary programs

The playbook implements the following tasks:

  • Use apt module

    - name: Install docker.io
    
  • Use apt module

     - name: Install pip3
    
  • Use pip module

     - name: Install Docker python module
    
  • Use command module

     - name: Increase virtual memory 
    
  • Use sysctl module

     - name: Use more memory
    
  • Use docker_container module

     - name: download and launch a docker elk container
    

The following screenshot displays the result of running docker ps after successfully configuring the ELK instance.

  • Ansible/yml/2020-08-29 15_17_23-root@13eba76ab51f_ _etc_ansible.jpg

Target Machines & Beats

This ELK server is configured to monitor the following machines:

  • WEB_1 (10.1.0.10) WEB_2 (10.1.0.10)

We have installed the following Beats on these machines:

  • Filebeat

These Beats allow us to collect the following information from each machine:

  • Filebeat collects log data. Also monitors all servers under the elk server. - WEB_1 (10.1.0.10) WEB_2 (10.1.0.10)

Using the Playbook

In order to use the playbook, you will need to have an Ansible control node already configured. Assuming you have such a control node provisioned:

SSH into the control node and follow the steps below:

  • Copy the filebeat-config.yml filebeat-playbook.yml files to the files folder in ansible.
  • Update the Hosts file with the correct IP.
  • Run the playbook,(ansible-playbook elk-playbook.yml) and review the play recap

TODO: Answer the following questions to fill in the blanks:

  • Which file is the playbook? Where do you copy it?_

  • elk-playbook.yml ~/etc/ansible

  • _Which file do you update to make Ansible run the playbook on a specific machine?

  • Hosts file must be updates with IP address for the web1 , web2 and ELK server

How do I specify which machine to install the ELK server on versus which to install Filebeat on?

  • _Which URL do you navigate to in order to check that the ELK server is running?
  • (ELK_IP:5601)

As a Bonus, provide the specific commands the user will need to run to download the playbook, update the files, etc.

About

Labs and tools


Languages

Language:Shell 100.0%