Denial-of-service attacks: While many cybersecurity attacks aim to steal some information or gain unauthorized access to resources, denial-of-service or DoS attacks aim to deny the legitimate clients of some online service the ability to access this service.
Motivation for DoS: Motivation may be blackmail (hit a service, then stop and ask for money to avoid repetition of the attack), revenge (disgruntled client), elimination of competition, political statement, or just because. Blackmail is the most common motivation.
Mechanisms for DoS: The main idea is to overconsume some resource at the online service, needed by legitimate client. This resource can be:
CPU (overconsume by sending requests for computation) - analogy: waiting at cashier while the customer in front of you slowly counts their change
Memory (overconsume by doing memory-heavy operations) - analogy: waiting for an important letter while your mailbox is being stuffed with advertisement materials
Network (overconsume by just sending lots and lots of traffic) - analogy: congestion on a freeway and you're trying to get to work
Sockets (overconsume by opening many long-lived connections) - analogy: waiting to store your suitcase at the airplane, while the customer in front of you is trying to fit 5 oversized suitcases into different overhead bins
DoS vs DDoS: Often services have many powerful servers, with many resources. To cause denial-of-service the attacker may need to orchestrate their attack from hundreds or even thousands of compromised machines, all sending traffic to the target service. This is known as distributed denial-of-service or DDoS.