The worksheetDownload the PDF
Answers

F11.3 Social engineering

Cyber security · GCSE · OCR J277 1.4.1, AQA 8525 3.6.2, Edexcel 1CP2 5.3.1 · about 15 min

BugBotLab

What this lesson is about

Phishing, pharming, shouldering and blagging, and a filter that flags them.

Questions 5 marks in all

  1. [1 mark]What is social engineering?

    1. ATricking people into giving away access or information
    2. BAttacking a firewall
    3. CWriting malware
    4. DEncrypting data
    Answer: A. It targets people, not technology.
  2. [1 mark]What is phishing?

    1. AFake messages that trick you into revealing details
    2. BGuessing passwords
    3. CFlooding a server
    4. DWatching over a shoulder
    Answer: A. Phishing uses fake emails or messages.
  3. [1 mark]What is shouldering?

    1. AWatching someone type a password or PIN
    2. BSending fake emails
    3. CRedirecting a website
    4. DInstalling spyware
    Answer: A. Also called shoulder surfing.
  4. [1 mark]Which is a warning sign of a phishing email?

    1. AAn urgent threat and a request for your password
    2. BA message from a saved contact
    3. CA plain text with no links
    4. DA correctly spelled company name
    Answer: A. Urgency plus a request for secrets is a classic sign.
  5. [1 mark]Someone rings claiming to be from IT and asks for your password. What is this?

    1. ABlagging (pretexting)
    2. BPhishing
    3. CA brute force attack
    4. DA firewall
    Answer: A. They invent a story to gain trust. Never give your password.

The task: a phishing filter

Write score_message(message), which returns how many of the warning_signs appear in the message (ignoring capital letters). For each message in inbox, print <subject>: <score> and then, on the same line, PHISHING if the score is 2 or more. At the end print flagged <n> of <total>.

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

warning_signs = ["urgent", "password", "click here", "you have won", "verify", "gift card"]
inbox = [
    ("Lunch tomorrow?", "Are you free for lunch tomorrow?"),
    ("Account alert", "URGENT: verify your password by click here now"),
    ("You have won", "You have won a gift card, click here to claim"),
    ("Homework", "Here is the homework for Friday"),
]

The hint students can ask for: Write the scoring function so it counts how many warning signs appear in the message, ignoring capitals. Then print each subject with its score, marking the ones that reach the threshold, and count how many you marked.

A solution

from bugbot import *
connect()
warning_signs = ["urgent", "password", "click here", "you have won", "verify", "gift card"]
inbox = [
    ("Lunch tomorrow?", "Are you free for lunch tomorrow?"),
    ("Account alert", "URGENT: verify your password by click here now"),
    ("You have won", "You have won a gift card, click here to claim"),
    ("Homework", "Here is the homework for Friday"),
]

def score_message(message):
    return sum(1 for sign in warning_signs if sign in message.lower())

flagged = 0
for subject, body in inbox:
    s = score_message(body)
    if s >= 2:
        print(f"{subject}: {s} PHISHING")
        flagged = flagged + 1
    else:
        print(f"{subject}: {s}")
print(f"flagged {flagged} of {len(inbox)}")

Any program that meets the task's checks is marked correct in the simulator; this is one way, not the only way.