Chrysolites Open Courses

Cybersecurity Topics: Threats, Defences and Careers · Course book

Chapter 2: Common Cyber Attacks

Pairs with Lesson 2: The Most Common Cyber Threats and How to Stop Them

Attackers have a large toolbox, but most real-world incidents rely on a surprisingly small number of techniques used again and again. Learning to recognise those techniques, how each one works and what stops it, gives defenders a practical map of the threats they are most likely to meet. This chapter surveys eight of the most common forms of cyber attack: malware, phishing, password attacks, denial of service, man-in-the-middle interception, drive-by downloads, malicious advertising and rogue security software. For each, it explains the mechanism in plain terms and the defences that work against it. A summary table brings them together, and the chapter ends with the general habits that protect against almost all of them at once. The aim is understanding for defence; trying any of these techniques against systems you do not own or have permission to test is a crime in most countries.

Malware and phishing: the two most common entry points

Malware is software designed to harm a device or its user. It includes viruses that attach themselves to files, worms that spread across networks without help, Trojans that pretend to be useful programs, spyware that records activity, and ransomware that encrypts files and demands payment. Malware needs a way in: an email attachment, a download, a compromised website, an infected memory stick or a vulnerability in software that is exposed to the internet. Once running, it often tries to stay hidden, to spread to other machines and to contact its operator for instructions.

The main defences are keeping operating systems and applications updated, since updates close the vulnerabilities that malware exploits; running reputable anti-malware software that checks files and behaviour; limiting user accounts to normal rather than administrator rights, so that malware cannot easily change the system; and keeping backups that malware cannot reach.

Phishing is the use of deceptive messages to trick people into revealing information, sending money or running malware. A phishing email may imitate a bank, a delivery company or a colleague, and usually creates a sense of urgency: your account will be closed, a parcel is waiting, the boss needs a payment today. Phishing is so common because it targets people rather than technology, and people can be persuaded where software cannot. It is often the first step that delivers malware or steals the password used in a later attack. Email filtering, multi-factor authentication, training that helps people recognise warning signs, and a simple, blame-free way to report suspicious messages are the key defences. Phishing is important enough to have its own chapter later in this course.

Password attacks

Passwords remain the most common way to protect accounts, so attackers have developed several ways to defeat them. A brute-force attack tries every possible combination, which is practical only for short or simple passwords. A dictionary attack tries common words, names and previously leaked passwords first, which succeeds far more often because people choose predictable passwords. Password spraying reverses the approach: instead of trying many passwords against one account, which would trigger a lockout, the attacker tries one or two very common passwords against thousands of accounts. Credential stuffing uses username and password pairs leaked from one website to log in to others, exploiting the habit of password reuse.

Attacks are also divided by where the guessing happens. An online attack guesses against a live login page, so it is slow and can be limited by lockouts, delays and alerts. An offline attack happens after a database of password hashes has been stolen, so the attacker can guess at full computer speed with nothing to stop them except the strength of the passwords and of the hashing method.

Defences include long, unique passwords generated by a password manager; multi-factor authentication, which makes a stolen password alone insufficient; limits on repeated login attempts; checks that reject passwords known to have appeared in leaks; and, on the server side, slow password-hashing functions with a unique salt for every account.

Denial of service and man-in-the-middle attacks

A denial-of-service (DoS) attack aims to make a website or service unavailable, attacking the availability part of the CIA triad. The simplest form floods a target with more traffic than it can handle. A distributed denial-of-service (DDoS) attack sends that traffic from thousands of devices at once, often a botnet of hijacked computers, routers and internet-connected cameras. Because the traffic comes from so many places, it is hard to block without also blocking genuine users. Defences include services that absorb and filter traffic across many data centres, limits on how many requests a single source can make, and plans agreed in advance with the internet provider.

In a man-in-the-middle (MITM) attack, the attacker secretly positions themselves between two parties who believe they are talking directly to each other. The attacker can then read, record or alter the messages in transit. On a local network this might be done by impersonating the Wi-Fi router; in public places, by setting up a fake hotspot with a convincing name such as a café's. The strongest defence is encryption with authentication: when a website uses TLS and the browser checks its certificate, an attacker in the middle cannot read the traffic or impersonate the site without causing a warning. Users should take browser certificate warnings seriously, avoid entering sensitive information on unknown public networks without protection, and prefer apps and sites that encrypt all traffic.

Interception can also happen further from the user. Attackers who compromise a home router can change its settings so that name lookups point to servers they control, quietly redirecting every device in the house. Changing the router's default administrator password, installing its firmware updates and turning off remote administration remove the easiest routes to that kind of attack, and they take only a few minutes.

Userlaptop Real websitebank server Attackerfake hotspot what the user believes trafficrelayed TLS with certificate checks stops the attacker reading or altering the traffic
Figure 2.1 — A man-in-the-middle attack. The user thinks they are talking directly to the bank, but their traffic passes through a device the attacker controls.

Drive-by downloads, malvertising and rogue software

A drive-by download infects a device simply because its user visited a compromised or malicious web page, sometimes without clicking anything at all. The page contains code that probes the browser and its plug-ins for known vulnerabilities and, if it finds one, silently installs malware. Legitimate websites can be compromised and turned into delivery points, so visiting only well-known sites is not a complete defence. Keeping the browser and operating system fully updated is the most effective protection, because drive-by attacks depend on flaws that have usually already been fixed.

Malvertising hides malicious code or links inside online advertisements. Because advertising networks place adverts across thousands of websites, a single malicious advert can reach visitors to reputable sites. Some malvertising leads to drive-by downloads; some leads to fake download pages or scam offers. Browser updates, built-in protection against harmful sites, and caution with adverts that promise prizes or urgent warnings all reduce the risk.

Rogue security software, sometimes called scareware, pretends to be anti-virus software. A pop-up claims that the computer is infected and urges the user to download a tool or pay for a "clean-up". The download is itself malware, or the payment is simply stolen. Related scams use fake technical support phone numbers. Genuine security warnings come from software the user has installed, not from a web page, and no reputable company cold-calls customers to say their computer is infected.

Summary of attacks and defences

AttackHow it worksMain CIA goal harmedKey defences
MalwareHarmful software runs on a deviceAll threeUpdates, anti-malware, least privilege, backups
PhishingDeceptive messages trick peopleConfidentialityFiltering, MFA, training, easy reporting
Password attacksGuessing or reusing stolen passwordsConfidentialityUnique passwords, MFA, lockouts, slow hashing
DoS and DDoSOverwhelming a service with trafficAvailabilityTraffic filtering services, rate limits, ISP planning
Man-in-the-middleIntercepting traffic between two partiesConfidentiality, integrityTLS with certificate checks, trusted networks
Drive-by downloadVisiting a page exploits the browserAll threeBrowser and system updates
MalvertisingMalicious code inside online advertsAll threeUpdates, harmful-site protection, caution
Rogue security softwareFake warnings push fake toolsConfidentiality, moneyAwareness; trust only installed security tools

The table reveals a pattern. A handful of habits defend against nearly every attack on the list: keep software updated; use unique passwords with multi-factor authentication; give accounts only the privileges they need; keep backups that attackers cannot reach; encrypt traffic; and teach people to pause before acting on an urgent or unexpected request. None of these is expensive or exotic, yet together they block the large majority of everyday attacks. Specialised defences matter for specialised threats, but they cannot compensate for missing basics.

Check your understanding

  1. Explain the difference between a dictionary attack and password spraying, and why spraying is designed to avoid account lockouts.
  2. Why is an offline password attack more dangerous than an online one?
  3. What makes a distributed denial-of-service attack harder to stop than one from a single source?
  4. Describe how a fake Wi-Fi hotspot could be used for a man-in-the-middle attack, and what protects a user who visits a website over TLS.
  5. Why is visiting only well-known websites not a complete defence against drive-by downloads?
  6. Choose three attacks from the summary table and explain how keeping software updated helps against each.

Install Chrysolites Open Courses

Android / Chrome / Edge: open the browser menu and choose Install app or Add to Home screen.

iPhone / iPad (Safari): tap the Share button, then Add to Home Screen.