Skip to main content
Jorzinho Martina
All projects

Fontys · School project · 2024

Ransomware Detection Lab

A segmented network built to detect ransomware behaviour, with pfSense IDS/IPS between zones and Wazuh raising a separate real-time alert for each of the three ransomware behaviours in a simulator run.

  • Wazuh
  • pfSense
  • Active Directory
  • Sysmon
  • Azure
  • Tailscale

Results at a glance

3 of 3 ransomware behaviours detected

I ran the NextronSystems ransomware simulator three times on a monitored Windows client and checked whether Wazuh raised a separate alert for each of the three ransomware behaviours below, every run.

Impact. Damaging data or holding it hostage.

  • T1486Data Encrypted for ImpactEncrypts the documents it dropped and renames them with a ransomware extension.Community rule set
  • T1490Inhibit System RecoveryRuns the command pattern ransomware uses to delete Volume Shadow Copies (simulated: nothing is actually deleted).Community rule set
  • T1491.001Internal DefacementDrops a ransom note on the user's desktop.Community rule set

Detection only: the project ended before automatic blocking was set up, so the simulator ran to completion each time. Containment would be the next step.

  • Community rule set

Overview

A security monitoring environment designed to detect ransomware activity inside a network, built for the Cybersecurity semester at Fontys University. The network is split into a DMZ, an internal LAN and an isolated backup zone, each separated by pfSense IDS/IPS firewalls, with Wazuh monitoring hosts across the environment. It was a team project: I built the firewalls and segmentation, the Active Directory environment and Wazuh with its rule set, and a teammate built the backup path.

Problem

Once inside an environment, ransomware can encrypt files and spread laterally before anyone notices. The goal was to make that activity visible and alertable as early as possible.

What I built

  • Designed and deployed a segmented network (DMZ, LAN, backup zone) from scratch
  • Imported and tuned a community Wazuh rule set for ransomware behaviour
  • Integrated Wazuh with Active Directory for user context
  • Validated the detections with the NextronSystems ransomware simulator, three runs, separate alerts every time
  • Put the backup zone behind its own firewall; a teammate built the backup path, with an off-site copy in Azure over Tailscale

Architecture

Drag to pan, Ctrl/⌘ + scroll to zoom, hover a node for details.

INTERNETINTERNETDMZ · 172.16.1.0/24LAN2 · 192.168.1.0/24LAN3 · 10.0.0.0/24
Internet
IDS/IPS Firewall
pfSense
Web Server
Ubuntu Server
IDS/IPS Firewall
pfSense
Wazuh HIDS
Ubuntu Server
Windows AD/DC
Domain Controller
Client
Ubuntu Workstation
Client
Windows Workstation
IDS/IPS Firewall
pfSense
Backups Share
Ubuntu Server
Tailscale VPN
Azure VM
Cloud Database
Internet
DMZ(172.16.1.0/24)
LAN2(192.168.1.0/24)
LAN3(10.0.0.0/24)
55%
Show components as a list
Internet
  • Internet
  • Azure VM · Cloud Database
DMZ (172.16.1.0/24)
  • IDS/IPS Firewall · pfSense
  • Web Server · Ubuntu Server
LAN2 (192.168.1.0/24)
  • IDS/IPS Firewall · pfSense
  • Wazuh HIDS · Ubuntu Server
  • Windows AD/DC · Domain Controller
  • Client · Ubuntu Workstation
  • Client · Windows Workstation
LAN3 (10.0.0.0/24)
  • IDS/IPS Firewall · pfSense
  • Backups Share · Ubuntu Server
  • Tailscale VPN

Lab setup

  • pfSense IDS/IPS firewalls separating the DMZ, the internal LAN and the backup zone
  • Wazuh manager on Ubuntu Server monitoring the lab hosts
  • Windows Server domain controller providing Active Directory
  • Windows client with the Wazuh agent and Sysmon, where the simulator ran
  • Ubuntu web server in the DMZ
  • Backup share in its own zone, with an off-site copy in Azure over Tailscale

From attack to alert

What happens in the lab when an attacker tries something, in five steps.

  1. Simulator runsThe ransomware simulator runs on a monitored Windows client inside the internal LAN.
  2. Windows logs itSysmon records the process chain, the shadow copy command and the encrypted files and note being written.
  3. Agent forwardsThe Wazuh agent ships the events to the manager across the segmented network.
  4. Rule matchesThe community ransomware rules recognise the encryption, the shadow copy attempt and the ransom note.
  5. Alert raisedThree separate alerts appear on the dashboard, one per behaviour, on every run.

Outcome

A working, segmented lab that raised separate real-time alerts for file encryption, the shadow copy deletion attempt and the ransom note on every simulator run, with an isolated backup path for recovery. Automatic containment was not reached within the project.