Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 37 ยท Threats and Models

Threat Actors and the Attack Surface

Learn who attacks networks and why, how the kill chain describes an intrusion, and how to measure and shrink your attack surface with a runnable Python inventory.

You cannot defend against "hackers" in general. Different attackers have different goals, skills and patience, and a defence that stops a bored teenager may do nothing against a funded criminal group. Good defenders describe their threat actors: who might attack, what they want, and how far they will go. They also describe the attack surface: everything an attacker could touch. Putting the two together tells you where to spend limited time and money.

This lesson introduces the main threat actors, a common model of how an intrusion unfolds (the kill chain), and practical ways to measure the attack surface of a network.

Who attacks networks?

Actor Typical goal Capability What it means for you
Opportunistic attackers / script users Easy wins, bragging, botnet building Low: automated scans and public exploits Basic hygiene (patching, no default passwords) stops most of them
Cybercriminals Money: ransomware, fraud, data theft Medium to high, organised, often professional Backups, segmentation, monitoring, email defences
Hacktivists Publicity, disruption for a cause Low to medium; defacement and DoS DDoS protection, patched public sites
Insiders Revenge, profit, or mistakes Already have access Least privilege, logging, separation of duties
Competitors and spies Trade secrets Medium to high, patient Data classification, egress monitoring
State-sponsored groups Espionage, sabotage Very high, long-term, custom tools Mature detection and response; assume breach

Most organisations never face the last row, but nearly every internet-connected network faces the first two every day. A new server on a public address is probed within minutes by automated scanners. That is not personal; it is background radiation.

Note that insiders include honest mistakes: an administrator who opens a firewall port "just for testing" and forgets, or a developer who commits a password to a public repository. Many incidents are not attacks at all but accidents that an attacker later finds.

The kill chain

Researchers describe intrusions as a sequence of steps. A widely used model is the cyber kill chain; the MITRE ATT&CK framework gives a much more detailed catalogue of techniques for similar stages. The value for a defender is that breaking any link can stop the attack, and each stage leaves different evidence.

flowchart LR
    R["Reconnaissance"] --> D["Delivery / initial access"]
    D --> X["Exploitation"]
    X --> P["Persistence"]
    P --> L["Lateral movement"]
    L --> G["Goal: steal, encrypt, disrupt"]

Network controls act mostly at reconnaissance, delivery and lateral movement.

  • Reconnaissance: the attacker learns your addresses, open ports and software versions. Defence: expose less, and watch for scans.
  • Initial access: a phishing email, an exposed remote desktop, an unpatched VPN gateway. Defence: patching, filtering, strong authentication.
  • Persistence: the attacker installs a way back in. Defence: host monitoring, configuration control.
  • Lateral movement: from one machine to others, usually across the internal network. Defence: segmentation and internal firewalls, the topic of chapter 3.
  • Actions on objectives: data leaves, files are encrypted, services stop. Defence: egress filtering, backups, detection.

The attack surface

The attack surface is the sum of all points where an attacker can try to enter or extract data: open ports, web applications, email gateways, VPN endpoints, Wi-Fi networks, exposed APIs, employees, even physical ports. Reducing it is the cheapest security improvement available, because a service that is not exposed cannot be attacked.

Useful questions:

  1. What can be reached from the internet? (The external surface.)
  2. What can be reached from a compromised laptop? (The internal surface.)
  3. Which of those need to be reachable at all?

Count and classify. The program below takes a made-up asset inventory, scores each exposed item by who can reach it and how sensitive it is, and then shows how the score drops when you close what is not needed.

Python Score and shrink an attack surface

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Real attack surface management works the same way, with automated discovery instead of a hand-written list. The hard part in practice is not the arithmetic; it is finding everything, including forgotten test servers and "shadow IT" that someone set up without telling the security team.

Mapping attacker stage to defence

A neat way to check coverage: list each kill chain stage and the controls you have for it. Empty stages are gaps.

Python Find gaps in kill-chain coverage

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The gaps are lateral movement and exfiltration: exactly the stages that segmentation and egress monitoring address in later lessons.

Write a one-page "who would attack us and why" for any network you look after. Even three bullet points focus decisions better than a long list of tools.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Which threat actor already has legitimate access and can cause harm through malice or error?

    Insiders start with access. Least privilege, logging and separation of duties limit what a malicious or careless insider can do.
  2. 2. At which kill-chain stage does network segmentation help most?

    Segmentation limits how far an attacker can move from the first compromised machine to others.
  3. 3. What is an attack surface?

    Ports, applications, accounts, Wi-Fi, email gateways and people all contribute to the attack surface.
  4. 4. A new server is reachable from the internet and gets probed within minutes. What does this tell you?

    Mass scanners continuously sweep the internet. It is normal, which is why only needed services should be exposed.
  5. 5. Which is the cheapest, most effective way to lower risk according to this lesson?

    A service that is not exposed cannot be attacked. Hiding on odd ports is obscurity, not protection.

Summary

  • Know your likely threat actors: opportunistic, criminal, hacktivist, insider, competitor, state.
  • The kill chain (or MITRE ATT&CK) shows where in an intrusion each control can interrupt it.
  • The attack surface is everything reachable; shrink it by closing, restricting and removing.
  • Count, score and review exposure regularly, including forgotten and shadow assets.
  • Check controls against each stage to find gaps such as lateral movement and exfiltration.

Next: Common Network Attacks and How to Spot Them