IT Security: Defense Against the Digital Dark Arts
Threats & attacks · Cryptography · AAA framework · Network security · Policies & compliance
1 · Security Threats & Attacks
Core Concepts & CIA Triad
- CIA Triad — guiding model for information security policies: Confidentiality, Integrity, Availability
- Confidentiality — keeping information hidden from unauthorized parties
- Integrity — keeping data accurate and untampered with
- Availability — information is readily accessible to those who should have it
| Term | Definition |
|---|---|
| Risk | Possibility of suffering loss in the event of an attack |
| Vulnerability | A flaw in a system that can be exploited |
| 0-Day Vulnerability | Unknown to the software developer, but known to an attacker |
| Exploit | Software used to take advantage of a security bug or vulnerability |
| Threat | Possibility of danger that could exploit a vulnerability |
| Attack | An actual attempt at causing harm to a system |
| Hacker | Someone who attempts to break into a system (black hat = malicious, white hat = authorized) |
Malware Types
Response steps: quarantine by disconnecting from internet → disable auto-backups → run an offline malware scan.
Proactive measures: keep OS updated, use a non-admin account, verify links/downloads/email attachments, ignore pop-ups, limit file sharing, use antivirus.
Network Attacks
| Attack | How It Works |
|---|---|
| DNS Cache Poisoning | Tricks a DNS server into accepting a fake DNS record, redirecting users to a compromised server |
| Man-in-the-Middle (MITM) | Attacker inserts themselves between two communicating parties to intercept or alter data |
| Rogue Access Point | Unauthorized AP installed on the network without the admin's knowledge |
| Evil Twin | Fake AP that mimics a legitimate network to redirect and intercept traffic |
| DoS | Overwhelms a server/network to prevent legitimate access |
| Ping of Death | Sends a malformed oversized ping, causing a buffer overflow and crashing the system |
| Ping Flood | Overwhelms a target with ICMP echo requests |
| SYN Flood | Sends many SYN packets without sending ACK, leaving TCP connections half-open and exhausting resources |
| DDoS | Distributed DoS — uses a botnet to overwhelm a target from many sources simultaneously |
Other Attacks
- Injection Attack — inserts malicious code into a legitimate website or input field; mitigated by sanitizing inputs
- XSS (Cross-Site Scripting) — injection attack targeting users of a service by inserting malicious scripts
- SQL Injection — sends SQL commands as input to a site using a SQL database to manipulate or dump data
- Brute Force — tries every possible password combination; CAPTCHA helps prevent this
- Dictionary Attack — tries commonly used words and phrases rather than all combinations
Social Engineering
2 · Cryptography & Encryption
Core Concepts & Principles
- Encryption — taking plaintext, applying a cipher (algorithm), and producing unreadable ciphertext; decryption is the inverse
- Key — determines the specific output of an encryption algorithm; key length defines maximum potential strength (longer = harder to brute force)
- Security Through Obscurity — flawed assumption that secrecy of the algorithm itself provides security
- Kerckhoffs's Principle — a cryptographic system should remain secure even if everything about the system is public knowledge, except the key
- Cryptanalysis — the practice of breaking/analyzing cryptographic systems (opposite of cryptography)
- Frequency Analysis — studying how often letters appear in ciphertext to deduce the key or plaintext
- Steganography — hiding information inside other data without encrypting it (security by obscurity at the data level)
| Cryptanalysis Attack | Description |
|---|---|
| Known-Plaintext (KPA) | Attacker has some plaintext/ciphertext pairs and uses them to derive the key |
| Chosen-Plaintext (CPA) | Attacker can choose arbitrary plaintexts and obtain the ciphertext |
| Ciphertext-Only (COA) | Attacker only has ciphertext and tries to deduce the key or plaintext |
| Adaptive Chosen-Plaintext (ACPA) | Like CPA but attacker can adapt future queries based on previous results |
| Meddler-in-the-Middle (MITM) | Attacker intercepts the key exchange to impersonate both parties |
Symmetric Encryption
- Symmetric key algorithms use the same key to encrypt and decrypt
- Stream cipher — encrypts data one character/digit at a time; faster and simpler, but vulnerable to key-reuse attacks
- Block cipher — divides data into fixed-size blocks and encrypts each block as a unit; generally more secure
- Initialization Vector (IV) — random value combined with the key to produce a unique encryption key per message, preventing key-reuse vulnerabilities; sent in plaintext alongside ciphertext
| Algorithm | Key / Block Size | Status |
|---|---|---|
| Caesar Cipher | Shift value | Historical only; trivially broken by frequency analysis |
| ROT13 | Fixed (13 positions) | Historical; not encryption, just obfuscation |
| DES | 64-bit key (56 effective), 64-bit block | Deprecated — EFF cracked it in 56 hours in 1998 |
| AES | 128-bit block; 128 / 192 / 256-bit key | Current standard (adopted 2001); brute-force is theoretical |
| RC4 | Variable (stream cipher) | Retired — was used in WEP, WPA, SSL; breakable |
CBC mode (Cipher Block Chaining): Each plaintext block is XOR'd with the previous ciphertext block before being encrypted. Requires an IV for the first block. Provides diffusion (a change in one block affects all subsequent blocks) but does not provide authentication on its own — that requires a separate MAC.
Asymmetric / Public Key Encryption
- Asymmetric cryptography uses a key pair: a public key (shared freely) to encrypt and a private key (kept secret) to decrypt
- Provides Confidentiality, Authenticity, and Non-repudiation
- More computationally expensive than symmetric — in practice, asymmetric is used to securely exchange a symmetric key, then symmetric takes over (TLS does exactly this)
| Algorithm | Notes |
|---|---|
| RSA | One of the first widely adopted asymmetric algorithms; security based on difficulty of factoring large primes |
| Diffie-Hellman (DH) | Key exchange algorithm; allows two parties to derive a shared secret over an unsecured channel without ever transmitting the secret |
| ECC (Elliptic Curve Cryptography) | Uses algebraic curves instead of large prime numbers; a 256-bit ECC key ≈ a 3072-bit RSA key in strength — much more efficient |
Message Authentication Codes (MACs)
Hashing
- Hash function — takes arbitrary input and produces a fixed-size output (digest/hash); designed to be one-way and deterministic
- Ideal hash properties: deterministic, fast to compute, one-way (pre-image resistant), avalanche effect (small input change → drastically different hash), collision resistant
- Hash collision — two different inputs producing the same hash digest; a serious flaw in any hash function
- MIC (Message Integrity Check) — a hash digest of a message used as a checksum to verify it hasn't been altered in transit
- Never store passwords in plaintext — always store the hash; but running hash thousands of times (key stretching) makes brute-force slower
- Rainbow table — precomputed table mapping passwords to their hashes; renders basic hashing of common passwords trivial to crack
- Password Salt — random data added to the password before hashing, making the output unique even for identical passwords, rendering rainbow tables useless
| Algorithm | Digest Size | Status |
|---|---|---|
| MD5 | 128-bit | Deprecated (2010) — susceptible to collisions |
| SHA-1 | 160-bit | Deprecated — was used in TLS/SSL, IPsec, Git; replaced by SHA-2 |
| SHA-2 (SHA-256, SHA-512) | 256 / 512-bit | Current standard; recommended since 2010 |
| SHA-3 | Variable | Latest NIST standard; different internal design (Keccak sponge) from SHA-2 |
PKI & Digital Certificates
- PKI (Public Key Infrastructure) — system defining the creation, storage, and distribution of digital certificates
- Digital Certificate — file proving an entity owns a certain public key; contains: public key, registered owner info, digital signature from a CA
- CA (Certificate Authority) — trusted entity that signs certificates, vouching for the identity of the certificate holder
- RA (Registration Authority) — verifies the identity of entities requesting certificates from the CA
- Root CA — top of the CA hierarchy; its certificate is self-signed and trusted by operating systems/browsers
- End-entity / Leaf certificate — a certificate with no authority to sign other certificates (e.g., a web server certificate)
- Web of Trust — alternative to CA hierarchy where individuals sign each other's keys (used in PGP)
| X.509 Certificate Field | Purpose |
|---|---|
| Version | X.509 version (typically v3) |
| Serial Number | Unique identifier assigned by the CA |
| Certificate Signature Algorithm | Algorithm used to sign the certificate (e.g., SHA-256 with RSA) |
| Issuer Name | Name of the CA that issued/signed the cert |
| Validity (Not Before / Not After) | The date range during which the certificate is valid |
| Subject | The entity the certificate belongs to (e.g., domain name) |
| Subject Public Key Info | The public key and the algorithm it's used with |
| Certificate Signature Value | The CA's actual digital signature over the certificate data |
Cryptographic Protocols & Applications
| Protocol / Tool | How It Works |
|---|---|
| TLS / HTTPS | TLS secures HTTP (HTTPS). Uses asymmetric encryption during the handshake to authenticate the server and exchange a symmetric session key, then switches to fast symmetric encryption (AES-GCM) for the data transfer. Provides: secure channel, mutual authentication, integrity. SSL 3.0 deprecated 2015. |
| Forward Secrecy | Property ensuring that even if the private key is later compromised, past session keys remain safe (achieved via ephemeral DH key exchange per session) |
| SSH | Secure network protocol using encryption to protect connections over untrusted networks; replaces Telnet/rlogin |
| PGP (Pretty Good Privacy) | Encryption application for email/data authentication; relies on asymmetric encryption and a web-of-trust model; keys must be ≥ 128 bits |
| IPsec | Encrypts IP packets; Transport mode encrypts only the payload; Tunnel mode encrypts the entire packet (used in VPNs) |
| L2TP / L2TP+IPsec | L2TP provides the tunnel (passes packets between networks); IPsec provides the secure channel (CIA); combined as L2TP/IPsec for VPNs |
| OpenVPN | Open-source VPN; can operate over TCP or UDP, typically on port 1194 |
Hardware Security
Randomness matters: if key generation isn't truly random, an attacker can predict patterns over time. Operating systems maintain an entropy pool seeded from hardware events (mouse movement, disk I/O) to generate cryptographically secure random numbers.
3 · AAA - Authentication, Authorization & Accounting
Authentication — Core Concepts
- Identification — uniquely describing an entity (e.g., a username)
- Authentication (authn) — verifying identity: proving you are who you claim to be
- Authorization (authz) — controlling what an authenticated identity can access or do; always follows authentication
- Security vs. Usability trade-off — stronger security (longer passwords, MFA) reduces convenience; policies must balance both
- Password policies — enforce minimum length, complexity, rotation schedules, and history to prevent reuse; incorporating good password policies is key for safety
MFA — Multi-Factor Authentication
- MFA requires two or more verification factors from different categories, significantly reducing risk of compromise
- SMS-based OTPs are not recommended — SMS is unencrypted, not private, and susceptible to SIM-swapping; prefer authenticator apps or hardware tokens
| Factor Category | Also Called | Examples |
|---|---|---|
| Something you know | Knowledge | Password, PIN, security question |
| Something you have | Possession | ATM/bank card, hardware token, phone authenticator app |
| Something you are | Inherence (biometric) | Fingerprint, retina scan, face recognition |
| Somewhere you are | Location | GPS location, IP geolocation |
| Something you do | Behavior | Gestures, CAPTCHA, typing cadence |
Biometric Authentication
- Uses unique physiological characteristics (fingerprint, retina, voice, face) to verify identity
- Biometric data should never be stored directly — a mathematical template is stored, not a raw image
- More critical to protect than passwords: if compromised, biometrics cannot be changed
Certificate-Based Authentication
- Uses digital certificates (X.509) to authenticate clients or devices instead of passwords
- Common in VPNs, enterprise Wi-Fi (802.1X / EAP-TLS), and mutual TLS (mTLS)
- Certificate validity is checked against Not Before / Not After dates and the CA's CRL (Certificate Revocation List)
- The seed value for token-based auth is registered with the authentication server; NTP must be synchronized for TOTP to work
AAA Protocols — RADIUS & TACACS+
| Protocol | Full Name | Use Case & Key Notes |
|---|---|---|
| RADIUS | Remote Authentication Dial-In User Service | AAA protocol for network users (Wi-Fi, VPN). Clients don't talk to RADIUS directly — they send credentials to a NAS (Network Access Server), which forwards them. Server replies: Access-Accept, Access-Reject, or Access-Challenge. Only the password is encrypted. |
| TACACS+ | Terminal Access Controller Access-Control System Plus | Cisco AAA protocol for device administration (authenticating admins to routers/switches). Separates authn, authz, and accounting into independent steps. Encrypts the entire packet — more secure than RADIUS for admin use. |
Kerberos
- Authentication protocol using tickets to prove identity over potentially insecure channels
- Uses symmetric encryption; supports AES with checksums
- Tickets expire but support renewal; requires NTP — timestamps prevent replay attacks
- One login → ticket granting → access to multiple services without re-entering credentials
| Step | What Happens |
|---|---|
| 1. Client → AS | Client derives a key from the password and sends an authentication request to the Authentication Server (AS) |
| 2. AS → Client | AS returns a Ticket-Granting Ticket (TGT) and session key, encrypted with the client's derived key |
| 3. Client → TGS | Client presents the TGT to the Ticket-Granting Server (TGS) and requests a service ticket |
| 4. TGS → Client | TGS issues a service ticket for the requested service |
| 5. Client → Service | Client presents the service ticket to the target — no password transmitted! |
SSO & Identity Federation
Authorization
- Describes what an authenticated account has access to — permissions, resources, and allowed actions
Access Control Models
| Model | Who Decides Access | Notes |
|---|---|---|
| DAC — Discretionary AC | Resource owner | Owner controls permissions (Unix file permissions). Flexible but hard to manage at scale. |
| MAC — Mandatory AC | Central authority (policy) | Security labels set by admins; users cannot override. Common in government/military systems. |
| RBAC — Role-Based AC | Job role/group | Access tied to roles, not individuals. Most common in enterprise — scales well. |
Accounting & Auditing
- Accounting — tracking what resources and services users access, and what actions they perform on your systems
- Auditing — reviewing accounting records to ensure compliance, detect anomalies, and investigate incidents; a key component of the accounting pillar
- Audit logs should record: who, what action, when, and from where
- Protect logs from tampering — attackers often attempt to clear logs after a breach to cover their tracks
4 · Securing Networks
Secure Network Architecture
- Network hardening — reducing a network's attack surface through configuration changes and deliberate security steps
- Implicit deny — anything not explicitly permitted is denied; the safest default stance for firewall and ACL rules
- ACLs on firewalls — used to implement implicit deny; supports both whitelisting (allow specific traffic) and blacklisting (block known-bad traffic)
- Traffic monitoring & log analysis — collecting logs from network and client devices and performing automated analysis against user-defined rules; establishes a baseline to detect anomalies
- Normalizing log data — standardizing logs from different devices/systems so they can be compared; critical because formats vary widely
- Correlation analysis — matching events across different systems/logs to identify attack patterns that span multiple sources
- Post-fail analysis — investigating how a compromise happened after the fact; informs future hardening
- Splunk — popular enterprise log analysis and SIEM platform
- Flood guards — detect common DoS/DDoS flood patterns and trigger blocking actions; fail2ban is a popular open-source tool that blocks IPs after repeated failures
Network Hardware Hardening
802.1X & EAP — Port-Based Network Access Control
- IEEE 802.1X — standard for port-based network access control; allows clients to connect using modern authentication methods before gaining network access
- EAP (Extensible Authentication Protocol) — authentication framework used by 802.1X; encapsulated in 802.1X as EAPoL (EAP over LAN)
- EAP-TLS — the most secure EAP type; provides mutual authentication of both client and authentication server using digital certificates; considered the gold standard for wireless security
| 802.1X Component | Role |
|---|---|
| Supplicant | The client making the network access request |
| Authenticator | The network device (switch/AP) that receives the supplicant's request and forwards it to the auth server |
| Authentication Server | Holds the credential database (e.g., RADIUS); tells the authenticator to permit or deny access |
Firewalls & Proxies
Wireless Security — WEP → WPA → WPA2
| Standard | Cipher / Protocol | Security Status |
|---|---|---|
| WEP | RC4 stream cipher with static IV | Broken — IV reuse allows key recovery in minutes (Aircrack-ng); never use |
| WPA | TKIP (RC4 + key mixing, 256-bit keys, sequence counter, 64-bit MIC) | Deprecated — was a firmware-compatible stopgap for WEP hardware; superseded by WPA2 |
| WPA2 | CCMP (AES in Counter Mode + CBC-MAC for integrity) | Current standard — strong encryption; vulnerable to offline brute-force of the 4-way handshake capture |
- WPA2 4-Way Handshake — establishes a Pairwise Transient Key (PTK): AP sends a nonce → client sends a nonce → AP sends the Group Transient Key (GTK) → client ACKs. The PTK (5 sub-keys for encryption, integrity, and data) is derived from these nonces + the pre-shared key
- Nonce — a unique, one-time-use random value generated for a specific cryptographic purpose
- WPS (Wi-Fi Protected Setup) — simplifies joining networks via PIN, NFC, or push-button; consumer feature with known vulnerabilities; disable in enterprise environments; use Wash to verify WPS is off
1. 802.1X + EAP-TLS (requires RADIUS server & PKI — most secure)
2. WPA2-AES/CCMP with a long, complex passphrase + unique SSID
To harden WPA2 against brute force: use a passphrase ≥ 20 characters, change the SSID from the default, and disable WPS.
Network Monitoring & Packet Analysis
- Packet sniffing (capture) — capturing and inspecting network packets; requires root privileges
- Promiscuous mode — NIC mode where the interface captures all packets on the segment, not just those addressed to it
- Port mirroring — switch feature that copies all traffic from a port or VLAN to a designated monitoring port
- Monitor mode (wireless) — allows scanning across channels to capture all wireless frames from any AP or client
- tcpdump — powerful CLI packet capture tool; can write captures to file for later analysis; uses
libpcap - Wireshark — GUI packet analyzer built on
libpcap; more powerful filtering and protocol dissection than tcpdump
IDS & IPS
| System | Function | Placement |
|---|---|---|
| IDS (Intrusion Detection System) | Monitors and alerts on suspicious traffic; does not block | Network (NIDS) or host (HIDS); NIDS needs two NICs — one for monitoring, one for management |
| IPS (Intrusion Prevention System) | Monitors and actively blocks by adjusting firewall rules in real-time | Inline with traffic — must be network-based to intercept packets |
- Signatures — unique characteristics of known malicious traffic used by IDS/IPS to identify threats
- NIDS must be positioned in the network topology where it can see all traffic (e.g., after the router/firewall or on a mirrored port)
UTM — Unified Threat Management
tcpdump — Command Reference
| Flag | What It Does |
|---|---|
-i <iface> | Specify interface (eth0, wlan0, any) |
-n | Don't resolve IP addresses to hostnames (faster output) |
-nn | Don't resolve IPs or port numbers to names |
-v / -vv / -vvv | Increase verbosity — show more packet detail |
-c <N> | Capture exactly N packets then stop |
-w <file> | Write raw packets to a .pcap file for later analysis in Wireshark |
-r <file> | Read and analyze a previously saved .pcap file |
-X | Display packet payload in both hex and ASCII |
-A | Display packet payload in ASCII only (useful for plaintext protocols like HTTP) |
-e | Show Ethernet frame header (source and destination MAC addresses) |
-s 0 | Capture the full packet (default snaplen may truncate; 0 = unlimited) |
-p | Disable promiscuous mode — only capture traffic addressed to this host |
BPF Filter Expressions
tcpdump -i eth0 -nn <filter>host 10.0.0.5 — traffic to or from a specific IPsrc host 10.0.0.1 — only traffic originating from that IPdst host 10.0.0.1 — only traffic destined for that IPport 443 — traffic on a specific port (either direction)tcp / udp / icmp — filter by protocolnet 192.168.1.0/24 — traffic to/from an entire subnetnot port 22 — exclude SSH trafficCombining filters:
tcp port 80 and src host 10.0.0.5icmp or (tcp and port 443)Common one-liners:
tcpdump -i any -nn -w capture.pcap — capture all interfaces to filetcpdump -i eth0 -nn -X 'tcp port 80' — inspect HTTP payloadtcpdump -i eth0 -nn -c 100 'not port 22' — first 100 non-SSH packets
NIDS in Production — Deployment & Placement
- Two-NIC rule — a NIDS host needs a dedicated monitoring NIC (no IP address, passively captures traffic) and a separate management NIC (for alerts, config, and SIEM forwarding); mixing them on one interface limits visibility and exposes the sensor
- Network TAP (Test Access Point) — a passive hardware device inserted inline between two network points; copies all traffic to the monitoring port without introducing latency or a failure point; preferred over SPAN in high-security environments because it cannot be disabled by a switch misconfiguration
- SPAN / Mirror port — cheaper alternative to a TAP; configured on a managed switch to copy traffic to the sensor port; may drop packets under high load and can be accidentally cleared during switch changes
- Placement matters — position the NIDS where it sees the traffic you care about: outside the firewall to see all inbound attempts, or inside to catch lateral movement once an attacker is in. Many deployments use both
- Common NIDS software — Snort (signature-based, widely used), Suricata (multi-threaded, IDS+IPS capable), Zeek/Bro (protocol analysis and logging focused)
- Signature tuning — out-of-the-box rule sets produce many false positives; tuning rules for your environment's traffic baseline is essential before trusting alerts
- SIEM integration — NIDS alerts should feed into a centralized SIEM (e.g., Splunk, Elastic SIEM) so events can be correlated with logs from other sources (firewall, auth, endpoint)
Firewall Types
| Type | How It Works | Key Trade-off |
|---|---|---|
| Stateless (Packet Filter) | Inspects each packet independently against ACL rules (IP, port, protocol). No memory of prior packets. | Fast and simple; cannot detect attacks that span multiple packets (e.g., fragmentation attacks) |
| Stateful | Tracks active connection state (SYN/ACK sequence). Only allows packets that belong to an established, legitimate connection. | Stops spoofed packets mid-stream; slight performance cost; industry default |
| NGFW (Next-Gen Firewall) | Combines stateful inspection with deep packet inspection (DPI), application awareness, user identity, SSL/TLS decryption, and integrated IPS. | Most capable; highest cost and processing overhead; can act as a single-box security stack |
Network Segmentation & DMZ
- Network segmentation — dividing a network into isolated segments so a breach in one zone cannot freely spread to others; limits the blast radius of an attack
- VLAN (Virtual LAN) — logical segmentation within a switch; traffic between VLANs must pass through a router or firewall, enforcing access control even on shared physical infrastructure
- DMZ (Demilitarized Zone) — a separate network segment between the internet and the internal LAN that hosts public-facing services (web servers, mail servers, DNS). Traffic from the DMZ to the internal network is tightly restricted — if a DMZ host is compromised, the attacker cannot freely reach internal systems
5 · Defense in Depth
Defense in Depth — The Concept
- Defense in depth — a layered security strategy where multiple overlapping systems of defense protect IT infrastructure; if one layer is bypassed, the next layer contains the damage
- No single control is perfect — the goal is to make a successful attack require defeating multiple independent layers
- Layers typically span: physical security → network perimeter → network internal → host → application → data
System Hardening — OS Level
- Attack surface reduction — every running service, open port, and installed application is a potential entry point; remove or disable anything not needed
- Disable unnecessary services — stop and prevent startup of any service not required for the system's function (e.g., disable Telnet, FTP, unused scheduled tasks)
- Remove default accounts & credentials — default usernames/passwords are publicly known; rename or delete default admin accounts and change all default passwords immediately
- Apply the principle of least privilege — every user account and process should have only the minimum permissions required to perform its function
- Patch management — keep the OS and all software up to date; unpatched vulnerabilities are one of the most common attack vectors; establish a regular patch cadence (e.g., test within 30 days of release, deploy within 60)
- Baselines & configuration management — define a known-good, hardened configuration (baseline image) and enforce it; deviation from the baseline indicates potential compromise or misconfiguration
- Disable unnecessary hardware features — e.g., disable USB ports on machines that don't need them to prevent baiting/removable media attacks
- Bastion Host — a deliberately hardened host with minimal software and only essential services enabled; commonly used as a jump server / controlled gateway to internal systems, avoiding direct exposure of internal hosts; must be heavily monitored and logged
Application Hardening
- Keep applications patched — applications are a top attack vector; browser plugins (especially Flash, Java), office suites, and web servers must be kept current
- Disable unneeded features and plugins — every enabled feature is additional attack surface; disable browser extensions, unnecessary server modules, and unused APIs
| Approach | How It Works | Use Case |
|---|---|---|
| Application Whitelisting | Only explicitly approved applications are allowed to run; everything else is blocked by default | High-security environments (POS terminals, kiosks, servers); more restrictive |
| Application Blacklisting | Explicitly listed applications are blocked; everything else is allowed | General enterprise use; easier to manage but weaker — unknown malware won't be on the list |
SIEM & Log Management
- SIEM (Security Information and Event Management) — centralized platform that collects, stores, and analyzes log data from across the environment; combines logging with real-time correlation, alerting, and dashboards
- Centralized logging — aggregating logs from all hosts, network devices, and applications into one place; makes investigation and correlation possible and keeps logs out of reach of an attacker who has compromised a single host
- Log normalization — standardizing log format from diverse sources (firewalls, servers, endpoints) so events can be meaningfully compared; usually configured in the SIEM ingestion pipeline
- Automated alerting — write rules (e.g., >5 failed logins in 60 seconds from one IP, or any access to a production DB outside business hours) to trigger real-time alerts; reduces dependence on manual log review
- Traffic pattern analysis — establish a baseline of normal behavior (top talkers, request volumes, access patterns); deviations from baseline are high-value signals for detecting compromise
- Log retention — define how long logs must be kept; driven by compliance requirements (e.g., PCI-DSS: 1 year, HIPAA: 6 years) and operational needs; balance storage cost against investigation depth
- Protect the logs — attackers routinely target logs to cover their tracks; ship logs to a remote, append-only store immediately; restrict write/delete access to log storage
| Tool / Platform | Notes |
|---|---|
| rsyslog | Open-source log daemon (Linux/Unix); collects and forwards syslog messages; lightweight, widely deployed, often feeds into a central SIEM |
| Splunk | Leading commercial SIEM; powerful search language (SPL), dashboards, and alerting; widely used in enterprise SOCs |
| IBM QRadar | Enterprise SIEM with built-in threat intelligence and behavioral analytics |
| RSA NetWitness | Enterprise platform combining SIEM, packet capture, and endpoint telemetry for full threat visibility |
| Microsoft 365 Defender | Enterprise-wide security suite covering endpoints, email, identity, and cloud apps; integrates with UAC (User Account Control) and Azure AD for unified threat detection across Microsoft environments |
Host-Based Security Controls
Vulnerability Management
- Vulnerability scanning — automated tools (e.g., Nessus, OpenVAS) probe systems for known CVEs, misconfigurations, and weak settings without exploiting them; should be run regularly
- Penetration testing — authorized simulated attack that actively exploits vulnerabilities to demonstrate real-world impact; goes beyond scanning to verify whether a flaw is actually exploitable
- CVE (Common Vulnerabilities and Exposures) — public database of known vulnerabilities; each entry has a CVE ID and a CVSS severity score (0–10)
- Patch prioritization — not all patches can be applied instantly; triage by CVSS score, exposure (internet-facing vs internal), and whether a working exploit exists in the wild
6 · Creating a Company Culture for Security
Risk, Objectives & Compliance
- Security is a delicate balance between security and productivity — before designing controls, define what the security architecture is actually meant to accomplish
- Legal requirements shape the objective too — e.g. accepting credit card payments means PCI DSS (Payment Card Industry Data Security Standard) applies
- Security work is fundamentally about determining risk/exposure, understanding the likelihood of attacks, and designing defenses that minimize impact
- Threat modeling is the starting point: identify likely threats and assign priorities. High-value data (user data, especially payment data) gets prioritized first
- Vulnerability scanner — a service that runs against your systems, discovers hosts on the network, probes what's listening, and compares findings against known/disclosed vulnerabilities in a report. Examples: Nessus, OpenVAS, Qualys
- Penetration testing should happen regularly alongside scanning — actively trying to break into the system or network to surface vulnerabilities a passive scan would miss
| PCI DSS Objective | What It Covers |
|---|---|
| 1. Secure network & systems | Build and maintain a secure network architecture |
| 2. Protect cardholder data | Safeguard stored and transmitted payment card data |
| 3. Vulnerability management | Maintain an ongoing vulnerability management program |
| 4. Access control | Implement strong access control measures |
| 5. Monitor & test | Regularly monitor and test networks |
| 6. Information security policy | Maintain a formal information security policy |
Privacy, Data Handling & Destruction
- Privacy policies oversee access to and use of sensitive data — the default should be no access, and people must justify access specifically, within a limited timeframe
- Data handling policies define details of the data itself and set guidelines for how each type should be handled
| Destruction Method | Notes |
|---|---|
| Recycling | Device stays usable after data destruction — erase/wipe, low-level format, or standard format |
| Physical destruction | Ensures data cannot be recovered — drilling, shredding, degaussing, incinerating |
| Third-party destruction | Specialist vendors handle destruction on your behalf |
Users — The Weakest Link
- You can build the best security system in the world, but it won't protect you if users are unsafe
- Never upload confidential information to a third-party service
- Users are generally lazy about security — an overly complex password policy backfires: people write passwords down, which is less safe than a simpler but well-designed policy
- Phishing emails are effective — they remain one of the most successful attack vectors precisely because they target human behavior, not technical flaws
- Third-party vendor security — any vendor you use is trusted with your data by extension. Run a vendor security questionnaire and test their services for vulnerabilities before onboarding
- A working environment where people speak up matters — a mailing list, a security risk form, an open channel for concerns
- Reinforce and reward good behaviors, and always justify why a behavior is good so it sticks instead of being ignored as red tape
Incident Handling
- Detection is the first step of handling any incident — you can't respond to what you haven't noticed
- Analysis comes next: determine the effects and extent of the damage
- Once scope is determined, containment is the next step — and it's time-sensitive
- Severity depends on what and how many systems were compromised, and how the breach affects company functions
- Impact and recoverability (how complicated and time-consuming recovery will be) both factor into the response plan
- Data exfiltration — the unauthorized transfer of data off a compromised computer
- The type of data involved changes how much care is required — government-regulated data (HIPAA/health, PCI/payment card, PII, FISMA, export administration regulations) needs extra handling
Containment strategies vary by system — full shutdown or disconnecting from the network are common examples. Every incident should end with a documented post-mortem.
Mobile Devices & BYOD
- All mobile devices should have screen locks and storage encryption enabled
- BYOD (Bring Your Own Device) saves companies money on hardware but introduces new categories of threat
| BYOD Risk | Mitigation |
|---|---|
| Loss or theft | Screen locks, remote wipe via MDM |
| Data loss / leakage | Data Leakage Prevention (DLP), restrict data access by role |
| Man-in-the-middle attacks | Require MFA, VPN for remote access |
| Malware / jailbreaking | Enterprise Mobile Management (EMM), acceptable use policy (AUP) |
7 · Final Project — Security Design Document
How to use this case study
- Read the company snapshot and the requirements list below — then try to sketch your own security design before revealing mine.
- The write-up under each "My take" toggle is my own submission, written during the course. It isn't a model answer — your design will most likely differ, and that's fine. Lots of different approaches work.
- Below each write-up is a Feedback note — gaps and specifics I missed the first time around, worth remembering for next time.
The Org — Widget Co.
| Factor | Current state |
|---|---|
| Industry | Online retailer of artisanal hand-crafted widgets |
| Employees | 50, in one small office, growing |
| Systems in scope | External purchase website, internal intranet, remote CLI access for engineers, office wireless, company laptops |
| Sensitive data | Customer payment data (extra caution required) + proprietary engineering work |
| Firewall & wireless | Needs reasonable, basic firewall rules and office-wide wireless coverage |
Requirements to incorporate
- Authentication system
- External website security
- Internal website security
- Remote access solution (engineers need CLI access to their workstations)
- Firewall and basic rules recommendations
- Wireless security
- VLAN configuration recommendations
- Laptop security configuration
- Application policy recommendations
- Security and privacy policy recommendations
- Intrusion detection or prevention for systems containing customer data
Executive Summary
As a growing company that sells widgets directly to consumers, there are a few key assets we need to protect from both the consumer and the business perspective. Users enter confidential payment information for us to process, and our engineers work hard on proprietary widget designs we don't want to leak. We have an external website where purchases are processed, an internal intranet for employees, wireless coverage throughout the office, and company laptops issued to employees — all of which represent potential attack targets. Our engineers also require remote access to their workstations with command-line access. With these challenges in mind, here is what I'd recommend, in order of requested implementation.
Authentication System
All employees will be required to authenticate into any work computer, device, or personal device used for work, to prevent bad actors from impersonating employees and gaining access to our systems. We can issue physical U2F keys to add MFA without risking attackers hijacking SMS-based OTPs. This shouldn't be too disruptive to employee work and is incredibly safe so long as employees don't lose their keys — something we should stress in our security policies.
External Website Security
Our website will definitely be a target, so we should work with our web developers (in-house or contracted) to implement best safety practices in their code. We should audit the site to make sure it isn't vulnerable to injection attacks, XSS, or SQL injection, and has proper CAPTCHA blocks to prevent bots from interfering. We'll monitor traffic for malicious activity and be ready to deny access to certain regions or IPs. By working with our developers and auditing their work, we can make our website close to bulletproof.
Internal Website Security
Similar to the external site, we should regularly monitor and analyze traffic through our intranet. If we see a sudden surge in requests from an employee's account or workstation, we can quarantine the machine and check logs to see what happened — remembering to image the disk first so an intruder can't erase traces of their presence. One of the most important parts of intranet security is segmenting the network so a breach in one zone can't reach others.
Remote Access Solution
Our engineers need to connect remotely, so we should set up secure, encrypted VPN access from their location to our servers. We can stand up a RADIUS server to authenticate remote access using the RADIUS protocol. Combined with MFA, we can be confident data stays secure over VPN connections, provided engineers follow our guidelines.
Firewall & Basic Rules Recommendations
Proper firewall setup is critical. We should implement both network-based and host-based firewalls across the company — every employee device runs its host-based firewall to prevent damage from inside and outside the network. For our network-based firewall, I prefer a whitelisting approach: we know what services and sites the company needs, so let's review and allow them instead of blacklisting known bad actors. We'll regularly review and take requests for what needs whitelisting, and set our firewall ACLs to allow or deny traffic accordingly.
Wireless Security
The best current wireless security option is 802.1X + EAP-TLS, which requires a RADIUS server and a PKI. If the company keeps growing, this is well worth the investment — but at our current medium size, WPA2-AES/CCMP is also a reasonable option. We'll disable WPS regardless, since it's vulnerable and unnecessary at this level.
VLAN Configuration Recommendations
We should segment our network using VLANs to prevent compromised devices from infecting or damaging uncompromised devices elsewhere on the network. VLAN traffic will all pass through our firewalls so we can limit the blast radius of an attack. We can also use port mirroring to monitor all traffic from our VLANs, improving our monitoring capability.
Laptop Security Configuration
We should give access and rights to users based on the groups they belong to — someone in marketing shouldn't be able to read/write/execute on the engineering server, since they don't need to and it only exposes us to more risk. Passwords are a must, with a sensible policy that doesn't lead to bad practices or frustrate employees. Biometric access (fingerprint or face scan) would be a beneficial extra layer if budget allows. We can't control employees, so we have to educate them on good practices — don't leave a laptop open at a coffee shop — and encourage good behavior with activities or leaderboards. Encrypting hard disks covers us if an employee forgets and leaves a laptop somewhere.
Application Policy Recommendations
Keep it straightforward: define what's acceptable to use (AUP), whitelist essential applications for the company (blacklist everything else), ensure only those who need access have access, and never store or input sensitive data into a non-authorized third-party service.
Security & Privacy Policy Recommendations
This one matters most because our users can make mistakes they don't even realize are mistakes, so we need to educate them. Policies should be understandable at every level of the company — nothing too complicated to remember. We should inform employees about social-engineering attacks, common scams, and how to spot and report suspicious activity, plus the legal requirements around the data we handle — in our case, PCI (Payment Card Industry) data.
Intrusion Detection / Prevention for Customer Data Systems
These are essential systems for our network. Starting with intrusion detection, we'll place two NIDS/HIDS — one to monitor, one to manage. With IDS in place, we can monitor and get alerted to suspicious traffic, though it won't be blocked automatically. That's where IPS comes in: set up inline with our traffic, it intercepts packets and actively blocks by changing firewall rules in real time when it detects suspicious behavior.
Conclusion
To layer our security strategy using the defense-in-depth concept, there's a lot of ground to cover. This overview walked through the main defense areas, what they do, and how to implement them at Widget Co. to keep our data safe. There's always more to add, but this is a strong starting point.
Overall feedback received
- Google grader: didn't mention specifics enough (e.g. HTTPS, LDAP) — didn't need to over-explain, just needed to name the specific mechanism.
- General theme: the concepts were right throughout, but naming the exact protocol/standard (TLS, WPA3, bastion host, PCI-DSS segmentation) rather than describing it in generic terms is what separates a good design doc from a great one.
8 · What Actually Matters — Key Takeaways
Threats — know what you're actually defending against
- Humans are the weakest link, not the algorithms. Phishing works because it targets behavior, not encryption strength. A company can have flawless crypto and still get breached by one clicked link. Technical controls matter, but user education and a culture where people report suspicious activity matter just as much.
- Know your malware vocabulary — it drives your response. A worm spreading network-wide calls for network segmentation and containment; a rootkit hiding at the admin level means you can't trust the compromised host's own tools to detect or remove it — you rebuild from a known-good image instead.
- Implicit deny beats reactive blacklisting. Whether it's a firewall ACL, application whitelisting, or an access control list — deciding what's explicitly allowed and denying everything else is consistently the stronger default than trying to enumerate every bad actor.
Cryptography — the trust machinery underneath everything
- Symmetric for speed, asymmetric for trust — and real systems use both. TLS is the textbook case: asymmetric encryption (RSA/ECDH) authenticates the server and exchanges a session key during the handshake, then fast symmetric encryption (AES-GCM) carries the actual data. Understanding this hybrid pattern explains most of modern secure communication.
- Never store a password — store a salted hash of it. Salting defeats rainbow tables by making every hash unique even for identical passwords. Key stretching (hashing thousands of times) slows brute force. If you ever see plaintext passwords in a database, that's the finding that matters most.
- Kerckhoffs's Principle: the algorithm can be public, only the key is secret. "Security through obscurity" — hiding how a system works instead of relying on a real secret — is a design smell, not a defense.
- PKI is how the internet knows who it's talking to. A certificate binds a public key to an identity and is vouched for by a CA. Check validity dates and the CRL before trusting one — an expired or revoked cert is a red flag, not a formality.
AAA — authenticate, authorize, then account for everything
- MFA means factors from different categories, not two passwords. Something you know + something you have (or are) is what actually reduces risk. SMS OTPs are the weakest "something you have" — SIM-swapping defeats them; prefer authenticator apps or hardware keys (U2F).
- RADIUS for network access, TACACS+ for device administration. RADIUS only encrypts the password field and is used for Wi-Fi/VPN clients through a NAS. TACACS+ encrypts the whole packet and is the stronger choice for admins managing routers and switches.
- Kerberos means a password is never sent over the wire more than once. One login gets a Ticket-Granting Ticket; every subsequent service request trades that ticket for access — no repeated credential transmission, and NTP-synced timestamps stop replay attacks.
- Principle of Least Privilege is the throughline of authorization. RBAC, DAC, and MAC are just different ways of answering "how little access can this account have and still do its job?" — the smaller the blast radius, the smaller the incident.
Securing networks — layers of control, not one big wall
- Host-based and network-based firewalls are both required, not either/or. The network firewall stops what's coming from outside; the host firewall is the last line of defense once something is already inside the perimeter.
- IDS alerts, IPS blocks. An IDS needs a copy of traffic (via a TAP or SPAN port) and can only tell you something happened. An IPS sits inline and can actually stop it — at the cost of becoming a potential single point of failure if it goes down.
- Segmentation contains a breach instead of letting it spread. VLANs, a DMZ for public-facing services, and isolating anything that touches regulated data (PCI/HIPAA) into its own segment are the same idea applied at different scopes.
- 802.1X + EAP-TLS is the gold standard for wireless; WPA2/WPA3-AES/CCMP is the practical minimum. Disable WPS everywhere, and always separate guest Wi-Fi from the corporate network.
Defense in depth — no single control is enough
- Hardening is subtraction, not addition. Disable unused services, remove default accounts, shrink the attack surface — every open port or installed app you don't need is one more thing an attacker can try.
- Patch management is the highest-leverage recurring task in security. The majority of real-world breaches exploit known, already-patched vulnerabilities — the failure is operational (patching cadence), not a lack of available fixes.
- Centralized logging protects the evidence, not just the analysis. Ship logs off the host immediately — attackers routinely try to clear local logs to cover their tracks. A SIEM's real value is correlating events across sources, which requires normalized, centralized data in the first place.
- Vulnerability scanning finds the door; penetration testing proves it opens. Run both regularly — a scan tells you a flaw might exist, a pen test tells you whether it's actually exploitable.
Culture & policy — the layer that makes all the above stick
- Define what the security architecture is for before designing controls. Threat modeling — what's the high-value data, who wants it, how likely is an attack — decides where you spend your limited security budget.
- Compliance requirements (PCI-DSS, HIPAA, FISMA) aren't paperwork — they're a pre-built threat model. If you handle a regulated data type, the standard has already done a lot of the "what do I need to protect against" thinking for you.
- Incident response is a sequence: detect → analyze → contain → recover → post-mortem. Chain of custody matters the moment you suspect a breach, not after — evidence collected sloppily is evidence you can't use.
- BYOD and mobile devices need policy before hardware. Write the AUP and MDM/EMM plan before employees start bringing devices, not after the first lost phone.
The bigger picture