QA
Beginner LevelWeb Security & Cyber Defense

What is the difference between a DoS and a DDoS attack?

❓ Interview Prompt: Compare DoS (single source attack) vs DDoS (distributed botnet attack), Volume attacks vs Application Layer (Layer 7) attacks.

1. DoS (Denial of Service):

Originates from a single machine or single IP address attempting to exhaust server resources. Easily blocked by IP rate limiting or firewall rules.

2. DDoS (Distributed Denial of Service):

Uses a distributed botnet of thousands or millions of compromised IoT devices or servers across the globe to flood target systems:

•
Layer 3/4 DDoS: SYN floods, UDP amplification (neutralized by Cloudflare / AWS Shield scrubbing centers).
•
Layer 7 DDoS: HTTP flood targeting expensive API search endpoints.

Code Implementation Example

bash
# Blocking a single DoS IP address via iptables firewall:
sudo iptables -A INPUT -s 203.0.113.50 -j DROP
💡Blocking a single DoS attack IP via iptables firewall rules.
🎯 Interview Key Takeaway

DoS attacks originate from a single IP; DDoS attacks use distributed botnets requiring cloud scrubbing centers.

More Web Security & Cyber Defense Interview Questions

Beginner LevelSecurity & Web Security

Explain OWASP Top 10 vulnerabilities (XSS, CSRF, SQL Injection) and their defenses.

Beginner LevelSecurity & Web Security

What are the 3 types of XSS (Stored, Reflected, DOM-based) and how do they differ?

Beginner LevelSecurity & Web Security

How do Parameterized Queries (Prepared Statements) prevent SQL Injection attacks?