SECURITY ENGINEERING · PART 0 · START HERE · BASICS · 3 OF 229

How Cyber Attacks Happen: Kill Chain and ATT&CK

Follow one attack on the ShopRung practice shop from the first search to stolen customer data: reconnaissance, initial access through a forgotten staging site, a foothold, privilege escalation, lateral movement and exfiltration. Then the two maps defenders use, the Cyber Kill Chain and MITRE ATT&CK, and where each step could have been stopped or detected.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. 14
  14. 15
  15. 16
  16. 17
  17. 18
  18. 19
  19. 20
  20. 21
  21. 22
  22. 23
  23. 24
  24. 25
  25. 26
  26. 27
  27. 28
  28. 29
  29. 30
  30. 31
  31. 32
  32. 33
  33. 34
  34. 35
  35. 36
  36. 37
  37. 38
  38. 39
  39. 40
  40. 41
  41. 42
  42. 43
  43. 44
  44. 45
  45. 46
  46. 47
  47. 48
  48. 49
  49. 50
  50. 51
  51. 52
  52. 53
  53. 54
  54. 55
  55. 56
  56. 57
  57. 58
  58. 59
  59. 60
  60. 61
  61. 62
  62. 63
  63. 64
  64. 106
  65. 107
  66. 108
  67. 109
  68. 110
  69. 111
  70. 112
  71. 113
  72. 114
  73. 115
  74. 116
  75. 117
  76. 118
  77. 119
  78. 120
  79. 121
  80. 122
  81. 123
  82. 124
  83. 125
  84. 126
  85. 127
  86. 128
  87. 129
  88. 130
  89. 131
  90. 132
  91. 133
  92. 134
  93. 135
  94. 136
  95. 137
  96. 138
  97. 139
  98. 140
  99. 141
  100. 142
  101. 143
  102. 144
1 / 13

Press play to hear the narration, or step through at your own pace.

Key takeaways

  • Recon
  • initial access
  • foothold
  • escalate
  • move sideways
  • exfiltrate
  • Kill Chain
  • MITRE ATT&CK

Notes

Step 1 · Recon

Step one is reconnaissance. The attacker looks before touching anything. Search engines, job ads and public code repositories reveal which technology the company uses. DNS and certificate records list its subdomains. One of them stands out: a staging site, built for testing and then forgotten. Most of this is passive. It reads public information and never touches the target, so the company sees nothing at all.

Reconnaissance
  • search engines, job ads, code repositories
  • DNS and certificate records list every subdomain
  • found: staging.shoprung.test a forgotten test site
  • nothing here touches the target, so nobody sees it

Step 2 · Initial access

Step two is initial access, the first way in. The staging site runs an old build, and its search box is vulnerable to SQL injection, an attack you will run yourself in Part six. The attacker uses it to read the staff table, including password hashes. Notice the pattern: the main site was fine. The way in was something old and forgotten. The other common first doors are a phishing email, a reused password and a key left in public code.

Initial access
  • the staging site runs an old build with a search box
  • the search box is open to SQL injection
  • result: the staff table, with password hashes
  • other common ways in: phishing, stolen passwords, exposed keys

Step 3 · Foothold

Step three is the foothold. One weak password hash cracks offline in minutes. The same password works on the admin page, which has no second factor. The admin page lets staff upload files, so the attacker uploads a small script called a web shell, and can now run commands on the server. Then they add a quiet way back in, in case the first hole is fixed. That is called persistence.

Execution and persistence
  • one weak hash cracks offline
  • the same password works on the admin page: no MFA
  • the admin page lets staff upload files: a web shell
  • now the attacker runs commands on the server, and adds a way back in

Step 4 · Escalate

Step four is privilege escalation. The web server runs as a low-privilege user, which is good practice. But its environment variables hold a cloud access key, and that key belongs to a role allowed to read every storage bucket in the account. Nobody meant to grant that much. It was simply easier at the time. One over-permissive role turns a small break-in into a large one.

Privilege escalation
  • the web server runs as a low-privilege user
  • but its environment holds a cloud access key
  • the key belongs to a role that can read every bucket
  • one over-permissive role is all it takes

Step 5 · Move sideways

Step five is discovery and lateral movement. The attacker lists everything the key can reach. Staging and production share one cloud account, so there is no wall between them. In one bucket sits a nightly backup of the production customer table. The staging server was never the goal. It was only the door. Attackers almost always land somewhere unimportant and then move sideways to what matters.

Discovery and lateral movement
  • list the buckets and databases the key can reach
  • staging and production share one account: no wall between find: a nightly backup of the production customer table
  • the staging server was never the goal, only the door

Step 6 · Exfiltrate

Step six is exfiltration. The attacker downloads the backup over ordinary encrypted web traffic, at night, so it blends in. Then comes the impact: the data is sold, or the company gets a demand for money to keep it private. For the company that means telling customers, possible fines, lost trust and weeks of cleanup. Count the steps. Six stages, and every single one used something ordinary: a forgotten site, a weak password, a generous role.

Exfiltration and impact
  • download the backup over normal HTTPS, at night
  • it looks like ordinary traffic
  • then: sell the data, or demand money to keep it private
  • impact: customers, fines, trust, weeks of cleanup

Map 1 · Kill chain

Defenders use two maps to describe attacks like this. The first is the Cyber Kill Chain, from Lockheed Martin. It has seven stages: reconnaissance, weaponization, delivery, exploitation, installation, command and control, and actions on objectives. Its big idea is simple and encouraging. The attacker must complete every stage. The defender only has to break one link, and the earlier the better.

Cyber Kill Chain
  • 1 reconnaissance
  • 2 weaponization
  • 3 delivery
  • 4 exploitation
  • 5 installation
  • 6 command and control
  • 7 actions on objectives
  • break one link, the chain stops

Map 2 · MITRE ATT&CK

The second map is MITRE ATT&CK, a free public catalogue built from real incidents. It lists fourteen tactics, which are the attacker's goals, such as initial access, privilege escalation, lateral movement and exfiltration. Under each tactic are techniques, the specific ways to reach that goal, each with an identifier. Security teams use it as a shared language: which techniques can we detect today, and where are we blind?

MITRE ATT&CK
  • 14 tactics: the attacker's goal at each step, from reconnaissance to impact
  • techniques: how they do it T1190 exploit a public app T1078 use valid accounts
  • built from real incidents
  • teams map detections to it

Where to stop it

Now replay it as a defender. An asset inventory would have found and deleted the forgotten staging site. Safe database queries would have blocked the injection. A second login factor would have made the cracked password useless. Least privilege would have kept that key away from every bucket. Separate accounts would have walled off production. And an alert on a large, unusual download would have caught the last step. Six steps, six chances.

One control per step
  • recon: inventory, delete the old staging site
  • access: safe queries, patching
  • foothold: MFA, strong hashing
  • escalate: least privilege, no keys in the environment
  • move: separate accounts
  • exfiltrate: alert on big reads

Common mistakes

Mistakes. Protecting only the main website while old and test systems sit open. Trusting everything inside the network once someone is in. Running staging and production in one account. Collecting logs that nobody reads. And when an alert finally fires, treating it as the whole incident, cleaning one server, and never asking how the attacker got there or where else they went.

Avoid these
  • guarding only the front door
  • forgetting old and test systems
  • trusting everything inside
  • one account for everything
  • logs nobody reads
  • treating the first alert as the whole incident

Say it like this

In the interview: an attack is a chain. Reconnaissance, initial access, a foothold with persistence, privilege escalation, lateral movement, and then exfiltration or impact. I describe each step with MITRE ATT&CK tactics and techniques, and for each one I want a preventive control and a detective control, because the attacker needs every step to work and we only need to break one.

In the interview
  • "Attacks are a chain: recon, initial access, a foothold with persistence, privilege
  • escalation, lateral movement, then exfiltration or impact.
  • I map steps to ATT&CK and put
  • a preventive and a detective
  • control at each one."

Interview questions

Q1What are the stages of a cyber attack?

Typically reconnaissance, initial access, execution and persistence (a foothold), privilege escalation, discovery and lateral movement, then collection, exfiltration or another impact such as ransomware.

Q2What is the Cyber Kill Chain?

A seven-stage model from Lockheed Martin: reconnaissance, weaponization, delivery, exploitation, installation, command and control, and actions on objectives. Breaking any one stage stops the intrusion.

Q3What is MITRE ATT&CK?

A public knowledge base of attacker behaviour built from real incidents. It organises techniques under tactics (the attacker's goal at each step) and gives teams a shared language for detection coverage and threat reports.

Q4What is the difference between a tactic and a technique in ATT&CK?

A tactic is why: the goal of a step, such as privilege escalation. A technique is how: a specific method, such as exploiting a public-facing application (T1190) or using valid accounts (T1078).

Q5What is lateral movement?

Moving from the first compromised system to others inside the environment, using stolen credentials, trust between systems or shared accounts, until the attacker reaches the data or control they want.

Q6What is persistence?

Anything an attacker sets up to keep access after a reboot, a password change or a patch: a new account, a scheduled task, an SSH key, a web shell or a long-lived cloud key.

Q7Why do attackers often target staging or test systems?

They are patched less, monitored less and often forgotten, yet frequently share credentials, networks or cloud accounts with production, so they make an easy door to the real target.

Q8Where would you place controls along an attack chain?

At every step, with one preventive and one detective control where possible: inventory and patching, MFA, least privilege, network and account separation, and alerts on unusual access and large data transfers.