HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Cyber Security: Threats and Defences
  1. 1Attacks on systems: brute force, interception, DDoS and hacking
  2. 2Malware and attacks that trick people
  3. 3Keeping data safe: solutions to security threats
  1. Computer Science
  2. /Cyber Security: Threats and Defences
  3. /Attacks on systems: brute force, interception, DDoS and hacking

Course 5.3·Lesson 1 of 3

Attacks on systems: brute force, interception, DDoS and hacking

Some attacks go straight at a computer system: guessing a password, listening to data on its way, flooding a web server, or breaking in. This lesson describes how each one works and what the attacker wants from it.

about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Cyber Security: Threats and Defences
  1. 1Attacks on systems: brute force, interception, DDoS and hacking
  2. 2Malware and attacks that trick people
  3. 3Keeping data safe: solutions to security threats

Try the code and the simulations beside the lesson.

Why cyber security?

A house has a door, a lock and maybe an alarm. Thieves try different ways in: they pick the lock, they watch you type the alarm code, or they trick you into opening the door. Computer systems are attacked in the same ways. Cyber security is the protection of computer systems, networks and data from these attacks.

For every threat in this course, learn two things: the process (how it is carried out) and the aim (what the attacker wants). Exam questions ask for both. This lesson covers four threats that attack a system directly.

Brute-force attack

The process. The attacker uses a program that tries every possible password, one after another, until one works. It may start with common passwords and words from a dictionary, then try every combination of characters.

The aim. To find a user's password, so the attacker can get into their account and their data.

How many tries can that take? If each character is chosen from ccc characters and the password has LLL characters, the number of possible passwords is

N=cL.\displaystyle N = c^{L}.N=cL.

A 444-digit PIN has 104=10 00010^4 = 10\,000104=10000 possibilities, which a computer tries in a moment. A password of 101010 characters from 626262 (small letters, capital letters and digits) has about 8.4×10178.4 \times 10^{17}8.4×1017. Each extra character multiplies the number of tries. That is why long passwords that mix kinds of character are much safer.

Data interception

The process. Data is intercepted, which means captured, while it is being transmitted. The attacker may use a packet sniffer, a program that copies the packets passing through a network. On an open wireless network, anyone nearby may be able to pick up the signals. The data still reaches its destination, so the users may not notice.

The aim. To steal data, such as passwords, bank details or personal messages, and use it or sell it.

You learnt about packets in the chapter on data transmission. Encryption is the defence here: intercepted data that is encrypted cannot be understood. That is what HTTPS does for web pages.

Distributed denial of service (DDoS) attack

The process. The attacker sends a huge number of requests to a web server, all at the same time. The server cannot deal with them all, so it slows down or stops. Real users cannot reach the website. A denial of service attack comes from one computer. A distributed denial of service attack comes from many computers at once, in many places. Often these are ordinary computers infected with malware and controlled by the attacker without their owners knowing. A group of such computers is called a botnet.

Many small computers on the left, marked as a botnet, each sending an arrow to one web server on the right. The web server is drawn in red with the label overloaded. Below, one real user's computer sends an arrow that stops before the server, with a cross and the label cannot reach the website.

The aim. To stop a website or an online service from working, for example to harm a business or to demand money to stop.

Because the requests come from thousands of different addresses, it is hard to block them all.

Hacking

The process. Hacking is gaining unauthorised access to a computer system: getting in without permission. A hacker may use a guessed or stolen password, or a weakness in software that has not been updated.

The aim. To steal, change or delete data, to damage the system, or to plant malware. Some companies pay ethical hackers to break into their own systems, with permission, so that they can find and fix the weaknesses first.

Practise with new numbers

Try it in Python

The program works out the time a brute-force attack needs to try every password, for three sets of characters and three lengths. It assumes the attacker tries one thousand million passwords each second.

Read it first. Then run it. Which line is the first one to take more than a day?

1. Add a set of 949494 characters, for letters, digits and symbols. How long does a length of 101010 take now?

2. Add the length 121212 to the list. What happens to the time for letters and digits?

Common mistakes

  • Describing only the aim. An exam answer needs the process as well: how the attack is carried out.
  • Saying interception stops the data arriving. The data still arrives. A copy is taken on the way.
  • Mixing up DoS and DDoS. In a distributed attack, the requests come from many computers.
  • Adding instead of multiplying. The number of passwords is cLc^{L}cL, not c×Lc \times Lc×L.

Remember these

  • A brute-force attack tries every possible password until one works, to get into an account.
  • Data interception captures data while it is transmitted, to steal it.
  • A DDoS attack floods a web server with requests from many computers, so real users cannot reach it.
  • Hacking is gaining unauthorised access to a computer system, to steal, change or delete data or cause damage.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. Describe the process of a brute-force attack.
  1. A PIN has 333 digits, each from 000 to 999. How many different PINs are there?
  1. What is the aim of a DDoS attack?
  1. Why is a DDoS attack harder to stop than an attack from one computer?
  1. What does unauthorised access mean?

Enroll free in Cyber Security: Threats and Defences

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

A door lock opens with a 4-digit PIN. Each digit can be 0 to 9…Easy · High School (9–10) · by StemPy Lab
A password uses small letters, capital letters and digits: 62 characters in all…Medium · High School (9–10) · by StemPy Lab
An online ticket shop opens its sales for a popular concert at 10:00…Medium · High School (9–10) · by StemPy Lab
Next: lesson 2Malware and attacks that trick people
← Cyber Security: Threats and Defences
← PreviousMalware and attacks that trick people →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Python Labs (1)

Count passwords and try a brute-force attackPython Lab · by StemPy Lab