Showing raw Markdown: the renderer could not load.
## Questions
### 1. Which statement correctly distinguishes a DoS attack from a DDoS attack?
*Objective: 1. Explain what denial-of-service (DoS) and distributed denial-of-service (DDoS) attacks are, and why attacks from botnets are hard to block.*
- A) A DoS attack steals data, while a DDoS attack only makes the service slow.
- B) A DoS attack needs physical access to the server, while a DDoS attack comes over the Internet.
- C) Both make a service unavailable by exhausting a resource, but a DDoS attack sends the traffic from many machines at once, usually a botnet.
- D) A DDoS attack always uses UDP, while a DoS attack always uses TCP.
### 2. Your web site receives requests from 80,000 different addresses, each sending about 2 requests per minute, all in the ranges of ordinary home Internet providers. A colleague suggests a firewall rule that blocks any address above 100 requests per minute. What will happen?
*Objective: 1. Explain what denial-of-service (DoS) and distributed denial-of-service (DDoS) attacks are, and why attacks from botnets are hard to block.*
- A) The attack stops, because the rule blocks all 80,000 addresses.
- B) The rule blocks almost nothing: every address is far below the limit, and the harm comes from the sum, so you need global, behaviour-based or upstream defences.
- C) The rule blocks only real customers, because attackers never use home networks.
- D) The rule works, but only if the firewall also checks that the requests use TCP.
### 3. A site's 1 Gbit/s Internet link has been at 100% for ten minutes. Most of the incoming traffic is UDP from thousands of addresses, and the web server's CPU is at 3%. Which class of attack is this, and where do you defend first?
*Objective: 2. Classify DDoS attacks as volumetric, protocol or application-layer attacks, and give an example of each.*
- A) Volumetric: defend upstream (provider, CDN or scrubbing service), because a rule behind a full link comes too late.
- B) Application-layer: add a rate limit on the web server.
- C) Protocol: turn on SYN cookies on the web server.
- D) Application-layer: add more CPU to the web server.
### 4. Which row correctly matches a class of DDoS attack with its typical unit of measure and the resource it exhausts?
*Objective: 2. Classify DDoS attacks as volumetric, protocol or application-layer attacks, and give an example of each.*
- A) Application-layer: bits per second; it exhausts bandwidth.
- B) Protocol: requests per second; it exhausts CPU.
- C) Volumetric: packets per second; it exhausts the connection table.
- D) Protocol: packets per second; it exhausts state tables of servers, firewalls or load balancers.
### 5. Why can an attacker use open DNS resolvers as reflectors, but can't easily reflect traffic off a normal TCP service?
*Objective: 3. Explain how reflection and amplification attacks work and why source address spoofing makes them possible.*
- A) DNS messages are not encrypted, so anyone can read them.
- B) UDP has no handshake, so the server can't verify the source address and sends its reply to whoever the packet claims to come from. TCP's handshake needs the real sender to answer.
- C) Routers never drop UDP packets, but they always drop TCP packets with spoofed addresses.
- D) TCP servers refuse every request that comes from outside their own network.
### 6. On your DNS resolver you see many queries of about 60 bytes with the source address `203.0.113.80`. Each is answered with about 3,000 bytes. Which statement is correct?
*Objective: 3. Explain how reflection and amplification attacks work and why source address spoofing makes them possible.*
- A) The amplification factor is about 5, and the replies go to the attacker.
- B) The amplification factor is about 50, and the replies go to the attacker, who owns `203.0.113.80`.
- C) The amplification factor is about 50, and the replies go to `203.0.113.80`, the probable victim whose address was spoofed. You should restrict recursion to your own clients.
- D) The amplification factor is about 0.02, so there is no risk.
### 7. A search page is under attack: 10,000 addresses each send a few requests per minute to `/search`, bandwidth use is 4%, and the database CPU is saturated. Which combination of defences fits best?
*Objective: 4. Compare DDoS defences (overprovisioning, rate limiting, SYN cookies, web application firewalls, anycast and CDNs, scrubbing services, blackholing) and choose the right one for each attack type.*
- A) Blackhole the server's IP address with the provider.
- B) Double the Internet bandwidth.
- C) Enable SYN cookies and shorten the TCP timeouts.
- D) Put a CDN and a web application firewall in front, challenge suspicious clients, rate-limit `/search` and cache popular results.
### 8. The nginx configuration below protects a login page. About how many requests can one client address have answered in 10 seconds if it sends as fast as it can? (The rest get status 429.)
*Objective: 4. Compare DDoS defences (overprovisioning, rate limiting, SYN cookies, web application firewalls, anycast and CDNs, scrubbing services, blackholing) and choose the right one for each attack type.*
```nginx
limit_req_zone $binary_remote_addr zone=login:10m rate=10r/s;
location /login {
limit_req zone=login burst=20 nodelay;
limit_req_status 429;
}
```
- A) About 120: the burst of 20, plus 10 per second for 10 seconds.
- B) About 10: one request per second.
- C) About 100: 10 per second for 10 seconds, ignoring the burst.
- D) About 21: only the burst plus one, whatever the time.
### 9. Your site is attacked at 03:00. The runbook says "step 4: escalate to the provider". What must be written in the runbook beforehand so that this step is quick and effective?
*Objective: 5. Plan a DDoS response: traffic baseline, detection, runbook and escalation to the provider.*
- A) The attacker's home address and a plan to contact them.
- B) The instruction to wait for the provider to call you.
- C) The provider's DDoS or security contact, your account or contract identifiers, who is authorized to call, and what to report (affected addresses, start time, type of traffic).
- D) Your administrator passwords, so the provider can log in and fix the servers.
### 10. At 10:00 your traffic is six times the usual peak, right after a newsletter went out. Logs show many different browsers and countries you usually serve, pages requested in a normal order, sessions that log in and buy, and a low error rate. What is the best first conclusion and action?
*Objective: 5. Plan a DDoS response: traffic baseline, detection, runbook and escalation to the provider.*
- A) A DDoS attack: blackhole the site immediately.
- B) Probably a legitimate surge: keep watching, add capacity or caching if needed, and don't block the traffic.
- C) A DDoS attack: block all countries except one.
- D) A reflection attack: close the DNS resolvers.
---
## Answer key
<details>
<summary>Show answers</summary>
| # | Answer | Explanation |
|---|---|---|
| 1 | C | Both are denial-of-service: the goal is to exhaust a resource. What makes a DDoS attack hard to stop is that it comes from many machines at once, usually a botnet. Neither is limited to one protocol, and neither is about stealing data. |
| 2 | B | Each address sends about 2 requests per minute, far below 100, so the rule blocks nothing. The attack is harmful only in the sum, which is why per-address rules are not enough against a botnet and you also need global limits, behaviour rules, challenges and upstream capacity. |
| 3 | A | A full link and a quiet CPU mean the bandwidth is exhausted: a volumetric attack. Traffic that fills the link is already lost before your server's rules see it, so you need capacity upstream: the provider, a CDN or a scrubbing service. SYN cookies and web rate limits address other resources. |
| 4 | D | Protocol (state-exhaustion) attacks such as a SYN flood are measured in packets per second and exhaust state tables. Volumetric attacks are measured in bits per second and exhaust bandwidth, application-layer attacks in requests per second and exhaust CPU, database or connections. The other rows mix those up. |
| 5 | B | UDP is connectionless, so a service can't confirm who sent a packet and replies to the address it sees. That makes spoofing possible, and ingress filtering (BCP 38) is the root fix. With TCP, the attacker would have to receive the SYN-ACK to continue. |
| 6 | C | 3,000 / 60 = 50. The replies go to the source address in the queries, `203.0.113.80`, which is the spoofed address of the probable victim, not the attacker. To stop being a reflector, restrict recursion to your own clients, and filter spoofed sources at your edge. |
| 7 | D | The attack is application-layer and low and slow per address, with spare bandwidth. A WAF, bot challenge, a per-path rate limit and caching address it directly. Blackholing would complete the attack, more bandwidth does nothing for a database, and SYN cookies address a different class. |
| 8 | A | The client may use the burst of 20 at once, then 10 per second: about 20 + 10 × 10 = 120 answered requests in 10 seconds. Answer C forgets the burst, and the burst is not a cap on the total over time. Everything above gets 429. |
| 9 | C | Escalation works when the right contact, identifiers and facts are ready: the provider's DDoS or security line, who may call, and what to report. Waiting for the provider, or giving out passwords, is not escalation, and the attacker's real address is not known (or reachable). |
| 10 | B | The traffic matches a campaign: varied browsers, normal navigation, completed sales and a low error rate. With a baseline and triage, you recognise a flash crowd and keep serving customers. Blackholing or blocking countries would cause the outage you want to avoid. |
</details>