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.
- 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
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.
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
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.
# 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# Linux (Debian or Fedora)
bash ~/.rrintel/bin/triage-linux.sh
# pfSense
sh triage/triage-pfsense.sh
# Windows Server 2022 (elevated PowerShell)
.\triage\triage-windows.ps1Run triage BEFORE hardening so you have a clean pre-change snapshot.
# 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# 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 }# Linux / pfSense
tail -f ~/.rrintel/ALERTS.log
# Windows
Get-Content $env:USERPROFILE\.rrintel\ALERTS.log -Wait# Linux
bash triage/triage-linux.sh --compare
# Windows
.\triage\triage-windows.ps1 -Compare
# pfSense
sh triage/triage-pfsense.sh --compare| 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 |
| 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 |
| 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 |
| 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 |
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~/.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
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.