Cybersecurity classroom · hands-on defense

DDoS Defense Simulation Studio

Learn the threat. Measure the impact. Engineer the mitigation. Verify the outcome.

Local learning environment. All traffic, clients, attacks, responses, and performance figures are synthetic calculations inside your browser. This page sends no attack traffic, accepts no target URLs, and makes no network requests for its labs. It works offline; external reading links require internet. Progress lasts for this open page—export before closing.

Explore denial-of-service resilience

A guided sequence combining conceptual instruction, safe simulation, defensive decisions, and assessment.

5 PRACTICAL LABS
Learning outcomes

What students will be able to do

  • Distinguish DoS, DDoS, legitimate flash crowds, and three major DDoS categories.
  • Explain SYN state exhaustion, reflection/amplification, and application resource exhaustion.
  • Interpret link use, origin work, request-rate trends, mitigation effectiveness, and false positives.
  • Select upstream, network, transport, and application defenses appropriate to a scenario.
  • Compare token-bucket and fixed-window throttling with different identification keys.
  • Document an incident response and export evidence of lab decisions.
Suggested classroom path: Read Tutorials → Traffic simulator → Rate-limiting lab → Defense architect → Incident tabletop → Knowledge check. Each simulation reports modeled outcomes, not measured performance on a real network.
LAB 01

Traffic & mitigation

Choose a scenario, adjust six defensive controls, visualize utilization and legitimate-user success, and satisfy an objective.

LAB 02

Rate-limit trade-offs

Compare per-IP and per-identity policies against users behind NAT, a single bot, and a distributed botnet.

LAB 03

Defense architect

Build layered defenses and compare results across traffic categories before sending a design to the simulator.

LAB 04

Incident tabletop

Handle detection, upstream coordination, traffic management, and recovery with decision feedback.

LAB 05

Knowledge check

Assess the causes, symptoms, mitigations, and limits of DDoS protection, with explanations after grading.

INSTRUCTOR RESOURCE

Official references

Read CISA/FBI/MS-ISAC guidance, OWASP, an IETF RFC, and current operational practices.

Safety and simulation scope

The lab deliberately implements mathematical traffic modeling rather than packet generation. Sample rates, filtering percentages, cache effects, and resource capacities are chosen for teaching; they must not be interpreted as empirical predictions or vendor guarantees. No scanners, sockets, request floods, botnet controls, or real target testing are included.

Foundations and DDoS protection tutorials

Eight short lessons, supporting examples, formulas, and authoritative follow-up reading.

SELF-PACED

Volumetric · L3/L4

Exhausts network transit or packet-processing capacity. Examples: UDP floods and reflection/amplification.

Protocol/state · L3/L4

Consumes connection-tracking or other protocol state. Example: TCP SYN flooding.

Application · L7

Consumes expensive application resources. Examples: HTTP request floods and slow connection abuse.

1. Availability, DoS versus DDoS, and flash crowds

Availability means authorized users can obtain the service when needed. A denial-of-service (DoS) event compromises this property by exhausting some finite resource: bandwidth, packet-processing capacity, connection state, workers, database calls, memory, or a dependent service. A distributed DoS event involves multiple sources; source count alone does not reliably identify the intent.

A flash crowd is an intense but legitimate surge, such as a ticket sale or major news event. Both floods and flash crowds can elevate requests per second, latency, and error rates. A defender must correlate client behavior, endpoints, reputation, protocol anomalies, geographic and network distribution, and business context. Aggressive blocking can turn a flash crowd into a defender-caused outage.

Key distinction: malicious rate is not the same as total rate. Successful defense is measured partly by the share of legitimate users who can still complete their requests.

2. Volumetric flooding and reflection/amplification

Volumetric attacks attempt to consume a link or packet-handling budget. A defender with a 100 Mbps bottleneck cannot solve a sustained 400 Mbps ingress flood simply by adding application servers behind that bottleneck. Mitigation must occur at or before the constrained part of the path, commonly using upstream filtering, scrubbing, and traffic distribution.

Reflection occurs when third-party servers respond toward a victim, sometimes because requests carry a spoofed victim source address. Amplification occurs when replies consume more bytes than the triggering requests. DNS, NTP, and other UDP services have been abused this way. Response size and amplification vary with protocol and configuration; not every DNS request is reflective or amplifying.

Modeled ingress (Mbps) ≈ events/second × average KB/event × 8 / 1000 Example: 40,000 events/s × 1 KB × 8 / 1000 ≈ 320 Mbps.

Anti-spoofing at network borders, appropriately configured authoritative services, ingress/egress filtering, provider cooperation, and distributed mitigation services reduce risk. A WAF that only sees HTTP cannot absorb a flood that already fills an upstream circuit.

3. TCP SYN flooding and state exhaustion

A TCP connection generally begins with SYN → SYN-ACK → ACK. In a SYN-flood scenario, many initiations may not complete, leaving incomplete connection state in a listening service or intermediate device. The resulting pressure can interfere with new legitimate connections. This is not limited to repeated SYNs from one source IP: attackers may use many machines or spoof addresses, and benign clients may retransmit.

SYN cookies and related approaches defer or reduce incomplete-connection state. Connection limits, appropriate queue sizing, edge or proxy termination, and upstream protections may also be relevant. SYN cookies help with a particular state-exhaustion mechanism; they do not create more upstream bandwidth. RFC 4987 discusses methods and their trade-offs.

Normal: client SYN → server SYN-ACK → client ACK → established Under load: many incomplete handshakes → state pressure → new connections may fail Defense concept: validate handshake before committing scarce state.
4. Application-layer HTTP floods and slow requests

An HTTP flood can overwhelm an expensive endpoint, such as a search query or report-generation route, without a correspondingly dramatic network-bandwidth spike. Cost per request matters: 300 expensive dynamic operations per second may impose more work than 3,000 cache hits. Some low-and-slow patterns consume connections or workers over time rather than maximizing request volume.

Defenses include edge HTTP inspection, bot signals, endpoint-specific rate limiting, caching, safe resource budgets, concurrency limits, request/connection timeouts, queueing, and operational capacity. Challenge or block decisions should be tested against accessibility needs, shared-IP networks, and legitimate automation.

Important: a WAF is not equivalent to network-layer DDoS mitigation. Controls must match the attacked layer and the location of the bottleneck.

5. Detection: baselines, telemetry, and false positives

Collect inbound and outbound bps/pps, connection and SYN rates, handshake success, HTTP requests per second, error codes, origin CPU/memory, queued work, latency percentiles, cache hit ratio, source distribution, and user success metrics. Establish normal baselines by time of day and day of week. Distinguish a change in traffic from a change in service quality.

A useful defensive hypothesis might be: “Traffic increased 8×, handshake completion fell sharply, but bandwidth remained moderate, suggesting protocol-state pressure.” Then validate with independent telemetry rather than treating one alert or signature as proof.

Legitimate success (%) = delivered legitimate operations / attempted legitimate operations × 100 False-positive drop (%) = legitimate operations rejected by security rules / attempted legitimate operations × 100

In these labs, traffic labels are known because they are generated from a synthetic dataset. Real operators cannot assume perfect ground truth; that is why user impact and observability matter.

6. Layered defenses and their limitations
  • ISP/provider coordination and upstream scrubbing: aims to remove unwanted traffic before congested customer links; coverage depends on traffic type, routing, and service scope.
  • Anycast/distributed edges: distribute ingress across multiple locations and capacities; distribution is not a guarantee against very large or localized attacks.
  • CDN and caching: serve suitable content away from the origin; dynamic requests and cache-busting traffic may still reach expensive services.
  • WAF and bot rules: identify and handle some application-layer patterns, often using metadata and behavioral indicators; tune to reduce false positives.
  • Rate limits: enforce quotas by IP, account, token, endpoint, or multiple keys. One IP may represent many legitimate people behind NAT; a distributed attack may stay below per-IP limits.
  • SYN protections: preserve handshake/state resources but are not a complete answer to bandwidth or HTTP floods.
  • Autoscaling: improves some service-capacity bottlenecks but can create expense and does not fix a saturated ingress link.

The optimal design is a combination of controls informed by the actual bottleneck, not “turn every control to maximum.”

7. Rate limiting: fixed windows versus token buckets

A fixed-window counter admits a configured number of events within each fixed time interval, then resets at the boundary. It is simple but allows boundary bursts. A token bucket refills tokens at a specified rate, up to a burst capacity; accepting an event consumes one token. It can tolerate bounded bursts while constraining sustained average rates.

Token bucket: tokens = min(capacity, tokens + elapsed_seconds × refill_rate) if tokens ≥ 1: accept and subtract 1 else: reject / defer / challenge (policy-dependent) Fixed-window: window_id = floor(time / window_seconds) allow while count(window_id, key) < quota

Identity selection is as important as the algorithm. Per-IP policy may reject users behind shared NAT; per-account policy requires trustworthy identity. A distributed botnet can bypass a generous per-IP policy. Production systems often combine several independent limits.

8. Preparation, response, recovery, and evidence
  1. Prepare: identify critical services and contact paths; establish baselines, service dependencies, provider escalation plans, and tested mitigation configurations.
  2. Detect and classify: confirm availability impact and determine whether the bottleneck is transit, protocol state, origin work, or a dependency.
  3. Contain and mitigate: collaborate with upstream providers, activate appropriate controls, and continuously assess legitimate-user impact.
  4. Recover: verify availability, request and transaction success, errors, latency, and the absence of lingering adverse rules.
  5. Review: preserve timestamps, alerts, rule changes, traffic summaries, service metrics, decisions, and lessons learned.

Do not assume that blocking a few apparent source addresses resolves a distributed or spoofed attack. Be cautious with indiscriminate geography-based blocks, blanket CAPTCHAs, or blackholing that also deny legitimate traffic.

Lab 01 · Traffic and mitigation simulator

Run a modeled 36-second traffic trace. Change controls and compare defensive outcomes.

TRAFFIC MODEL

Scenario and infrastructure

Defensive controls

All sliders and controls are abstractions. Scrubbing/filtering percentages are illustrative rather than measured effectiveness. “Event” denotes a synthetic traffic unit; it is not always an HTTP request.

Service health dashboard

Ready to simulate
t = 0 s
Legitimate requests served
—
Higher is better
Protected link load
100% means saturated
Origin work demand
—
As % of available capacity
Attack events filtered
—
By explicit security rules
Select a scenario and run the trace. Watch the legitimate-user service rate, not simply the fraction of traffic blocked.
Link utilizationOrigin demandLegitimate service
Line chart · simulated seconds · percentagesFalse-positive filtering: —

Last simulated interval

MeasurementBefore protectionAfter / estimated
Run a scenario to populate metrics.

Analyst trace

No traffic has been modeled.

Challenge: verify a mitigation objective

A mission is completed when its modeled user-service and resource objectives are met.

Lab 02 · Rate-limiting and fairness

Apply real token-bucket and fixed-window logic to a synthetic request log; compare detection and collateral damage.

POLICY EXPERIMENT

Request-trace configuration

Fixed-window comparison: the quota applies separately within every 10-second interval; refill rate does not affect that algorithm. Each input event is processed once, in timestamp order. Token-bucket tokens are lazy-refilled independently for each key.

Outcome by traffic cohort

Total requests
—
Synthetic trace
Known bad throttled
—
Detection / mitigation rate
Legitimate throttled
—
False-positive rate
Malicious accepted
—
Distributed evasion matters
Simulated cohortGeneratedAllowedLimitedMeaning
Run a policy to see results.

Request decisions (sample)

TimeCohortResult
No decisions yet.

Policy mechanics

Select and evaluate an algorithm.

Policy comparison

Try Compare IP vs identity to see how shared source addresses change user impact.

Reflection prompts

  1. Which cohort is most vulnerable to per-IP false positives, and why?
  2. Which attacker cohort can distribute below each per-IP threshold?
  3. What additional independent controls could help beyond choosing an identity key?

Lab 03 · Layered defense architect

Select defensive architecture profiles, inspect coverage across threats, and send a design into the traffic simulator.

DESIGN STUDIO

Architecture templates

Select a starting point. You can adjust individual layers in the Traffic simulator before or after evaluating.

Active protections: none.

Architecture coverage matrix

Estimated fraction of legitimate traffic successfully handled after 36 modeled seconds, by scenario. A high score in one attack class does not imply broad resilience.

ScenarioLegitimate successLink pressureOrigin pressureInterpretation
Choose a profile and evaluate coverage.
Note that the model omits several production concerns, including service-provider transit limits, cloud billing, packet processing per second, backend dependencies, and routing convergence.

Lab 04 · DDoS incident response tabletop

A four-decision scenario covering triage, upstream mitigation, policy tuning, and post-incident work.

DECISION EXERCISE
PHASE 1 / 4

Loading scenario…

Incident log and decision rationale

StageDecisionAssessment
No tabletop decisions recorded.

Lab 05 · DDoS knowledge check

Ten multiple-choice questions; immediate grading with detailed explanations. An 80% score completes the lab.

ASSESSMENT
Choose one answer for each question, then select Grade assessment.

Reference library and further study

Primary government, standards, and technical references. External pages require a network connection.

OFFICIAL SOURCES

Government and standards

Application and architecture guidance

Modeling caution: Classroom coefficients, the 36-second timeline, and synthetic request traces on this page are instructional inventions, not values reported by the linked sources. Use the reference materials for technical definitions and professional deployment principles, not to infer that a specific check box guarantees a particular success rate.

Suggested student deliverables

  1. Export one unprotected and one mitigated run for two different DDoS classes.
  2. Explain why a defense effective against SYN state exhaustion might fail during a volumetric UDP flood.
  3. Compare per-IP and per-identity rate limiting using false-positive and malicious-acceptance rates.
  4. Identify a legitimate surge that a rate limiter mishandles; propose a safer configuration.
  5. Complete the tabletop and knowledge assessment, then export the lab report.