Skip to content
Cyber security incidents
ASD ISMISM-0917

ASD ISM 0917 Procedures for handling malicious code infections

What it says

When malicious code is detected, the following steps are taken to handle the infection:

  • the infected systems are isolated
  • all previously connected media used in the period leading up to the infection are scanned for signs of infection and isolated if necessary
  • antivirus applications are used to remove the infection from infected systems and media
  • if the infection cannot be reliably removed, systems are restored from a known good backup or rebuilt.

Quoted as published. Everything else on this page is written by Control Stack.

In plain English

When malicious code is detected, isolate infected systems, scan media connected before the infection, remove it with antivirus applications, and restore or rebuild if it cannot be reliably removed.

When malicious code is detected, these steps must be taken to handle the infection:

  • Isolate the infected systems.
  • Scan all previously connected media (storage hardware such as USB drives) used in the period leading up to the infection for signs of infection, and isolate it if necessary.
  • Remove the infection from infected systems and media using antivirus applications.
  • Restore or rebuild if the infection cannot be reliably removed: restore systems from a known good backup (one known to be clean) or rebuild them.

Why it matters

Until infected systems are isolated, malicious code can spread to other systems and onto media, and infected media can reinfect cleaned systems. Antivirus removal can miss traces, so a restore or rebuild is the fallback when removal cannot be relied on.

How to implement

  1. Find and isolate every infected system.

    Search endpoints for the detected code's file hashes, domains and behaviour. Use the endpoint tool's network containment or disconnect the system from every network, leaving it on if evidence may be needed, because powering off wipes memory. For a hosted system you cannot unplug, apply firewall rules or ask the provider to suspend it.

  2. List and scan all media connected before the infection.

    Set the period by working back from the earliest evidence of infection; the control sets no number of days. Use device connection logs and the removable media register (ISM-1713), and recall media held elsewhere. Scan on an isolated computer with automatic execution disabled (ISM-0341), and isolate media showing signs of infection.

  3. Run antivirus removal on infected systems and media.

    Update detection signatures first, through the endpoint tool or from clean media, run a full scan while each item stays isolated, and record what was found and removed. Keep a sample for analysis only under ISM-1969 (treated first so it cannot run by accident) and ISM-1970 (analysed in a segregated environment).

  4. Decide whether removal can be relied on.

    Set the test in the cyber security incident response plan, such as a clean rescan and no signs of persistence like new services, scheduled tasks or accounts. If removal cannot be relied on, restore from a known good backup dated before the earliest evidence of infection, or rebuild from trusted install media.

  5. Scan again before lifting isolation.

    Reconnect a cleaned, restored or rebuilt system only when it shows no signs of infection. ISM-1803 requires the register to list the actions taken, so record each system and media item, the step taken and the outcome.

Keep it running

Keep antivirus signatures, clean install media and backups ready so recovery is not delayed, and test restores in disaster recovery exercises (ISM-1515). After each infection, check whether isolation was quick enough and the media list was complete, and update the procedure.

Evidence and audit

  1. Check 1 of 4What an auditor asks for

    Ask for

    Detections from the antivirus or endpoint console for a set period, matched to incident records.

    Look at

    Whether each detection that became an infection has a record covering the steps, and why any others were not treated as infections.

    Good evidence

    Every detection in the console either falls under a recorded reason it was not an infection, such as a documented rule for files blocked before they ran, or has a record showing the infected systems isolated, media scanned, antivirus removal run and, where removal could not be relied on, a restore or rebuild.

  2. Check 2 of 4What an auditor asks for

    Ask for

    Device connection logs from an infected system for the period leading up to the infection, with the list of media scanned.

    Look at

    Whether every media item in the logs is on the list, how the period was chosen, and what happened to media with signs of infection.

    Good evidence

    Every media item the logs show as connected during the period has a scan result, the period starts before the earliest evidence of infection, and media with signs of infection was isolated and antivirus applications were used to remove the infection.

  3. Check 3 of 4What an auditor asks for

    Ask for

    Network logs from an infected system, from the time of detection until it was reconnected.

    Look at

    When isolation took effect, and whether the system still reached other systems after that.

    Good evidence

    The logs show isolation taking effect, with no traffic to other systems afterwards other than the response work itself, until the system was cleared.

  4. Check 4 of 4What an auditor asks for

    Ask for

    Recovery records for a sample of infections, including any where removal could not be relied on, with backup dates.

    Look at

    The recorded reason for trusting removal or for restoring, the backup date against the earliest evidence of infection, and the scan after recovery.

    Good evidence

    Each system kept in service after antivirus removal has a clean rescan and a recorded reason for trusting the removal, and each other system was rebuilt or restored from a backup dated before the earliest evidence of infection and scanned as clean.

Mappings

Closest match in ISO/IEC 27001: A.5.26, Response to information security incidents, which this control partially meets.

ISO 27001

ISO/IEC 27001: 3 mappings

  • A.8.7Protection against malwarePartially overlaps
  • A.8.13Information backupPartially overlaps
Essential Eight

ASD Essential Eight: 1 mapping

Mappings show how controls relate across frameworks. They do not imply full equivalence or certification.