Skip to content

About

Blue-team automation toolkit for the eCitadel 2026 defensive security competition. Bootstrap, hardening, triage, and continuous monitoring scripts for Debian 13, Fedora 43, pfSense/FreeBSD, and Windows Server 2022. Built for rapid setup and scoring-safe defense under a live 6-hour competition window.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eCitadel 2026 - Blue Team Defensive Toolkit

A cross-platform set of defensive scripts written for eCitadel 2026, a blue-team cyber-defense competition. The goal in this format is to keep a set of scored services online for a fixed window while a red team actively attempts to compromise the machines.

I wrote the bootstrap, triage, hardening, and watchdog scripts in this repository to give my team a consistent starting point across the different operating systems in our environment. During the round I personally defended the Fedora 43 host see the Fedora runbook for the execution guide I followed on that machine.


What this demonstrates

  • Cross-platform hardening - Debian 13, Fedora 43 (+ SELinux), pfSense/FreeBSD, and Windows Server 2022 (registry, WDigest, LLMNR/NBT-NS, NTLMv2, audit policy)
  • Baseline-and-diff triage - capturing a clean pre-change snapshot and comparing against it after suspected intrusion, rather than guessing what changed
  • Continuous monitoring - background watchdogs with tunable intervals and a consolidated alert log
  • Scoring-aware change management - every change is dry-run-previewed or reversible, with an explicit list of "looks like good hardening but costs points" actions to avoid

Why the workflow is ordered this way

The competition-day sequence is bootstrap → triage → harden → watchdog, and the order is deliberate:

  • Triage runs before hardening so the baseline captures the machine's clean state. A baseline taken after changes is useless for spotting what the red team altered.
  • Hardening is always dry-run first. In a scored environment, an over-aggressive change (closing a scored port, restricting SSH ciphers the scoring engine can't negotiate) costs points immediately so previewing before applying is the default, not an afterthought.
  • Watchdogs run for the full window so intrusion signals surface continuously instead of only when someone happens to look.

The scoring-safety rules below exist because the fastest way to lose points in this format isn't the red team it's breaking your own scored service while hardening.


Folder structure

eciv-scripts/
├── bootstrap/
│   ├── bootstrap-debian.sh       First-run setup for Debian 13
│   ├── bootstrap-fedora.sh       First-run setup for Fedora 43
│   └── bootstrap-pfsense.sh      (manual see pfSense notes below)
│
├── harden/
│   ├── harden-debian.sh          Debian 13 hardening (10 sections)
│   ├── harden-fedora.sh          Fedora 43 hardening (11 sections + SELinux)
│   ├── harden-pfsense.sh         pfSense / FreeBSD hardening
│   └── harden-windows.ps1        Windows Server 2022 (combined 18 sections)
│
├── triage/
│   ├── triage-linux.sh           Debian + Fedora triage (shared)
│   ├── triage-pfsense.sh         pfSense triage
│   └── triage-windows.ps1        Windows Server 2022 triage
│
└── watchdog/
    ├── watchdog-linux.sh         Debian + Fedora continuous monitor
    ├── watchdog-pfsense.sh       pfSense continuous monitor
    └── watchdog-windows.ps1      Windows Server 2022 continuous monitor

Competition-day order of operations

Run this sequence on each system as soon as your 6-hour window starts. Total setup time is approximately 10–15 minutes per system if run in parallel.

Step 1 - Bootstrap (install tools + stage scripts)

# Debian 13
sudo bash bootstrap/bootstrap-debian.sh

# Fedora 43
sudo bash bootstrap/bootstrap-fedora.sh

# pfSense - no bootstrap script needed; tools are pre-installed
# Copy scripts to pfSense manually via scp or the GUI file manager

Step 2 - Triage (capture clean baseline BEFORE hardening)

# Linux (Debian or Fedora)
bash ~/.rrintel/bin/triage-linux.sh

# pfSense
sh triage/triage-pfsense.sh

# Windows Server 2022 (elevated PowerShell)
.\triage\triage-windows.ps1

Run triage BEFORE hardening so you have a clean pre-change snapshot.

Step 3 - Harden

# Debian 13
sudo bash ~/.rrintel/bin/harden-debian.sh --dry-run   # review first
sudo bash ~/.rrintel/bin/harden-debian.sh             # apply
sudo systemctl reload ssh

# Fedora 43
sudo bash ~/.rrintel/bin/harden-fedora.sh --dry-run
sudo bash ~/.rrintel/bin/harden-fedora.sh
sudo systemctl reload sshd

# pfSense
sudo sh harden/harden-pfsense.sh --dry-run
sudo sh harden/harden-pfsense.sh
# Then confirm SSH settings in: System > Advanced > Admin Access

# Windows Server 2022 (elevated PowerShell)
.\harden\harden-windows.ps1 -DryRun
.\harden\harden-windows.ps1
# Reboot or logoff to fully activate WDigest, LLMNR, NBT-NS, NTLMv2 changes

Step 4 - Start watchdogs (run in background for the full 6 hours)

# Linux
nohup bash ~/.rrintel/bin/watchdog-linux.sh > /dev/null 2>&1 &

# pfSense
nohup sh watchdog/watchdog-pfsense.sh > /dev/null 2>&1 &

# Windows (elevated PowerShell - background job)
Start-Job { & .\watchdog\watchdog-windows.ps1 }

Step 5 - Check alerts throughout the round

# Linux / pfSense
tail -f ~/.rrintel/ALERTS.log

# Windows
Get-Content $env:USERPROFILE\.rrintel\ALERTS.log -Wait

Step 6 - Re-triage after Red Team activity

# Linux
bash triage/triage-linux.sh --compare

# Windows
.\triage\triage-windows.ps1 -Compare

# pfSense
sh triage/triage-pfsense.sh --compare

Key script options

harden-debian.sh / harden-fedora.sh

Option Effect
--dry-run Show what would change, touch nothing
MIN_LEN=16 Override minimum password length
MAX_AGE=45 Override PASS_MAX_DAYS
LOCKOUT_N=3 Override failed-attempt lockout threshold
DO_SSHD=0 Skip SSH hardening section
DO_SYSCTL=0 Skip sysctl section

harden-windows.ps1

Parameter Effect
-DryRun Preview only
-MinLen 16 Minimum password length
-LockoutThr 3 Account lockout threshold
-RenameAdminTo 'sysop17' Rename built-in Administrator
-DisableBuiltInAdmin -NewAdminUser 'sysop17' Disable RID 500 after verifying replacement
-SkipRegistry Skip all registry sections
-SkipAuditPolicy Skip auditpol configuration

watchdog-linux.sh

Variable Default Effect
INTERVAL 30 Seconds between checks
SUID_INTERVAL 10 Run SUID scan every N cycles
FAILTHRESH 10 Failed login count to trigger alert

Scoring-safety rules do NOT do these

Action Why not
PasswordAuthentication no in sshd Locks out scoring engine
Mass password reset Breaks every AD-backed scored service
Enable firewall without knowing scored ports Drops scored services = point loss
Disable services without confirming they're unscored Direct point loss
VM rollback / revert Competition rules §Conduct point deduction
Offensive scans against other teams Immediate disqualification
Run scoring-agent interference Immediate disqualification

Critical cipher/MAC warning (SSH)

harden-debian.sh and harden-fedora.sh restrict SSH ciphers and MACs to modern algorithms. If the scoring engine connects with an old OpenSSH client and fails, you will see sshd drop the connection in the auth log.

Quick fix - remove cipher restriction without re-running full script:

sudo sed -i '/^Ciphers /d; /^MACs /d; /^KexAlgorithms /d' /etc/ssh/sshd_config
sudo sshd -t && sudo systemctl reload ssh

Alert file locations

~/.rrintel/ALERTS.log                  - all systems
~/.rrintel/watchdog-linux-<host>.log   - full watchdog log (Linux)
~/.rrintel/watchdog-pfsense-<host>.log - full watchdog log (pfSense)
~/.rrintel/watchdog-windows-<host>.log - full watchdog log (Windows)
~/.rrintel/harden-<os>-<host>-<ts>.log - hardening run log
~/.rrintel/triage/<ts>/                - triage snapshots

Runbooks


Scope and disclaimer

This repository documents defensive operations within an authorized, sanctioned competition environment. Scored-service details (host IPs, scored ports) are intentionally omitted, since those are issued at round start. The scripts are shared as a reference for the methodology bootstrap, baseline, harden, monitor not as a turnkey tool for any specific environment.

About

Blue-team automation toolkit for the eCitadel 2026 defensive security competition. Bootstrap, hardening, triage, and continuous monitoring scripts for Debian 13, Fedora 43, pfSense/FreeBSD, and Windows Server 2022. Built for rapid setup and scoring-safe defense under a live 6-hour competition window.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages