Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

IT Support & Help Desk Fundamentals  Module 13 – Security and remote support

Security incidents, evidence and privacy duties

What makes a ticket a security incident, how the desk protects evidence and chain of custody, and the card, health and privacy duties that follow.

  • Advanced
  • 20 minutes
  • Examples run with Python 3.14.8 and Pyodide 314.0.7
  • By MySmartCoPilot
Free lesson, Pro answers: 20 minutes
Free: the whole lesson. With a pass: the model answers to its 2 interview questions.

What you will learn

  • Recognise a security incident and route it through the right reporting path
  • Protect evidence with a timeline, the order of volatility and a chain-of-custody record
  • Handle regulated and personal data, including card and health data, correctly
  • Explain India's CERT-In reporting and DPDP breach duties at the help-desk level

Before you start

What you’ll learn · Before you start

What you will learn

  • Recognise a security incident and route it through the right reporting path
  • Protect evidence with a timeline, the order of volatility and a chain-of-custody record
  • Handle regulated and personal data, including card and health data, correctly
  • Explain India's CERT-In reporting and DPDP breach duties at the help-desk level

Before you start

On this page

A reception laptop shows a full-screen note demanding payment to release its files, and the user has already rebooted it twice. The next five minutes decide whether anyone can learn how it happened, because a wipe, a reboot or a power-off can erase the only evidence, and the clock on reporting it has already started.

This is where the help desk’s job changes shape. For an ordinary fault you fix the machine and move on; for a security incident you protect what happened, report it on the right path, and hand the investigation to people who have the authority and the tools for it. This lesson is about that handover: recognising a security incident, keeping its evidence and its chain of custody intact, handling card, health and personal data correctly, and meeting India’s reporting clocks.

A security incident is for the security team to judge

An ordinary service incident: An unplanned interruption of a service, or a drop in its quality, that stops people working as they should. It is judged on how quickly the service becomes usable again, not on whether the cause is understood. More in “Incidents, problems and major incidents” is judged on one thing: how soon the service is usable again (that is the service-desk side, covered in incidents, problems and majors). A An event where someone may have gained access they should not have, or where data may have been exposed, taken or altered, so the response turns on what spread and what must be reported. is different because someone may have gained access they should not have, so the questions become how far it spread, what was taken and what must be told to whom. Unauthorised sign-ins, malware, a lost device with company data, an account sending spam and prohibited content on a disk are all security incidents, whatever else they look like at first.

NIST sets out how organisations handle these. Its guidance, SP 800-61 Rev. 3, places incident response inside the NIST Cybersecurity Framework 2.0 and its Detect, Respond and Recover work, rather than treating it as a job apart. At the help desk, that work has a small, firm shape: recognise the sign, report it on the agreed path, and contain it within policy. The desk does not investigate alone, because opening files, running its own tools or questioning people can change or destroy the very evidence the investigation needs.

Interactive · stage by stage What the desk does with a security incident Walk the four steps the desk takes once a ticket turns out to be a security matter, and watch the branch back to Report when containment uncovers something new.
What the desk does with a security incident, step 5 of 5. Showing Recognise (ransom note), Report it (security team told), Contain (off the network), Hand over (given to the team). In focus: Hand over.new factsRecogniseransom noteReport itsecurity team toldContainoff the networkHand overgiven to the team

The drawing shows the whole scene; its 5 steps are listed below.

Every step as text
  1. Recognise the sign. A ransom note on the screen, an account sending spam, a lost laptop with company data, prohibited content on a disk: these are not ordinary faults. The first job is to see that the ticket is a security matter, not a slow PC.
  2. Report before you touch. Tell the agreed contact at once, the security team or the incident manager named in the policy. Reporting early is the step that lets the people who can investigate take over, so the desk is never carrying it alone.
  3. Contain within policy. Do only what the policy allows, such as taking the device off the network and keeping the user off sensitive work. Keep every log. Do not wipe, reimage or power off to tidy up, because that destroys evidence.
  4. New facts, report again. Containing one device often uncovers more, a second affected PC or a shared file. Report each new fact to the same contact, because the whole picture, not just the first device, decides the response.
  5. Hand over, do not dig. Hand the device and your written timeline to the security team. The desk does not open files, run its own tools or question people, because each of those can change or lose the evidence the investigation needs.

Reporting early is the step that matters most. It costs a phone call or a ticket to the security team or the incident manager named in the policy, and it is what turns a problem one technician is carrying into one the right people own.

Checkpoint

Check: Recognising a security incident

  1. Question 1 of 2 A user's laptop is slow and also, you notice, is signed in to an account that is sending spam to the whole company. What makes this a security incident rather than only a performance ticket?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Someone may have gained access they should not have, so the questions are now how far it spread and what was taken

    An ordinary incident is judged on getting the service usable again. A security incident is judged on access, spread and what must be told, so an account sending spam is a security matter whatever the speed of the laptop.

  2. Question 2 of 2 You have recognised a security incident and reported it. Which of these is part of the help desk's job?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Contain it within policy, such as taking the device off the network, and keep every log

    The desk recognises, reports and contains within policy. It does not open files, run its own tools or question people, because each can change or destroy the evidence the investigation needs.

Protect the evidence before anyone decides what to keep

Write down what you see as it happens, with the time and its UTC offset on every line, the way an ISO 8601 timestamp: A date and time written in the international ISO 8601 order, from the largest unit to the smallest, with a UTC offset after the time, as in a time written 14:05+05:30, or a trailing Z for UTC. More in “Ticket notes and handoffs people can use” records a moment. A note written from memory an hour later is weaker evidence than one written at the time, and the time you first noticed the incident is itself evidence, so it belongs in the first line.

Then leave the machine as it is. Do not wipe, reimage, run a cleanup or power it off to tidy up. RFC 3227, the long-standing guide to collecting evidence, puts it plainly: “Don’t shutdown until you’ve completed evidence collection.” To stop malware spreading, CISA’s #StopRansomware Guide says that when several systems or subnets look affected the network is taken offline at the switch level, and that when that cannot be done straight away the affected devices are unplugged from the cable or taken off Wi-Fi. It keeps powering a device down for when you cannot disconnect it another way, and warns that powering it down loses the evidence held in memory. So the help desk’s safe move is almost always to disconnect, not to switch off.

When evidence is collected, it is taken in order of how quickly it disappears. RFC 3227 calls this the The order in which digital evidence is collected, from the most fleeting to the most stable: memory and live connections first, then temporary files, the disk, remote logs, and the most stable records last.: collect the most fleeting first.

Collect first What it holds Why it is fragile
Registers and cache the processor’s working values gone the instant the work moves on
Memory and live connections running programs, network links, the ARP cache lost the moment the power goes
Temporary files scratch data the system is using overwritten as the system runs
The disk files and the operating system survives a clean shutdown; changes as the system writes
Remote logs and monitoring records kept on other systems safer, but rolls over in time
Physical setup and backups how it was wired; archived media the most stable of all

The desk rarely collects any of this itself; the security team does. The desk’s job is to make that collection possible, which means disconnecting rather than powering off, and keeping every log.

Checkpoint

Check: Protecting the evidence

  1. Question 1 of 2 A desktop is spreading malware across the office network. Following the CISA ransomware guidance, what is the help desk's first move?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Disconnect it from the network, by the switch or by unplugging the cable or turning off Wi-Fi

    CISA's guide says to take the network offline or unplug the device, and to power it down only when you cannot disconnect it, because powering off loses the evidence held in memory.

  2. Question 2 of 2 In RFC 3227's order of volatility, which of these is collected first?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Memory and live network connections

    The order of volatility collects the most fleeting evidence first. Memory and live connections vanish at power-off, so they come before temporary files, the disk, remote logs and the most stable records.

A chain of custody records who held the evidence

Once a device becomes evidence, every move it makes is written down. The The record of who found, held, handled and transferred a piece of evidence, and when, so its integrity can be shown and no unexplained gap is left. is that record, and the CompTIA A+ objectives list it alongside informing management or law enforcement, taking a copy of the drive, keeping documentation and following the order of volatility. RFC 3227 says the record must show where, when and by whom the evidence was discovered and collected, who handled or examined it, who held it and how it was stored, and how each change of hands happened.

Two habits make the record trustworthy. Work on a copy, not the original: disk imaging: Copying a whole drive, sector by sector, to a file or another drive, so that recovery work runs on the copy instead of the original. More in “Restore files and recover data safely” copies the drive sector by sector so the investigation runs on the copy. And record a hash of the evidence when it is collected, the way a hash manifest: A list of files with the hash of each, written at backup time, against which restored copies are checked. Lines of the form hash, two spaces, file name are what sha256sum -c reads. More in “Restore files and recover data safely” fixes a file’s fingerprint, so that any later change shows up at once.

A custody log fails in a few predictable ways: a time that runs backwards, a handover with no receiver or no stated purpose, or a hash that no longer matches the one taken at collection. The program below reads two invented logs, one with three such mistakes and one with them put right, and prints every problem it finds:

Find the mistakes in a chain-of-custody log Python · custody/custody_check.py
"""Check an invented chain-of-custody log for the mistakes that break it.

A custody log records every time a piece of evidence changes hands: the time
with its UTC offset, who gave it, who received it, why, and the hash of the
evidence recorded at collection. This program reads two logs (both invented for
this lesson, with made-up names) and prints every problem it finds:

  * a time that goes backwards from the handover before it,
  * a handover with no receiver, or no stated purpose,
  * a hash that differs from the one recorded at the first handover.

It reads no clock and talks to no network, so its output is the same every run.
"""


def utc_minutes(stamp):
    """Turn "day 1, 09:14+05:30" into whole minutes on a single UTC scale."""
    day_label, clock = stamp.split(",")
    day = int(day_label.strip().split()[1])
    clock = clock.strip()
    if "+" in clock:
        hhmm, offset = clock.split("+")
        sign = 1
    else:
        hhmm, offset = clock.split("-")
        sign = -1
    hour, minute = hhmm.split(":")
    off_hour, off_minute = offset.split(":")
    local = day * 1440 + int(hour) * 60 + int(minute)
    offset_minutes = sign * (int(off_hour) * 60 + int(off_minute))
    return local - offset_minutes


def custody_errors(log):
    """Return the problems in the log, in reading order, as plain sentences."""
    errors = []
    first_hash = log[0]["hash"] if log else ""
    previous = None
    for index, handover in enumerate(log):
        moment = utc_minutes(handover["time"])
        if previous is not None and moment < previous:
            errors.append("entry " + str(index + 1) + ": time goes backwards")
        if not handover["to"]:
            errors.append("entry " + str(index + 1) + ": no receiver")
        if not handover["purpose"]:
            errors.append("entry " + str(index + 1) + ": no purpose")
        if handover["hash"] != first_hash:
            errors.append("entry " + str(index + 1) + ": hash does not match the first record")
        previous = moment
    return errors


def report(title, log):
    print(title)
    problems = custody_errors(log)
    if not problems:
        print("  no problems found")
    else:
        for line in problems:
            print("  " + line)
    print("")


# A sample log with three mistakes, invented for this lesson. The evidence is a
# laptop collected at a help desk; every name is made up.
flawed_log = [
    {"time": "day 1, 09:14+05:30", "from": "reception (Asha)", "to": "technician (Ravi)",
     "purpose": "collected from the user", "hash": "3f1a9c"},
    {"time": "day 1, 15:02+05:30", "from": "technician (Ravi)", "to": "evidence store",
     "purpose": "locked for the night", "hash": "3f1a9c"},
    {"time": "day 1, 14:30+05:30", "from": "evidence store", "to": "analyst (Meera)",
     "purpose": "handed over for imaging", "hash": "3f1a9c"},
    {"time": "day 2, 10:05+05:30", "from": "analyst (Meera)", "to": "",
     "purpose": "imaged, original locked away", "hash": "3f1a9c"},
    {"time": "day 2, 16:40+05:30", "from": "evidence store", "to": "technician (Ravi)",
     "purpose": "released after analysis", "hash": "7c2e4b"},
]

# The same log once the three mistakes are put right.
fixed_log = [
    {"time": "day 1, 09:14+05:30", "from": "reception (Asha)", "to": "technician (Ravi)",
     "purpose": "collected from the user", "hash": "3f1a9c"},
    {"time": "day 1, 15:02+05:30", "from": "technician (Ravi)", "to": "evidence store",
     "purpose": "locked for the night", "hash": "3f1a9c"},
    {"time": "day 1, 15:30+05:30", "from": "evidence store", "to": "analyst (Meera)",
     "purpose": "handed over for imaging", "hash": "3f1a9c"},
    {"time": "day 2, 10:05+05:30", "from": "analyst (Meera)", "to": "evidence store",
     "purpose": "imaged, original locked away", "hash": "3f1a9c"},
    {"time": "day 2, 16:40+05:30", "from": "evidence store", "to": "technician (Ravi)",
     "purpose": "released after analysis", "hash": "3f1a9c"},
]

report("Flawed log:", flawed_log)
report("Fixed log:", fixed_log)

Output

Flawed log:
  entry 3: time goes backwards
  entry 4: no receiver
  entry 5: hash does not match the first record

Fixed log:
  no problems found

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 custody_check.py

The flawed log trips three checks: entry 3 is timestamped before entry 2, entry 4 names no receiver, and entry 5 carries a hash that differs from the one recorded at the first handover. The fixed log reports no problems, because each handover now moves forward in time, names a giver and a receiver, and keeps the same hash throughout. One fault this program does not look for is a gap: a handover that starts with someone other than the last receiver, which leaves a stretch of time when nobody can say who held the laptop. The exercise at the end of the lesson adds that check.

Change the log

Press Edit and give entry 5 of flawed_log an empty purpose ("purpose": ""). Run it again: a fourth line appears, entry 5: no purpose, because the check reads each handover in turn and reports every fault it finds, not just the first.

Hash Generator Hash a drive image or a file, or check it against a published checksum, on your own device. Timestamp Converter Read or write a timestamp with its UTC offset, so a custody line is unambiguous.

Checkpoint

Check: Chain of custody

  1. Question 1 of 2 RFC 3227 says a chain-of-custody record must document which of these? Choose every one.

    Choose every answer that is right.

    Show the answer: Question 1 of 2

    Answer:

    • How each change of hands happened
    • Who held the evidence and how it was stored
    • Where, when and by whom the evidence was collected

    RFC 3227 lists where, when and by whom the evidence was discovered and collected, who handled it, who held it and how it was stored, and how each transfer happened. Blame is not part of it.

  2. Question 2 of 2 Why does a custody record include a hash of the evidence taken at collection, and why work on a copy of the drive?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: So any later change to the evidence shows up, and the original is left untouched while work runs on the copy

    Disk imaging copies the drive sector by sector so work runs on the copy, and a hash recorded at collection means any later change to the evidence is visible at once.

Prohibited content means stop, secure and escalate

Sometimes a technician fixing something else finds material on a device that looks illegal. The rule here is short and it never changes: stop. Do not open it further, do not copy or forward it, and do not show it to a colleague to check. Leave the device as it is, secure it, and escalate exactly as the A policy that sets out what people may and may not do with an organisation's devices, accounts and network, and what happens when the rule is broken. says, to the security team, to HR or to legal. Gathering more of it yourself, even to be sure, can break the law and destroy the handling record.

The move splits cleanly into what to do and what never to do:

Do Do not
Stop as soon as you see it Open, copy, forward or print it
Leave the device and its screen as they are Delete it or try to “clean up”
Secure the device and note the time Investigate or ask around to confirm
Escalate on the path the policy names Decide yourself whether it is serious

Keep the written note to the plain facts: what you were doing, what you saw at a high level, and the time. The people you escalate to decide everything else.

Checkpoint

Check: Finding prohibited content

  1. Question 1 of 2 While copying a user's files to a replacement laptop, you open a folder and see material that looks illegal. What is the right first move?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Stop, leave the device as it is, secure it and escalate on the path the policy names

    The rule is to stop, not open or copy it further, secure the device and escalate exactly as the acceptable use policy says. The people you escalate to decide the rest.

  2. Question 2 of 2 After finding such material and securing the device, what belongs in your written note?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: The plain facts only, what you were doing, what you saw at a high level, and the time

    Keep the note to the plain facts and the time. Investigating, describing the material in detail or judging its seriousness is for the security team, HR or legal.

Regulated and personal data need more than ordinary care

Some data carries duties of its own, and a ticket can quietly break them. Three kinds come up most at the desk.

Card data is governed by the PCI Data Security Standard from the PCI Security Standards Council, which protects The primary account number on a payment card, with data such as the cardholder name and expiry date. and The card verification code, whether printed on the card or held in its magnetic stripe or chip data, and the PIN: the values the card's issuer checks when it authorises a payment.. The standard does not allow sensitive authentication data, such as the card security code, to be stored after a payment is authorised, and it asks for any card number that is stored to be rendered unreadable, by truncation or strong encryption for example. A ticket keeps text exactly as it was typed, so a full card number or a security code never goes into one. Health data is handled under the sector rules that apply where you work, and is shared only with those who must see it. Personal data in India comes under the India's Digital Personal Data Protection Act, 2023, the law that governs how personal data is processed, with duties on the organisation that decides why and how it is used., under which a Personal data processed without authority, or accidentally disclosed, shared, altered, destroyed or made unreachable, in a way that harms its confidentiality, integrity or availability. The Act asks the organisation to tell the regulator and each person affected. must be told to the regulator and to the people affected.

What this means in a ticket is the same each time: keep only what the ticket needs, and keep the rest out of the notes.

Data in a ticket The rule it carries What you write
A card number or security code PCI DSS: stored numbers kept unreadable; codes never kept after authorisation never the number; note “card ending 4242” at most
Health information sector rules where they apply only what the fix needs, shared only with those who must see it
A name with an identity number DPDP Act: a breach must be told to the regulator and the person keep only what is needed; redact the rest

That is data minimisation: Collecting and sharing only the data a task needs, and no more. More in “Use AI assistants safely at the help desk” and redaction: Permanently removing private information from a document or image before sharing it, by cropping it out or covering it with a solid block, rather than blurring it or hiding it under a layer that can be undone. More in “Ticket notes and handoffs people can use” doing their ordinary work: a screenshot with a full card number or an identity number on it is itself a small data exposure, so it is masked before it goes into a ticket.

Text Redactor (Mask Personal Data) Mask card numbers, identity numbers and contact details out of text before it goes into a ticket.

Checkpoint

Check: Regulated and personal data

  1. Question 1 of 2 A user asks you to note their full card number and its security code in the ticket so finance can take a payment later. What do you do?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Decline and record no more than the last four digits, because the security code is never stored after authorisation under PCI DSS

    PCI DSS protects cardholder data and sensitive authentication data, and does not allow the security code to be stored after authorisation. Keep full numbers and codes out of tickets; the last four digits are enough to identify a card.

  2. Question 2 of 2 A screenshot that would help the ticket also shows a customer's full name and identity number. What is the right habit?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Mask the identity number before attaching it, keeping only what the ticket needs

    Keeping only what the ticket needs and masking the rest is data minimisation and redaction at work. A full identity number or card number on a screenshot is itself an exposure, so it is removed before sharing.

Noticing the incident starts the reporting clocks in India

A security incident in India starts two kinds of clock, and the desk’s part is to protect the evidence and the logs that let the organisation meet them.

India: two clocks start when the incident is noticed

CERT-In, India’s national agency for cyber security incidents, directs organisations to report a listed incident to it within 6 hours of noticing it, to keep the logs of their systems enabled and stored securely within India for a rolling 180 days, and to synchronise their clocks to the NIC or NPL time sources. So a technician never deletes logs while troubleshooting: they may be the record CERT-In asks for. Separately, under the DPDP Rules, 2025: India's Digital Personal Data Protection Rules, 2025, which give effect to the Digital Personal Data Protection Act, 2023. More in “Use AI assistants safely at the help desk” and the Act they give effect to, the organisation, as the party that decides how personal data is used, must give the The Data Protection Board of India, the regulator that receives reports of personal data breaches under the DPDP Act, 2023. and each affected person notice of a personal data breach. The Rules, which bring their duties in over an eighteen-month phased period, ask for each person to be told without delay and in plain language: what happened, its likely impact, the steps taken and whom to contact. Users affected by cyber fraud can also report it on 1930 or at cybercrime.gov.in. Keep a PAN: Permanent Account Number, a ten-character identifier issued by India's Income Tax Department, in the format ABCDE1234F. More in “Use AI assistants safely at the help desk” or an Aadhaar number: A twelve-digit identity number issued by UIDAI in India, used for verification and authentication. More in “Use AI assistants safely at the help desk” out of the ticket itself.

The clocks run as phases from the moment of noticing, never from a calendar date:

Timeline · 5 events in order The reporting clocks, by phase Read the phases in order. The reporting clocks count from the moment of noticing, written as phases and never as calendar dates; the log rule is a rolling window that is always running.
  1. hour 0

    You notice it start

    Write down the exact time you noticed the incident, with its UTC offset. Every clock below counts from this moment, so the time of noticing is itself a piece of evidence.

  2. first minutes

    Contain and tell contain

    Isolate the device within policy, keep every log, and tell the security team or the incident manager. Do not power off or delete logs to tidy up.

  3. within 6 hours

    CERT-In report report

    For an organisation in India, CERT-In's directions require a listed incident to be reported to CERT-In within 6 hours of noticing it, together with the logs that were enabled.

  4. without delay

    Tell the people affected notify

    Where personal data was exposed, the organisation, as the Data Fiduciary, gives the Data Protection Board and each affected person intimation of the breach. The DPDP Rules, 2025 ask for each person to be told without delay and in plain language: what happened, the likely impact, the steps taken and whom to contact.

  5. rolling 180 days

    Keep the logs in India logs

    CERT-In's directions require logs to be enabled and kept securely within Indian jurisdiction for a rolling 180 days, ready to give to CERT-In with a report. So a technician never deletes logs while troubleshooting.

The timeline has 5 events, from hour 0 to rolling 180 days.

Key idea

The time you first noticed the incident starts every clock, so write it down with its offset at once, and keep the logs: deleting them to tidy up can leave the organisation unable to report.

Checkpoint

Check: India's reporting clocks

  1. Question 1 of 2 Under CERT-In's directions, within how many hours of noticing a listed incident must an organisation in India report it to CERT-In?

    Type a number.

    Show the answer: Question 1 of 2

    Answer: 6 hours

    CERT-In's directions require a listed incident to be reported within 6 hours of noticing it, which is why the time you first noticed the incident is written down at once.

  2. Question 2 of 2 For how many days, as a rolling period, do CERT-In's directions require an organisation to keep its system logs, stored within India?

    Type a number.

    Show the answer: Question 2 of 2

    Answer: 180 days

    The directions require logs to be enabled and kept securely within India for a rolling 180 days, ready to give to CERT-In with a report. So a technician never deletes logs while troubleshooting.

Practise: find the faults in a custody log

The exercise gives you a handover log and asks you to return its faults in reading order: a time that runs backwards, a gap where a handover starts with someone other than the last receiver, a handover missing its receiver or purpose, and a hash that no longer matches the first record. The sample tests check the edges, such as two handovers in the same minute and a missing hash against a changed one:

Exercise · Medium · Python

Find the faults in a chain-of-custody log

Write custody_errors(log) so that it reads a chain-of-custody log and returns its faults, in reading order, as short strings a technician can paste into a ticket.

log is a list of handovers, each a dict. Every handover has:

  • minute: the time of the handover as whole minutes on one clock (the UTC offset has already been applied, so later handovers have larger numbers);
  • from: who gave the evidence;
  • to: who received it;
  • purpose: why it changed hands;
  • hash: the hash of the evidence, which should be the same as the one recorded at the first handover.

Go through the handovers in order. Number them from 1. For each handover, in this order, append a string when:

  1. "entry N: time goes backwards" — its minute is earlier than the handover before it (an equal time is not a fault);
  2. "entry N: gap in custody" — the handover before it named a receiver, and this handover's from is not that same name, so nobody is recorded as holding the evidence in between;
  3. "entry N: no receiver" — its to is empty;
  4. "entry N: no purpose" — its purpose is empty;
  5. "entry N: hash does not match the first record" — its hash differs from the hash of the first handover (an empty hash differs too),

where N is the handover's number. One handover can add more than one string. A log with no faults returns an empty list. The first handover is never "backwards" or a "gap", because nothing comes before it, and the handover after one with no receiver is not a "gap" either: that fault has already been reported as "no receiver".

The sample tests check the edges: two handovers in the same minute, one a minute earlier, a gap, the handover after a missing receiver, a missing receiver or purpose, and a missing hash against a changed one.

Starter code · custody_errors.py

def custody_errors(log):
    """Return the faults in the log, in reading order, as short strings."""
    return []
The sample tests · test_custody_errors.py
from custody_errors import custody_errors

CLEAN = [
    {"minute": 554, "from": "reception", "to": "technician", "purpose": "collected", "hash": "3f1a9c"},
    {"minute": 902, "from": "technician", "to": "evidence store", "purpose": "locked overnight", "hash": "3f1a9c"},
    {"minute": 1770, "from": "evidence store", "to": "analyst", "purpose": "imaging", "hash": "3f1a9c"},
]


def changed(index, **fields):
    """A copy of the clean log with one handover's fields changed."""
    log = [dict(handover) for handover in CLEAN]
    log[index].update(fields)
    return log


def test_clean_log_has_no_faults():
    assert custody_errors(CLEAN) == []


def test_time_going_backwards_is_flagged():
    assert custody_errors(changed(2, minute=800)) == ["entry 3: time goes backwards"]


def test_same_minute_is_not_backwards():
    assert custody_errors(changed(2, minute=902)) == []


def test_one_minute_earlier_is_backwards():
    assert custody_errors(changed(2, minute=901)) == ["entry 3: time goes backwards"]


def test_gap_in_custody_is_flagged():
    # Entry 2 gave the evidence to the evidence store, but entry 3 says the technician handed it on.
    assert custody_errors(changed(2, **{"from": "technician"})) == ["entry 3: gap in custody"]


def test_missing_receiver_is_flagged():
    assert custody_errors(changed(1, to="")) == ["entry 2: no receiver"]


def test_after_a_missing_receiver_is_not_a_gap():
    # Entry 2 names no receiver, so entry 3 cannot be compared with it: only "no receiver" is reported.
    log = changed(1, to="")
    log[2]["from"] = "someone else"
    assert custody_errors(log) == ["entry 2: no receiver"]


def test_missing_purpose_is_flagged():
    assert custody_errors(changed(1, purpose="")) == ["entry 2: no purpose"]


def test_changed_hash_is_flagged():
    assert custody_errors(changed(2, hash="7c2e4b")) == ["entry 3: hash does not match the first record"]


def test_missing_hash_is_flagged():
    assert custody_errors(changed(2, hash="")) == ["entry 3: hash does not match the first record"]


def test_first_entry_is_never_backwards_or_a_gap():
    assert custody_errors([dict(CLEAN[0], minute=5)]) == []
    assert custody_errors([dict(CLEAN[0], **{"from": "anyone"})] + CLEAN[1:]) == []


def test_one_handover_reports_every_fault_in_order():
    log = changed(2, minute=800, to="", hash="7c2e4b", **{"from": "technician"})
    assert custody_errors(log) == [
        "entry 3: time goes backwards",
        "entry 3: gap in custody",
        "entry 3: no receiver",
        "entry 3: hash does not match the first record",
    ]
A hint

Start with an empty list, the hash of the first handover, and two variables for the handover before this one: its minute and its to. Walk the handovers with their index, so you can write "entry " + str(index + 1). A handover is "backwards" only when there is a previous one and this minute is smaller (equal is fine), and it is a "gap" only when the previous to is not empty and differs from this from. Check the five faults in the order the prompt lists them, so the order of the list follows the order of your if statements, and update both variables at the end of each turn.

The sample tests run on this device, in your browser (Pyodide): nothing is sent to mysmartcopilot.com. The first run downloads Python (about 13.5 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.

Then test yourself on the six ideas of this lesson, from recognising a security incident to the reporting clocks:

Practice that adapts to you

Practise this lesson

12 questions about 6 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.

  1. Question 1 of 12 Which of these tickets is a security incident?

    Choose one answer.

    Show the answer: Question 1 of 12

    Answer: A manager reports that a laptop with the company's customer list was left in a taxi

    A security incident turns on possible unauthorised access or data exposure. A lost laptop with the customer list qualifies; a flickering monitor, an empty toner cartridge and a slow Monday do not.

  2. Question 2 of 12 You are sure a workstation is compromised. Before containing it, what does routing the report well look like?

    Choose one answer.

    Show the answer: Question 2 of 12

    Answer: Tell the security team or the incident manager named in the policy, on the agreed path, at once

    Reporting early on the agreed path is the step that turns a problem one technician is carrying into one the right people own, before any containment begins.

  3. Question 3 of 12 Why does powering a suspect machine off, rather than disconnecting it, weaken the investigation?

    Choose one answer.

    Show the answer: Question 3 of 12

    Answer: It loses the evidence held in memory, such as running programs and live connections

    Memory holds running programs, live network connections and any traces malware keeps nowhere else, and all of it is lost at power-off. Disconnecting from the network stops the spread while keeping that evidence for collection.

  4. Question 4 of 12 Put in mind the order of volatility. Which is collected later, the disk or the contents of memory, and why?

    Choose one answer.

    Show the answer: Question 4 of 12

    Answer: The disk, because it survives a clean shutdown while memory does not

    The order of volatility runs from the most fleeting to the most stable. Memory is lost at power-off, so it is collected before the disk, which survives a clean shutdown.

  5. Question 5 of 12 A custody log shows the technician at the desk receiving the laptop, and its next line has the evidence store handing it to the analyst, with no line for the night in between. Why does that gap matter?

    Choose one answer.

    Show the answer: Question 5 of 12

    Answer: There is a period when nobody is recorded as holding the evidence, so its integrity can be questioned

    The chain of custody must account for who held the evidence at every moment. A gap leaves time when anyone could have reached it, which is enough to put its integrity in doubt.

  6. Question 6 of 12 The hash recorded when a drive image was collected no longer matches the image the analyst has. What does that tell you?

    Choose one answer.

    Show the answer: Question 6 of 12

    Answer: The image has changed since collection, so it can no longer be trusted as an exact copy

    A hash is a fixed fingerprint of the exact bytes. If it no longer matches, the data has changed since collection, so the copy cannot be relied on as a faithful image.

  7. Question 7 of 12 What should you never do on finding material that looks illegal on a device?

    Choose one answer.

    Show the answer: Question 7 of 12

    Answer: Open more of it, copy it or forward it to anyone

    On finding such material you stop, leave the device as it is, secure it and escalate. Opening, copying or forwarding it is the thing never to do.

  8. Question 8 of 12 Who decides whether the material you found is serious enough to involve the police?

    Choose one answer.

    Show the answer: Question 8 of 12

    Answer: The roles the policy names, such as the security team, HR or legal, after you escalate

    The desk secures the device and escalates on the policy's path. The security team, HR or legal then decide the response, including any contact with law enforcement.

  9. Question 9 of 12 A ticket involves a user's health information. How should you handle it?

    Choose one answer.

    Show the answer: Question 9 of 12

    Answer: Keep only what the fix needs and share it only with those who must see it

    Regulated data such as health information is kept to what the fix needs and shared only with those who must see it, under the sector rules that apply where you work.

  10. Question 10 of 12 Under the DPDP Act, 2023, when personal data is exposed in a breach, who must the organisation inform?

    Choose one answer.

    Show the answer: Question 10 of 12

    Answer: The Data Protection Board of India and each affected person

    Under the DPDP Act, 2023, the organisation that decides how personal data is used must give both the Data Protection Board of India and each affected person notice of a personal data breach.

  11. Question 11 of 12 Why should a technician never delete system logs while troubleshooting a machine in an organisation in India?

    Choose one answer.

    Show the answer: Question 11 of 12

    Answer: CERT-In's directions require logs to be kept for a rolling 180 days, and they may be the record a report must include

    CERT-In's directions require logs to be enabled and kept for a rolling 180 days within India, and they must be provided with an incident report, so deleting them can leave the organisation unable to meet its duty.

  12. Question 12 of 12 What starts the reporting clocks after a security incident?

    Choose one answer.

    Show the answer: Question 12 of 12

    Answer: The moment you noticed the incident, which is why that time is written down at once

    The clocks run as phases from the moment of noticing, not from a calendar date, so the time you first noticed the incident starts every clock and is written down with its offset at once.

Interview questions

Warm-up (fresher to 2–5 years): why is memory collected before the disk?

Because memory is the most fragile evidence there is. Memory holds the running programs, the open network connections and any traces a piece of malware keeps nowhere else, and all of it is gone the moment the power goes, while the disk survives a clean shutdown. RFC 3227’s order of volatility ranks evidence by how quickly it disappears and says to collect the most fleeting first, so memory comes before temporary files, and both come before the disk. At the help desk this is why the safe move is to disconnect a machine rather than switch it off: switching off throws away the memory the investigation may need. The desk rarely collects memory itself; its job is to keep that choice open for the security team.

The next two drop you into a decision under pressure, where the easy move is the wrong one. Settle on what you would do first, then open each to see what a strong answer covers and where a weak one stops:

Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.

  1. Mid to senior

    While fixing a printer ticket you open a folder on a shared drive and find a spreadsheet of customers' full card numbers that the whole office can read. The user says it has been there for months. What do you do, and who decides what is done about it?

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page. First step and follow-ups

  2. Fresher to mid

    An analyst wants your timeline of a suspected compromise on a laptop you disconnected. Its clock reads 4 minutes behind the domain controller, the firewall log is in UTC and your notes are in UTC+05:30. A colleague says to resync the laptop's clock first. What do you do, and how do you build the timeline?

    Model answer, Pro. First step and follow-ups

Flashcards · 6 cards

Recall it, then check

Say the answer to yourself before you look: recalling it is what makes it stick.

  1. What is a security incident judged on, and what is the desk's part?

    On access, spread and what must be told, not only on getting the service back. The desk's part is to spot it, report it, contain it as policy allows, and pass the investigation on.

  2. How does the desk protect evidence on a device?

    Write times down as they happen, disconnect the device rather than power it off, and leave it untouched. When evidence is collected, the most volatile is taken first.

  3. Why is memory collected before the disk?

    Memory holds running programs, open connections and traces that malware keeps nowhere else, and all of it is lost when the power goes. RFC 3227's order of volatility collects the most fleeting first.

  4. What does a chain of custody record?

    Who found, held, handled and transferred the evidence, with no gap between holders. Work on a copy of the drive, and fix a hash at collection so any later change shows.

  5. A technician finds prohibited content on a device. What do they do?

    Stop, secure and escalate on the policy's path. Never open, copy or investigate it.

  6. Which clocks start when an incident is noticed in India?

    A listed incident goes to CERT-In within 6 hours, and logs are kept in India for a rolling 180 days. Under the DPDP Rules, which bring their duties in step by step over eighteen months, a personal data breach is told to the regulator and, without delay, to each person affected. Write down the time you noticed it, with its offset.

Key takeaways

  • A security incident is judged on access, spread and what must be told, not just on getting the service back; the desk recognises it, reports it and contains it within policy, and hands the investigation over.
  • Protect evidence by writing times as they happen, disconnecting rather than powering off, and leaving the device untouched; when it is collected, the most volatile data is taken first.
  • A chain of custody records who found, held, handled and transferred the evidence, with no gap between holders; work on a copy of the drive and fix a hash at collection so any later change shows.
  • Prohibited content means stop, secure and escalate on the policy’s path, and never open, copy or investigate it.
  • Keep card numbers, security codes and identity numbers out of tickets, and share regulated data only with those who must see it.
  • In India, a listed incident is reported to CERT-In within 6 hours of noticing it, logs are kept for a rolling 180 days within the country, and, as the DPDP Rules’ phased duties take effect, a personal data breach is told to the regulator and, without delay, to each person affected.

References

Related tools

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.