1.Incident Handling Overview

eCIR - Part 1 Summary

Featured image

Table of Contents

Incident Handling Definition & Scope


Security Incidents & Events

Incident

Event

Any observable occurrence in a system or network, it must be recorded & logged.

Examples:


Incident Handling Process (IR Life Cycle)

The incident handling process consists of four (4) phases (known as “Incident Response Life Cycle”) :

  1. Preparation
  2. Detection & Analysis (Identification)
  3. Containment, Eradication & Recovery
  4. Post-Incident Activity (Lesson Learned)

Incident Handling Process

1. Preparation

(getting the team ready to handle any incident)

- Employees

-Documentation

Based on last 2 points, you will decide how you will handle “major” incidents (Agreement of the upper-management is required) ;

-Defensive Measures

-Key Points:


2. Detection & Analysis (Identification)

(includes everything related to detecting an incident)

-Means of detection

-Information and knowledge sharing

-Context-aware threat intelligence

-Segmentation of the architecture

-Good understanding of / visibility in your network

-Key Points:

3. Containment, Eradication & Recovery

includes everything related to:

Incident Classification:

Before Containment phase, We need to classify the incident based on the information we analyzed, We should know its Type, Impact & Extent

Incident Tracking:

Sometimes, the incident handling team will be required to handle multiple incidents; this is exactly why there should be an incident tracking mechanism. This can be done by using incident tracking & management tools such as RTIR (Request Trackers for Incident Response)

1. Containment

Containment is divided into the following 3 sub phases:

  1. Short-Term Containment (Render the intrusion ineffective)
    • During this sub phase, we should try to render the intrusion ineffective, without altering the machine’s hard drive (we need to image it for forensic activities)
    • To do so, we can disable network connectivity or even disconnect the machine from the power line, in extreme occasions.
      • Place the machine in a separate/isolated VLAN
      • Change DNS
      • Isolate the machine through router or firewall configurations
      • Always formally inform the respective business unit manager if you decide to do so, even ask permission.

  2. System Back-Up
    • To preserve the evidence, you’re not supposed to work on the original machine when investigating and you’re also not supposed to analyze and work on the first image you take.
    • The original image is usually verified and then saved alongside other parameters to protect it from tampering, while all the work is done on copies of the original image.
    • When it comes to data acquisition, we have to consider the order of volatility. For example, the data within the machine’s RAM should be acquired first, since they are a lot more volatile than their on-disk counterparts.
    • The storage mediums can be arranged from the most volatile to the least, as follows:
      • Registers → CPU Cache → Ram → HDD → External & secondary storage devices

    Volatile Data:

    • The data on a live system that is lost after a computer is powered down. It resides in Registries, Cache Memory, and RAM.
    • It can also exist on disk as a memory page due to paging, temp. files and log files.

    Data Acquisition: The gathering and recovery of sensitive data or digital evidence during a digital forensic investigation.

    Data Acquisition Types:

    • Static Acquisition
      • Is the acquiring process of data that are not volatile.
      • By not volatile, we mean data that will not be affected by a system restart.
      • Such acquisition is usually performed on hard disks and flash disks.
    • Dynamic/Live Acquisition
      • Is the acquiring process of data that are volatile.
      • By volatile we mean data that will be heavily altered or even lost by any user action or system restart.
      • Such acquisition is usually performed while a system is still powered on and without performing any prior actions.
      • As running processes use RAM, it is very likely to find stored passwords, messages, domain names and IP address belonging to those processes.

    Note: choosing which type to apply depends on data volatility & the incident.

    • Dead Acquisition
      • An analysis done on a powered off computer
      • Is usually performed with the help of the system’s own hardware.

    Acquisition approaches:

    1. From disk drive to image file (imaging) → we will focus on this approach
      • Mirrors the under investigation hard disk’s content into an image file “Forensic image”.
      • The advantage of this method is scalability and efficiency.
    2. From disk drive to disk drive (cloning)

    Write Blockers:

    • A tools ensures that data acquisition is performed without the risk of losing or altering data by blocking the hard disk from writing.
    • Could either be hardware-based or software-based.
    • Tools such as UltraDock & Tableau TD3 Forensic Imager

    Write Blockers

    Evidence Integrity:

    • Hash Functions are usually employed to validate the acquired evidence
    • All calculated hash strings should be stored and communicated safely since they will be used to prove that the acquired data has not been altered.
    • Many hash functions being used nowadays such as:
      • SHA-1
      • SHA-2
      • SHA-3
      • MD-5
    • SHA-1 & MD-5 aren’t secure enough since they suffer from collisions

    Remember that: Communicating with your ISP may be needed, especially in cases of DDoS attacks, worms, or phishing campaigns; this is due to the fact that ISPs not only have greater visibility when it comes to attacks in the wild, but they also keep useful logs.

    After the imaging and live acquisition activities are completed, we have 2 ways;

    1. If the business unit manager/representative agreed on taking the system down, we can go straight to the Eradication phase, where we eliminate every attacker-related actions and residuals.
    2. If the affected system should stay as is, then it is time for long-term containment activities.

  3. Long-Term Containment (Make sure the intruder is locked out of the affected host and network)
    • During this sub phase, we should try to render the intrusion ineffective, without altering the machine’s hard drive (we need to image it for forensic activities as we said before)
    • Long-Term Containment activities such as:
      • Affected & related system patching
      • (H)IDS insertion
      • Password(s) and trust(s) changes
      • Additional ingress/egress rules (router & firewall)
      • Drop packets associated with a source or destination identified in the incident
      • Eliminate attacker access etc.

2. Eradication

Eradication should take place in order to make sure the attacker is locked out of the affected machine and network.

3. Recovery

Bringing the affected system(s) back to production.

Key Points:


4. Post-Incident Activity (Lesson Learned)

(taking a deep breath and reporting the identified weaknesses, oversights, blind spots, etc., regarding both our processes and technological measures)


Appendix

1. Windows Cheat Sheet

User Accounts

Identify curious-looking accounts in the Administrators group [use lusrmgr.msc for GUI access]

Processes

Identify abnormal processes [use taskmgr.exe for GUI access]

###Services

Identify abnormal services [use services.msc for GUI access]

Scheduled Tasks

Identify curious-looking scheduled tasks [you can go to Start -> Programs -> Accessories -> System Tools -> Scheduled Tasks for GUI access to scheduled tasks]

Extra Startup Items

Identify users’ autostart folders

Auto-start Reg Key Entries

Check the below registry keys for malicious autorun configurations [use regedit for GUI access and inspect both HKLM and HKCU] ← You can also scrutinize every auto-start location through the Autoruns MS tool

Listening and active TCP and UDP ports

Identify abnormal listening and active TCP and UDP ports

File Shares

All available file shares of a machine should be justified

Files

Identify major decreases in free space [you can use the file explorer’s search box and enter “size:>5M”

Firewall Settings

Examining current firewall settings to detect abnormalities from a baseline

Systems connected to the machine

Identify NetBIOS over TCP/IP activity

Open Sessions

Knowing who has an open session with a machine is of great importance

Sessions with other systems (NetBIOS/SMB)

Identify sessions the machine has opened with other systems

Log Entries

Identify curious-looking events [you can use eventvwr.msc for GUI access to logs]

2. Linux Cheat Sheet

Running Processes

Identify abnormal processes that could indicate malicious activity

Services

Identify abnormal services

Scheduled Tasks

Identify curious-looking scheduled tasks

Listening and active TCP and UDP ports

Identify abnormal listening and active TCP and UDP ports

ARP

Identify abnormal IP – MAC mappings

Files

Identify curious-looking files


References