SOC Homelab

Description

This project uses the VULTR cloud provider and various virtual machines to simulate a Security Operation Center environment implemented through multiple virtual machines. Disclaimer: * All virtual machines involved in this project have been erased. *

Languages and Utilities Used

  • Linux, Powershell

Environments Used

  • Vultr Cloud, Elastic, Ubuntu, Windows Server 2022, Windows 10, Fleet Server, Mythic Server, osTicket.

Project walk-through:

Create a Logical Diagram: I used draw.io to create a digital logical diagram of the entire network, its connections, and workflows. The IP ranges will be automatically configured through VULTR.
Diagram creation

Setup Vultr: I start by heading to the Vultr cloud provider website and setting up my cloud account. https://www.Vultr.com
Setup


After setting up my account, I head over to products and create my VPC.
Setup Setup

I decided to remote into the server instead of using the server's console. I then updated the server and began installing/configuring ElasticSearch and Kibana.
Setup Setup Setup Setup

Next, I adjusted the firewall rules of the ELK server within VULTR.
Setup Setup Setup

Now, I begin setting up my Elastic instance.
Setup Setup Setup

Logging into the instance. Configuring Kibana key stores and API encryption tokens.
Setup Setup Setup Setup Setup Setup Setup

Creating my Windows Server with RDP enabled. It will be separated from my VNC for safety reasons.
Setup Setup Setup

Creating and updating my Ubuntu fleet server.
Setup Setup

Adding my fleet server and Elastic agent from the Windows server to the Elastic web Gui instance.
Setup Setup Setup Setup Setup


Installing Sysmon along with a special configuration file on my Windows server for endpoint detection.
Setup Setup Setup Setup Setup
Integrating my Windows server Sysmon and Windows Defender logs into my Elastic instance. I needed to adjust the firewall rules on my VPC to allow incoming traffic from the correct port to enable viewing of the Windows server telemetry.
Setup Setup Setup Setup Setup Setup Setup Setup Setup Setup Setup

Creating and updating repositories for my Ubuntu SSH server. Checking auth.logs file for any data on authentication attempts.
Setup Setup Setup Setup Setup Setup

Installing Elastic agent onto the new Ubuntu server and integrating the logs to my Elastic instance. Modifying the network firewall to allow traffic from the Ubuntu server. Examining suspicious authentication attempts for my root user from specific IP addresses in Elastic.
Setup Setup Setup Setup Setup Setup Setup Setup Setup

Creating alerts and dashboards in Elastic. I tune the rules to look for failed and successful authentication attempts on my SSH Ubuntu server.
Setup Setup Setup Setup Setup Setup Setup Setup

Creating enhanced detection rules for my Windows and Ubuntu server agents. I wanted more information on adversaries to be displayed each time an authentication attempt occurs.
Setup Setup Setup Setup Setup Setup

Creating visualizations for my dashboard.
Setup Setup Setup Setup Setup

Implementing osTicket into the Elastic environment. Alerts from Elastic should be automatically forwarded to my osTicket logs. I create an API key in osTicket and direct it to my ELK server's private address.
Setup Setup Setup Setup

Next, I create a webhook in Elastic to enable log forwarding from the ELK server. The webhook's body was copied from the osTicket GitHub repository here https://github.com/osTicket/osTicket/blob/develop/setup/doc/api/tickets.md.
Setup Setup Setup

I then test the functionality of the newly created webhook. Configurations were made to my osTicket server's private IP address. Initially, I had to troubleshoot connectivity issues via the network adapter settings. You can finally see the Elastic log appear in the osTicket environment.
Setup Setup Setup Setup Setup

Lastly, I wanted to implement an EDR for my endpoints. Elastic offers a built-in EDR so I set one up for my Windows server machine
Setup Setup Setup Setup Setup Setup