---
title: "Phases of a Cyberattack | FiveStudy"
description: "Reconnaissance, initial access, persistence, lateral movement, taking action, and evading detection: what attackers do in each phase and the evidence each leaves."
url: https://fivestudy.com/guides/ap-cybersecurity-2-1-c-phases-of-a-cyberattack
---

[AP Cybersecurity](https://fivestudy.com/ap-cybersecurity) · Study guide

# Phases of a Cyberattack

[Figure: FiveStudy]

FiveStudy

AP® Cybersecurity · Unit 2 · Risk, Adversaries & Physical Security

AP® Cybersecurity · Unit 2 · Risk, Adversaries & Physical Security

# Phases of a Cyberattack

The six phases attackers work through, what happens in each, and the evidence each one leaves.

1. Attacks happen in phases 2. The six phases 3. Reading an incident 4. Why the phases help defenders 5. Worked examples 6. Common mistakes

## 1 Attacks happen in phases

Cyberattacks aim to disrupt, harm, steal, or destroy devices, networks, or data. Serious attacks rarely happen in one step. Attackers work in **phases**: they research the target, get in, make sure they can stay, move toward what they want, take it, and try to cover their tracks.

Not every attack uses every phase. A smash-and-grab might skip persistence; an attacker who lands on the right computer right away may not need lateral movement. But the phases give defenders a map for understanding how far an attack got.

**Figure 1.** The phases describe how many attacks unfold. Placing evidence in the right phase tells defenders how far the attacker got and what to check next.

## 2 The six phases

### 1. Reconnaissance

The attacker gathers as much information as possible about the target, often using **open source intelligence (OSINT)**: freely available information such as company websites, job postings, social media, news articles, and public records. A job posting that lists the company's email and remote-access software tells the attacker what to target. Staff pages give names and roles for phishing.

### 2. Initial access

The attacker establishes a **foothold**, a first point of control, on a computer in the target's network. The most common ways in are social engineering (a phishing email, a fake login page) and compromised or weak credentials (a guessed, stolen, or reused password).

### 3. Persistence

Once inside, the attacker sets up a way to **keep access** without breaking in again, even if the victim restarts the computer or changes a password. Often this uses a **command and control (C2)** protocol: a way to send commands to the infected device and receive its output. Two common kinds of malware provide this:

- A **remote access trojan (RAT)**: malware disguised as something harmless that gives the attacker remote control of the computer.
- A **rootkit**: malware that hides deep in the system, often concealing itself and other malware from the user and security tools.

**Figure 2.** Persistence often depends on a C2 channel: the malware keeps checking in, so the attacker can return any time without breaking in again.

### 4. Lateral movement

The first computer is rarely the prize. The attacker moves sideways through the network to other computers and accounts, trying to **escalate privileges**: gain accounts with more permissions, such as an administrator who can reach every file server. Saved passwords, shared accounts, and poorly protected admin tools make this easier.

### 5. Taking action

The attacker acts on their objective: **collecting** the targeted data, **exfiltrating** it (copying it out of the network to a place the attacker controls), and/or **disrupting services** or **destroying data**, for example with ransomware.

### 6. Evading detection

In the final phase, many attackers try to hide what they did by **removing or editing log files** and **erasing files they planted**, such as malware. A log that suddenly has a gap, or a security log that was cleared at 3 AM, is itself evidence.

## 3 Reading an incident

Investigators rebuild an attack by putting events in order and assigning each to a phase. Here is a reconstructed timeline from one company's breach:

| When | What happened | Phase |
| --- | --- | --- |
| Mon 09:12 | Job posting reviewed: lists the company's email and VPN products | Reconnaissance |
| Tue 14:40 | Phishing email opened by a receptionist; password typed into a fake login page | Initial access |
| Tue 15:05 | Attacker signs in as the receptionist; installs a remote access tool | Persistence |
| Wed 02:30 | Receptionist's computer connects to an outside server every 10 minutes | Persistence |
| Thu 01:15 | Attacker uses a saved admin password found on a shared drive to reach the file server | Lateral movement |
| Fri 03:00 | 8 GB of customer records copied and sent to an outside address | Taking action |
| Fri 03:40 | Security log on the file server cleared; remote access tool deleted | Evading detection |

Read across the phases and the attack becomes a story: public research, a phishing foothold, a RAT phoning home, a saved admin password unlocking the file server, a large overnight transfer, and a cleared log. Notice the Wednesday 02:30 line: a computer contacting an outside server on a steady schedule is the C2 channel at work.

## 4 Why the phases help defenders

| Phase | Evidence defenders might see | Controls that interrupt it |
| --- | --- | --- |
| Reconnaissance | Very little; most research uses public sources | Share less publicly; train staff on what attackers learn from posts |
| Initial access | A clicked link, a login from a new device, failed logins | Phishing training, MFA, strong unique passwords |
| Persistence | New programs set to start automatically; regular check-ins to an unknown server | Anti-malware, blocking unknown outbound traffic, monitoring startup items |
| Lateral movement | One account signing in to many computers; new admin logins | Least privilege, separating the network into segments, protecting admin accounts |
| Taking action | Large data transfers out; files suddenly encrypted | Data-loss monitoring, backups, encryption of sensitive data |
| Evading detection | Cleared or edited logs; missing files | Sending copies of logs to a separate, protected system |

The key idea

The earlier an attack is stopped, the less damage it does. Each phase is a chance to catch it, and the phase tells you what the attacker probably did before and will try next.

## 5 Worked examples

Worked Example 1 Assign the phase

### Seven events

Assign each event in the timeline above to its phase and explain the Thursday event.

1. 1

   Monday: reading a public job posting is reconnaissance (OSINT).

2. 2

   Tuesday 14:40: the phishing email and captured password are initial access.

3. 3

   Tuesday 15:05 and Wednesday: installing a remote access tool and its regular outside check-ins are persistence (a C2 channel).

4. 4

   Thursday: using a saved admin password to reach the file server is lateral movement with privilege escalation: the attacker went from a receptionist's account to an administrator's.

5. 5

   Friday 03:00: copying records out is taking action (exfiltration). Friday 03:40: clearing the log and deleting the tool is evading detection.

**Answer:** All six phases appear. The Thursday step turned a low-level foothold into access to the data.

Worked Example 2 Recon from OSINT

### What the attacker learned for free

Before attacking a school district, an attacker finds: a staff directory with emails, a job ad for an “IT technician familiar with our Microsoft 365 and Cisco VPN,” and a teacher's post about the new grading system. How does each help?

1. 1

   Staff directory: names and email format for phishing.

2. 2

   Job ad: the exact email and remote-access products, so the attacker knows which fake login page to build and which flaws to look for.

3. 3

   Teacher's post: a believable topic for a phishing message (“action needed on the new grading system”).

**Answer:** All free, public information: reconnaissance with OSINT. Each item shapes the initial-access attempt.

Worked Example 3 Spotting persistence

### The computer that keeps calling out

An analyst notices that one office computer connects to the same unknown internet address every 10 minutes, all night, even when no one is using it. Which phase is this, and what is likely happening?

1. 1

   Regular automatic contact with an outside server, with nobody at the computer, fits a command and control channel.

2. 2

   That suggests malware such as a RAT is installed and checking in for instructions.

3. 3

   That is persistence: the attacker keeps a way back in.

**Answer:** Persistence through C2. The computer should be isolated and examined, and the analyst should look back for how it was first infected.

Worked Example 4 Evidence of hiding

### The missing hour

A server's security log has entries every few minutes, except between 02:00 and 03:10 on Saturday, where it is empty. Then a line records the log being cleared. What does this suggest?

1. 1

   Normal servers do not stop logging for an hour.

2. 2

   A cleared log is an action someone took, and it is itself recorded.

3. 3

   This fits the evading-detection phase: an attacker removing evidence of what they did in that window.

**Answer:** Likely evasion of detection. Defenders should check copies of the logs kept elsewhere and treat the gap as a sign of an attack, not a glitch.

Worked Example 5 Not every phase

### The ransomware smash-and-grab

An attacker guesses a weak password on an internet-facing server, immediately runs ransomware on it, and leaves a ransom note. No tools were left behind, and no other computers were touched. Which phases were used?

1. 1

   Initial access: the guessed password.

2. 2

   Taking action: encrypting the server's files.

3. 3

   No persistence, no lateral movement, and no attempt to hide.

**Answer:** Only two phases. The phases are a common pattern, not a checklist every attack completes.

## 6 Common mistakes

Common Mistake 1 · Mixing up persistence and lateral movement

Persistence keeps access to a computer the attacker already reached. Lateral movement reaches new computers and higher-permission accounts.

Common Mistake 2 · Thinking reconnaissance requires hacking

Much reconnaissance uses public sources: websites, job ads, social media. Nothing is broken into.

Common Mistake 3 · Treating a log gap as a technical glitch

Missing or cleared logs are a classic sign of the evading-detection phase. Investigate them.

Common Mistake 4 · Assuming every attack has all six phases

Some attacks skip phases or move fast. Assign phases based on the evidence, not the list.

Common Mistake 5 · Confusing collecting with exfiltrating

Collecting gathers the data inside the network. Exfiltrating copies it out to somewhere the attacker controls. Both belong to taking action.

Describe a phase like this

“The repeated connections from the receptionist's computer to an outside server every 10 minutes show the persistence phase: a remote access trojan is using a command and control channel so the attacker can keep sending commands without regaining access.”

Name the phase, point to the evidence, and explain what the attacker gains in that phase.

FiveStudy AP® Cybersecurity · Phases of a Cyberattack
