Compromised software updates

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Compromised software updates

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A criminal hides malicious code inside a real update from a trusted software supplier. What is this called?
A A compromised software update
B A normal security patch
2. Why do users install a compromised update without worry?
A It appears to come from a supplier they already trust
B It always asks them to disable their antivirus
3. Where does the malicious code get added in a compromised software update?
A Into the supplier's update before it reaches users
B Only onto the user's device after installing
4. A program has automatic updates switched on. A compromised update is released. What could happen?
A The update waits until the user approves each line of code
B The malicious update may install on many devices without the user choosing it
5. Which statement is true?
A Anything from a trusted supplier is always safe
B An update can be dangerous even when it comes from a trusted supplier

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1update_server.upload("app_v2.1.exe") # contains hidden malware AA criminal slips malicious code into a genuine update on the supplier's own server, so it looks like normal software.
2auto_update = True # installs without asking BBelieving automatic updates remove all risk. A compromised update installs automatically, giving malware a quick route onto many devices.
3Users trust an update because it comes from a supplier they already use and believe is safe. CUpdates install by themselves, so a compromised update can reach many devices before anyone notices the problem.
4A safer approach is to check that an update is genuine before installing it, rather than trusting its source alone. Dif verify_signature(update): install(update)
5if source == "trusted": install(update) # so it must be safe EAssuming an update is safe just because it comes from a trusted supplier. The supplier's system may have been compromised.
6auto_update = True # no need to ever check updates Fif sender == "trusted_supplier": install(update)

Definitions

compromised software update

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
supplier = "trusted" autoUpdate = ____
2.
if supplier __ "trusted": install(update)
3.
infected = True if ________: alert("Do not install")
4.
trusted = True infected = True safe = trusted ___ not infected
5.
updates = ["v2.1", "v2.2"] for update in _______: verify(update)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A update = download(supplier)
B if not is_signed(update):
C install(update)
D else:
E block(update)
Question 2
A supplier = 'TrustSoft'
B update = get_update(supplier)
C if supplier = 'TrustSoft':
D install(update)
Question 3
A auto_update = True
B while auto_update:
C update == check_server()
D verify(update)
Question 4
A update = download(supplier)
B hash = sha256(update)
C if hash == published_hash:
D block(update)
E else:
F alert_user()
Question 5
A def install_update(update)
B if update.is_signed:
C run(update)
D return 'done'

Answer Key

Compromised software updates
Section A: Quick Questions
Q1
A — A compromised software update
Q2
A — It appears to come from a supplier they already trust
Q3
A — Into the supplier's update before it reaches users
Q4
B — The malicious update may install on many devices without the user choosing it
Q5
B — An update can be dangerous even when it comes from a trusted supplier
Section B: Match the Pairs
Q1
update_server.upload("app_v2.1.exe") # contains hidden malware → A criminal slips malicious code into a genuine update on the supplier's own server, so it looks like normal software.
Q2
auto_update = True # installs without asking → Updates install by themselves, so a compromised update can reach many devices before anyone notices the problem.
Q3
Users trust an update because it comes from a supplier they already use and believe is safe. → if sender == "trusted_supplier": install(update)
Q4
A safer approach is to check that an update is genuine before installing it, rather than trusting its source alone. → if verify_signature(update): install(update)
Q5
if source == "trusted": install(update) # so it must be safe → Assuming an update is safe just because it comes from a trusted supplier. The supplier's system may have been compromised.
Q6
auto_update = True # no need to ever check updates → Believing automatic updates remove all risk. A compromised update installs automatically, giving malware a quick route onto many devices.
Section C: Definitions
Q1
compromised software update — A software update from a trusted supplier that criminals have secretly infected with malicious code, so users install it believing it is safe.
Section D: Fill in the Blanks
Q1
supplier = "trusted" autoUpdate = True
Q2
if supplier == "trusted": install(update)
Q3
infected = True if infected: alert("Do not install")
Q4
trusted = True infected = True safe = trusted and not infected
Q5
updates = ["v2.1", "v2.2"] for update in updates: verify(update)
Section E: Spot the Error
Q1
B — The check is reversed. This would install updates that are NOT signed and block the signed ones. It should be 'if is_signed(update):' so only verified updates are installed.
Q2
C — A single = assigns a value, and it can't be used as a condition. To compare the supplier name you need the == operator.
Q3
C — The == operator compares values, so the update is never stored. Use a single = to assign the result of check_server() to update before verifying it.
Q4
D — When the hash matches the supplier's published hash, the update is the genuine file and should be installed. Blocking it is the wrong action. The line should be install(update).
Q5
A — A function definition must end with a colon. The line should be 'def install_update(update):'.