Cybersecurity - Lesson 4
Cybersecurity - Lesson 4 of 6

Technical Prevention

Now the other side of the coin - the technical measures that defend against attacks. Firewalls, encryption, anti-malware, authentication and automatic updates. Understanding when and why each is used is the key to answering prevention questions well.

45 - 60 min Firewalls, Encryption, Anti-malware, 2FA, Updates

The same data packet - the same password - transmitted twice from the same device. In one transmission it is intercepted by an attacker on the network. In the other, the attacker intercepts it too. But only one of the transmissions results in the password being stolen. The data was identical. The only difference was one word.

Think about it: What is the single difference between the two transmissions? And what does that tell you about the most fundamental technical protection available?

The answer is encryption. The same intercepted data - unreadable in one case, readable in the other. Technical prevention measures work by making attacks either impossible, impractical, or ineffective even when they succeed.

Exam strategy for prevention questions

When a question gives you a scenario and asks which prevention measure to use, match the threat to the defence. Firewalls filter traffic - good against network intrusion. Encryption protects data in transit - good against interception. Anti-malware detects threats - good against malware. Be specific about how each measure works, not just what it's called.

Firewalls and encryption

Defence 1
Firewall

A firewall monitors and filters incoming and outgoing network traffic based on a set of security rules. It acts as a barrier between a trusted internal network and untrusted external networks (like the internet).

Hardware firewalls are physical devices sitting at the network boundary. Software firewalls run on individual devices. Both use rules to decide which traffic to allow and which to block - by port, IP address, protocol, or application.

Exam tip: Always explain the mechanism - "a firewall blocks traffic that doesn't match its rules." Mention that firewalls can be hardware or software. And be clear: firewalls filter traffic but do NOT protect against malware already inside the network.
Defence 2
Encryption

Encryption converts readable data (plaintext) into an unreadable format (ciphertext) using an algorithm. Only someone with the correct decryption key can read it. Even if an attacker intercepts encrypted data, they see meaningless characters.

HTTPS uses encryption to protect web traffic. Data at rest (stored files) can also be encrypted - so even if physical storage is stolen, the data cannot be read.

Exam tip: Two key terms - plaintext (readable) and ciphertext (encrypted, unreadable). Examiners want to see that you understand encryption makes intercepted data useless, not just that it "protects data".

Symmetric vs asymmetric encryption

There are two fundamentally different approaches to encryption. The key difference is how many keys are used, and this creates a critical practical problem that asymmetric encryption was invented to solve.

Symmetric Encryption
One shared secret key

The same key is used to both encrypt and decrypt the data. Sender and receiver must both have this secret key before communication begins.

Advantage: Fast and efficient. Good for encrypting large files or stored data.

Problem: How do you share the secret key securely in the first place? If you send it over the internet, an attacker can intercept it - then all future communications are compromised.

Example algorithm: AES (Advanced Encryption Standard) - used to encrypt stored files.
Asymmetric Encryption
A matched key pair

Uses two mathematically linked keys: a public key (share with everyone) and a private key (kept secret by the owner). What one key encrypts, only the other can decrypt.

Advantage: The public key can be shared openly - no secret channel needed. Solves the key distribution problem.

Use: Used in HTTPS to establish a secure connection, then symmetric encryption takes over for speed.

Example algorithm: RSA - used in HTTPS certificates and secure key exchange.
Encryption Step-Through
See exactly how each type works, step by step
Sender
👩
Alice
Has the shared secret key
Attacker
🕵️
Eve
Watching the network
Receiver
👨
Bob
Has the shared secret key
Step 1 of 5
Both parties share a secret key
Alice and Bob both have the same secret key. This key was shared between them beforehand - perhaps agreed in person or through another secure channel.
🔑
Secret Key (shared by both)
KEY-A7X3
What does Eve know?
Nothing yet - she's listening but no data has been sent.
Step 2 of 5
Alice writes her message (plaintext)
Alice writes her message in its original, readable form. This is called plaintext.
Plaintext (Alice's message)
SEND £5,000 TO ACCOUNT 8821-4490
What does Eve see?
Nothing - the message hasn't been sent yet.
Step 3 of 5
Alice encrypts using the secret key
Alice applies the encryption algorithm using KEY-A7X3. The readable message is scrambled into ciphertext - meaningless without the key.
Ciphertext (encrypted)
X9#mQ!zR&2pL@vT8$kW3nF*hY6jE0
What does Eve see?
Still nothing - the ciphertext is on Alice's device, not yet on the network.
Step 4 of 5
Ciphertext travels across the network
The ciphertext is transmitted over the internet. Eve intercepts it - she can capture it perfectly. But she cannot read it without KEY-A7X3.
Intercepted ciphertext
X9#mQ!zR&2pL@vT8$kW3nF*hY6jE0
What does Eve see?
X9#mQ!zR&2pL@vT8$kW3nF*hY6jE0 - completely unreadable ciphertext. She has the data but cannot use it.
Step 5 of 5
Bob decrypts using the same key
Bob receives the ciphertext and applies the same key (KEY-A7X3) to reverse the process. The original plaintext is recovered perfectly.
Decrypted message (Bob reads)
SEND £5,000 TO ACCOUNT 8821-4490
The problem: How did Alice and Bob share KEY-A7X3 in the first place? If they sent it over the internet, Eve could have intercepted it then - and decrypted every message since. This is the key distribution problem that asymmetric encryption solves.
Sender
👩
Alice
Has Bob's public key
Attacker
🕵️
Eve
Also has Bob's public key
Receiver
👨
Bob
Has his own private key
Step 1 of 6
Bob generates a key pair
Bob's device generates two mathematically linked keys. They are created together but cannot be derived from each other.
🔓
Public Key
Share with everyone. Used to encrypt messages TO Bob.
🔒
Private Key
Never shared. Only Bob has this. Used to decrypt messages.
What does Eve know?
Nothing yet - no data has been shared.
Step 2 of 6
Bob publishes his public key
Bob sends his public key to Alice - and anyone else who wants to send him a secure message. This key can be shared openly on the internet.
Bob's Public Key (shared openly)
PUB-B1z9W#mK4...
What does Eve see?
PUB-B1z9W#mK4 - she has Bob's public key too. That's fine - it's meant to be public. She still cannot decrypt without the private key.
Step 3 of 6
Alice writes her message (plaintext)
Alice writes her message in its original readable form.
Plaintext
SEND £5,000 TO ACCOUNT 8821-4490
What does Eve see?
Nothing - the message is on Alice's device and hasn't been sent.
Step 4 of 6
Alice encrypts using Bob's public key
Alice uses Bob's public key to encrypt her message. Once encrypted with the public key, only the matching private key can decrypt it - and only Bob has that.
Ciphertext (encrypted with Bob's public key)
R7@nK!xQ#2mP&vL9$jT5wH*cB3eY8
What does Eve see?
Nothing yet - still on Alice's device.
Step 5 of 6
Ciphertext travels across the network
The ciphertext is transmitted. Eve intercepts it AND she has Bob's public key - but this does not help her. The public key can only encrypt, not decrypt.
Intercepted ciphertext
R7@nK!xQ#2mP&vL9$jT5wH*cB3eY8
What does Eve have?
The ciphertext AND Bob's public key. But the public key only encrypts - it cannot decrypt. She cannot read the message. She would need Bob's private key, which has never left Bob's device.
Step 6 of 6
Bob decrypts using his private key
Bob uses his private key (which has never been shared) to decrypt the ciphertext. The original message is recovered.
Decrypted (Bob reads)
SEND £5,000 TO ACCOUNT 8821-4490
Key insight: The private key never left Bob's device. Eve intercepted ciphertext and had the public key - but still could not read the message. This solves the key distribution problem because the public key can be shared openly.
Plaintext
Readable, unencrypted data - the original form before encryption is applied.
Ciphertext
Unreadable encrypted output. Appears as random characters without the correct decryption key.
Symmetric encryption
One shared secret key used to both encrypt and decrypt. Fast, but requires a secure way to share the key first.
Asymmetric encryption
A matched key pair: public key (shared openly, used to encrypt) and private key (kept secret, used to decrypt).
Public key
The key you share with everyone. Used to encrypt messages sent to you. Cannot be used to decrypt.
Private key
The key you never share. Used to decrypt messages encrypted with your public key. Never leaves your device.
Exam tip: symmetric vs asymmetric

If asked to compare the two types: symmetric = one shared key, fast, key distribution problem. Asymmetric = two linked keys, public key can be shared openly, solves key distribution. HTTPS uses asymmetric encryption to establish the session, then switches to symmetric for speed. Always state which key does what - "the public key encrypts; the private key decrypts."

Anti-malware, authentication and updates

Defence 3
Anti-malware Software

Anti-malware software scans files and running processes against a database of known malware signatures and monitors for suspicious behaviour. When a threat is detected, it is quarantined (isolated) or removed before it can cause harm.

Modern anti-malware also uses heuristic analysis - detecting behaviour that looks suspicious even if the specific malware hasn't been seen before.

Exam tip: Anti-malware must be kept up to date - new malware is created constantly, and an outdated database won't recognise new threats. This links to the updates defence below.
Defence 4
Strong Passwords & 2FA

A strong password is long, complex, and unique - making brute force attacks computationally impractical. A 12-character password with mixed character types could take thousands of years to crack.

Two-factor authentication (2FA) adds a second verification step - typically a code sent to a device you own. Even if an attacker discovers your password, they cannot log in without the second factor.

Exam tip: 2FA is especially powerful because it defends against both brute force (password found) and phishing (password stolen) - neither attack alone is sufficient to gain access.
Defence 5
Automatic Software Updates

Software vulnerabilities are discovered regularly. Automatic updates ensure that security patches are installed promptly, closing vulnerabilities before attackers can exploit them.

The WannaCry ransomware exploited a Windows vulnerability for which a patch had been released two months earlier. Systems with automatic updates were protected; unpatched systems were devastated.

Exam tip: Explain the mechanism - updates close known vulnerabilities. Without updates, attackers can exploit publicly known weaknesses. Mention that anti-malware updates are also included in this principle.
Plaintext
Readable, unencrypted data - the original form before encryption is applied.
Ciphertext
The unreadable output after encryption - appears as random characters without the decryption key.
Two-factor authentication
Login requires two separate forms of verification: something you know (password) plus something you have (phone/code) or are (biometric).
Patch
A software update that fixes a specific security vulnerability or bug in a program or operating system.

Firewall challenge - allow or block?

A firewall uses rules to decide whether to allow or block network traffic. Study each packet description and decide what a well-configured firewall should do. Apply these rules: HTTPS (port 443) from any source = allowed; SSH (port 22) from external = blocked; unknown executable from external = blocked; DNS (port 53) = allowed.

Firewall Decision Trainer
Score: 0 / 5 correct
5-Question Check
Technical prevention measures
Question 1 of 5
A company's employee uses a password that has been stolen via phishing. The attacker tries to log in but fails. The company has which security measure in place?
Question 2 of 5
An attacker intercepts network traffic and captures data packets. The data they capture appears as: 7g#Kp9$mR2@.... What protection prevented them from reading the actual data?
Question 3 of 5
What is the correct technical term for data after it has been encrypted?
Question 4 of 5
Why must anti-malware software be regularly updated?
Question 5 of 5
A firewall is described as "a barrier between trusted and untrusted networks." Explain what this means in practice.
0/5
Questions answered correctly
Think deeper

A business uses a firewall, strong passwords, and encryption on all its systems. Despite this, a successful ransomware attack occurs. Suggest how this could have happened and what additional measures might have prevented it.

How it could have happened: The firewall, strong passwords, and encryption protect against external network intrusion and interception - but they don't prevent an employee from running an infected email attachment. The ransomware likely arrived via phishing (social engineering), where the employee willingly ran a malicious file. Once inside the network, the malware operates behind the firewall.

Additional measures that could have prevented it:
1. Anti-malware software - would have detected and quarantined the malicious file before it executed.
2. Staff training - employees trained to recognise phishing emails would not have opened the attachment.
3. Automatic updates - an up-to-date operating system would have patches for known exploits.
4. Regular backups - even if ransomware encrypted files, recent backups would allow recovery without paying the ransom.

This illustrates why no single technical measure is sufficient - a layered approach is needed.
Printable Worksheets

Practice what you have learned

Three levels of worksheet for this lesson. Download, print and complete offline.

Recall
Prevention Measures
Match each measure to its function. Explain how firewalls, encryption, 2FA, and updates prevent specific attacks.
Download
Apply
Choosing Defences
Given a threat scenario, select the appropriate technical defence and explain the mechanism that makes it effective.
Download
Exam Style
Exam-Style Questions
Exam-style evaluation questions on layered technical defences including encryption, authentication, and firewalls.
Download
Cybersecurity Flashcards
Review all Cybersecurity terms with flashcards. Filter by lesson, shuffle, and track what you know.
Open Flashcards
Teacher Panel
L4: Technical Prevention
Suggested timing
0–5 min: Hook - encryption thought experiment
5–20 min: Firewall and encryption cards
20–30 min: Anti-malware, 2FA and updates
30–45 min: Firewall challenge activity
45–60 min: Quiz + Think Deeper
Learning objectives
1
Explain how firewalls filter network traffic using rules
2
Define plaintext and ciphertext; explain how encryption protects data in transit
3
Compare symmetric and asymmetric encryption: one shared key vs a public/private key pair; explain the key distribution problem
4
Describe how anti-malware, 2FA and automatic updates protect systems
5
Match technical measures to specific threats in exam scenarios
Common misconceptions
"A firewall detects malware" - it filters network traffic by rules. Anti-malware detects malware.
"Encryption prevents interception" - it doesn't prevent interception; it makes intercepted data unreadable.
"2FA means using two different passwords" - one factor must be something you know, the other something you have or are.
Exit tickets
Explain the difference between plaintext and ciphertext. How does encryption improve security?
[4 marks]
Describe how two-factor authentication works and explain why it is more secure than a password alone.
[4 marks]
A company uses only a firewall to protect its network. Give two other technical measures it should implement and explain how each adds security.
[4 marks]