
CY376 Blue Team project — pfSense DMZ, Suricata IDS/IPS, and automated host hardening against CVE-2014-6271
CY376: Network Monitoring, Security and Auditing — End-of-Semester Project Blue Team | University of Mines and Technology, Tarkwa
Author: Kennedy Kumi Holomah Index number: FCM.41.018.148.23 Student ID: 9013004623
This project builds, secures, and monitors a demilitarised zone (DMZ) hosting a public-facing Ubuntu/Apache web server behind a pfSense firewall, entirely within an isolated VMware Workstation lab. It was built as a Blue Team exercise for CY376 (Network Monitoring, Security and Auditing) at the University of Mines and Technology, Tarkwa, and demonstrates a full defensive lifecycle rather than a single control in isolation: a segmented network boundary, inline detection at that boundary, a real exploitation attempt against a named CVE, automated remediation, and re-validation that the fix actually closed the gap.
The project deliberately pairs each defensive layer with evidence rather than just a configuration screenshot: Suricata's detection is shown catching a live Shellshock exploit attempt in real time, the same payload is shown failing outright after hardening is applied, and the non-obvious infrastructure problems encountered along the way (hardware offload settings silently blocking packet capture, default HOME_NET scoping silently breaking directional signatures, a hardening script's own permission lockdown breaking the server it was meant to protect) are documented as findings in their own right, not edited out.
HOME_NET correctly scoped to the DMZ subnet so that LAN-originated attack traffic is treated as external.scripts/dmz_web_hardening.sh) patches Bash, disables the CGI handler Shellshock relies on, restricts SSH to the LAN, enables a host firewall (UFW) and fail2ban, and locks down web-root permissions.Full write-up, evidence screenshots, and analysis: docs/CY376_DMZ_Report_Kennedy_Kumi_Holomah.pdf.
All inter-segment traffic passes exclusively through pfSense; no path bypasses the firewall.
.
├── README.md
├── .gitignore
├── scripts/
│ └── dmz_web_hardening.sh # Host hardening script for the DMZ web server
├── docs/
│ └── CY376_DMZ_Report_Kennedy_Kumi_Holomah.pdf # Full project report
└── evidence/
└── figure01_lab_topology.png ... figure11_wazuh_dashboard.png
# The 11 captioned screenshots from the report, numbered to match
# the figure numbers used throughout docs/CY376_DMZ_Report_*.pdf
scripts/dmz_web_hardening.sh targets the DMZ Ubuntu/Apache host. It is written to be safe to re-run: every configuration file it touches is backed up first (.bak-YYYYmmdd-HHMMSS suffix), and all actions are logged to a timestamped file under /var/log.
# On the DMZ web server
sudo bash scripts/dmz_web_hardening.sh
Before running, review the CONFIG section at the top of the script (LAN subnet, HTTP/HTTPS ports) to match your own topology.
What it does:
mod_cgi/mod_cgid (removing the Shellshock attack surface outright), and locks down web-root ownership/permissions.A completion summary is printed at the end, and full details of each step are in the report.
See Section 6 (Analysis and Recommendations) of the report for the full discussion.
| Host | Role | Interface / VMnet | IP Address |
|---|
| pfSense | Firewall / router | WAN (em0) | 192.168.248.138 (DHCP, NAT) |
| pfSense | Firewall / router | LAN (em2) | 192.168.20.1/24 |
| pfSense | Firewall / router | DMZ (em1) | 192.168.10.1/24 |
| Kali Linux | Attacker host | VMnet4 (LAN) | 192.168.20.102 |
| LAN Client | General LAN host | VMnet4 (LAN) | 192.168.20.100 |
| DMZ Web Server | Target / protected asset | VMnet3 (DMZ) | 192.168.10.10 |
| Wazuh Manager | SIEM / log platform | VMnet4 (LAN) | 192.168.20.103 |
| Test | Pre-hardening | Post-hardening |
|---|
| Shellshock exploit attempt | Payload accepted; Suricata alert fired (SID 2022028) | HTTP 404 — CGI handler removed |
| SSH from LAN (Kali) | Available, unrestricted | Available, restricted to 192.168.20.0/24 |
| Web root access | Served default content | Briefly 403 during hardening, then restored |
| Custom Suricata drop rule | N/A | Confirmed active block on match |