Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

7.6 (2 of 3): Updates, replacement and hardening

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

50 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

The update you keep skipping

Your phone says: "Update available." You press Later. You press Later again.

Many attacks use a weakness that the maker already fixed. The people who were attacked had not installed the fix. Keeping systems up to date is one of the cheapest ways to make them resilient: able to resist and recover.

Key words

WordWhat it meansExample
UpdateA small change to software that fixes faults or adds small features.Version 4.1 to 4.2
UpgradeA bigger change to a new version, with many new features.Version 4 to version 5
PatchA quick fix for one weakness or fault.A fix for a new attack
VulnerabilityA weak point that an attacker could use.An old, unpatched program
RedundancySpare parts or copies that take over when something fails.A second server
HardeningMaking a system harder to attack by removing what it does not need.Closing unused ports
PortA numbered door where a program waits for data.Port 80 for web pages
FailoverSwitching to a spare system automatically when the main one fails.The spare server takes over
Secure disposalGetting rid of old equipment so nobody can read its data.Shredding a hard disk
Operating systemThe main program that runs a computer.Windows, Linux
NetworkComputers joined to share data.The college network

The cells students fill in are left blank in this preview.

Match the method to its example

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Update, upgrade and patch

UpdateUpgradePatch
SizeSmallLargeVery small
PurposeFix faults, small improvementsNew version with new featuresFix one weakness quickly
Planned?Usually, on a scheduleAlways, with care and testingOften urgent, after a new vulnerability
ExampleMonthly update for the operating systemMoving from one major version to the nextEmergency fix for a new attack

The cells students fill in are left blank in this preview.

Plan an update

Have a go

Plan an update

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Planned updates and urgent patches

A planned update happens on a schedule, so people know and are ready. The team tests it first and installs it when few people use the system.

A patch is different. When a new vulnerability is found, attackers move fast. So patches go out quickly, and the team must install them quickly too. Old software that no longer gets patches is a risk.

Replace some hardware every year

Hardware gets old and fails. A rolling replacement plan replaces some of the equipment each year. Everything is new within a few years, and the cost is spread out.

When old equipment leaves, it needs secure disposal. Erase the data on it, or destroy the disk. A disk put in a bin can show customer data to a stranger.

Worked example: a rolling plan

StepSumAnswer
A college has 100 laptops. It replaces 25 each year.
Years to replace them all100 divided by 254 years
Year 1: laptops replaced25Total new: 25
Year 225 moreTotal new: 50
Years 3 and 425 more each yearTotal new: 100

The cells students fill in are left blank in this preview.

Quick check: old equipment

Have a go

Quick check: old equipment

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Redundancy: a spare for everything

Redundancy means having a spare, ready to take over. A server can have two power supplies. Two disks can hold the same files. A company can have a second server, and a second internet line.

Data redundancy means more than one copy of the data. System redundancy means a spare part or machine.

Failover to a spare server

flowchart LR
  users["Users"] --> lb["Sends users to a working server"]
  lb -->|"normal"| main["Main server"]
  lb -.->|"if the main server fails"| spare["Spare server"]
  main --- data[("Shared copy of the data")]
  spare --- data

Try it: pick a working server

Code: python
# True means the server is working.
servers = {"main": False, "spare": True}

def pick(servers):
    for name in servers:
        if servers[name]:
            return name
    return "none"

print("Traffic goes to:", pick(servers))

# Change main to True. Then set both to False.

Make a free account to save your work and track your progress.

Hardening shuts the doors you do not use

Hardening means making a device harder to attack. Every open port, every extra program and every extra permission is a door for an attacker.

So you remove what is not needed: ports, applications, permissions and access. Each one removed is a door shut.

Extra: Which ports are open?

Command
ss -tln

A command for the lesson’s lab terminal. It is shown here and not run.

Extra: Which services are running?

Command
systemctl list-units --type=service --state=running --no-pager | head -10

A command for the lesson’s lab terminal. It is shown here and not run.

Extra: Who may use this folder?

Command
ls -ld /srv/projects

A command for the lesson’s lab terminal. It is shown here and not run.

The first step of hardening

Tip

The first step is to look. Which ports are open? Which services run? Who has access? Then ask of each one: do we need it? If not, remove it.

Your turn: a small security audit

Write two functions for a small security audit. unneeded_ports(open_ports, needed_ports) gives back the open ports the system does not need, in order from the smallest. needs_patch(installed_version, fixed_version) gives back True if the installed version is older than the version that fixed the weakness. Press Run Tests to check.

Code: python
def unneeded_ports(open_ports, needed_ports):
    # open_ports is a list of port numbers that are open now.
    # needed_ports is a list of ports the system really uses.
    # Give back the open ports that are not needed, in order from the smallest.
    return []


def needs_patch(installed_version, fixed_version):
    # The maker has fixed a weakness in fixed_version.
    # Give back True if the installed version is older than the fixed one.
    return False

Make a free account to save your work, or press Start lab to work through the whole lesson.

Key words crossword

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Final check

Have a go

Final check

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.