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

Free lesson

8.2 (1 of 7): Malware, botnets and DDoS

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.

45 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 free game that was not free

Sam downloads a free game from a strange website. It works. But a week later her phone is slow and the battery is empty by lunch.

Then a message appears: "Your photos are locked. Pay 200 pounds to get them back."

What happened? Sam installed software that was built to cause harm.

Key words

WordWhat it meansExample
MalwareMalicious software: software made to cause harm.a virus
VirusMalware that hides inside a file and spreads when you open it.a bad attachment
WormMalware that spreads by itself across a network (linked computers).a copy that jumps from PC to PC
TrojanMalware that pretends to be a useful program.a fake free game
KeyloggerMalware that records every key you press.it steals a typed password
SpywareMalware that secretly watches what you do.it sees the sites you visit
RansomwareMalware that locks your files until you pay.a locked photo folder
BotnetA group of infected devices that one attacker controls.10,000 hacked cameras
DoSDenial of service: so many requests that a site stops working for real users.a shop site that will not load
DDoSDistributed DoS: the requests come from many devices at once.a botnet attack

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

Quick check: which is which?

Have a go

Quick check: which is which?

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

Six kinds of malware

TypeWhat it doesHarm to a personHarm to a company
VirusHides in a file and spreads when it is openedDamaged filesDamaged files and lost work
WormSpreads alone across a networkA slow deviceA whole network slows down
KeyloggerRecords key pressesStolen passwordsStolen passwords and secrets
RansomwareLocks files until you payLost photosWork stops. Money is demanded
SpywareSecretly watches youLoss of privacyLoss of secrets
Remote access trojanLets the attacker control the device from another placeCamera and files seenAttacker can move to other devices in the network

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

Match the malware to the story

Have a go

Loading…

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

Too many visitors: DoS

A shop has one checkout. It serves one customer a minute. What if 600 fake customers stand in the queue?

Real customers wait a very long time. Then they leave.

A website is like that checkout. A DoS attack sends too many requests. The site is too busy for real users.

A botnet attack

flowchart TD
  attacker([Attacker]) -->|sends orders| controller[Control computer]
  controller --> bot1[Infected phone]
  controller --> bot2[Infected camera]
  controller --> bot3[Infected laptop]
  bot1 -->|many requests| site[Target website]
  bot2 -->|many requests| site
  bot3 -->|many requests| site
  user([Real user]) -.->|cannot get in| site

Try it: when is a server overloaded?

Code: python
# A server can answer 100 requests each second.
capacity = 100
real_users = 40
attack = 0

total = real_users + attack
print("Requests this second:", total)
print("Overloaded?", total > capacity)

# Change attack to 500 and run it again.

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

DoS or DDoS?

Important

DoS: the requests come from one place. You can block that one address.

DDoS: the requests come from thousands of places. It is much harder to block.

Your turn: read a request log

A website keeps a log. Each line has the address of the sender. Fill in three functions. The first counts the requests from each address. The second finds the busiest sender. The third says if the log looks like a DDoS: many different addresses. A real log is longer, but the idea is the same. Press Run Tests.

Code: python
def count_by_source(sources):
    # sources is a list of sender addresses, like ["10.0.0.1", "10.0.0.2", "10.0.0.1"].
    # Give back a dictionary: each address and how many times it appears.
    return {}


def busiest_sender(sources):
    # Give back the address that sent the most requests.
    return ""


def looks_like_ddos(sources, limit):
    # Give back True if MORE THAN limit different addresses sent requests.
    return False

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

Scenario: what went wrong?

Have a go

Scenario: what went wrong?

4 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

How to stop each threat

ThreatSimple prevention
Virus, worm, trojanAnti-malware software. Updates. Do not open strange files or install unknown programs.
Keylogger, spywareAnti-malware software. Multi-factor authentication (asking for two proofs), so a stolen password is not enough.
RansomwareBackups kept away from the main system. Staff training. Updates. Paying does not promise the files come back.
BotnetKeep devices updated. Change the default password on cameras and on the router (the box that connects you to the internet).
DoS and DDoSA firewall (a guard that blocks bad traffic), limits on requests, and a DDoS protection service.

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

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

Remember

Important

Malware is software that causes harm: virus, worm, trojan, keylogger, spyware, ransomware. A botnet is a crowd of infected devices. DDoS uses that crowd to overload one website.

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.