Chapter 4

Objective 4.1

Security Information and Event Management (SIEM)

  • NOTES
  • Event Parsing → Event parsing is the process of interpreting and normalizing raw event data from various sources into a consistent format.
    • Scenario: An organization receives logs from various devices (e.g., firewalls, routers, servers).
    • Action: Use a SIEM tool to parse and normalize these logs into a standardized format for easier analysis.
  • Event Duplication → Event duplication occurs when identical or similar events are recorded multiple times, leading to redundant data and potential alert fatigue.
    • Scenario: A firewall generates multiple identical alerts for the same incident.
    • Action: Configure SIEM rules to deduplicate these events and provide a single alert.
  • Non-Reporting Devices → Non-reporting devices are those that fail to send logs or event data to the SIEM system, potentially missing critical security information.
    • Scenario: A critical server stops sending logs to the SIEM system.
    • Action: Set up heartbeat monitoring to alert administrators when the server fails to report.
  • Retention → Retention refers to the period for which event data is stored within the SIEM system.
    • Scenario: An organization must retain event logs for seven years to comply with regulatory requirements.
    • Action: Configure SIEM retention policies to archive and store logs accordingly.
  • Event False Positives/False Negatives
    • False Positives: Legitimate activity incorrectly flagged as a threat.
    • False Negatives: Malicious activity that goes undetected.
    • Scenario: An intrusion detection rule generates numerous false alerts for normal network traffic.
    • Action: Refine the rule to reduce false positives and accurately detect actual threats.

Aggregate Data Analysis

  • Correlation → Correlation involves linking related events across different sources and systems to identify patterns and detect complex threats.
    • Scenario: A user logs into the network from a foreign location, followed by multiple failed login attempts on various servers.
    • Action: Use correlation rules to link the login event with the failed attempts, triggering an alert for potential account compromise.
  • Audit Log Reduction → Audit log reduction involves filtering and summarizing logs to remove redundant or irrelevant data, making it easier to identify significant events.
    • Scenario: Thousands of routine system logs are generated daily, making it difficult to identify important events.
    • Action: Implement log filtering to exclude routine logs and summarize repetitive events.
  • Prioritization → Prioritization involves ranking events based on their potential impact and urgency to focus on the most critical incidents first.
    • Scenario: Multiple security alerts are generated, but resources are limited to address them all immediately.
    • Action: Use severity scoring to prioritize alerts based on their potential impact and urgency.
  • Trends → Identifying trends involves analyzing historical data to detect patterns and predict future security incidents.
    • Scenario: An increase in phishing emails is observed over the past few months.
    • Action: Perform trend analysis to identify the pattern and implement preventive measures.

Behavior Baselines and Analytics

  • Network Behavior Baselines → Establishing normal network activity patterns to detect unusual behaviors that may signify security threats.
    • Scenario: An increase in outbound traffic to an unknown external IP address is detected.
    • Action: Compare the current traffic with the baseline. If it deviates significantly, trigger an alert for potential data exfiltration.
  • System Behavior Baselines → Establishing normal operating patterns for systems to identify unusual activities that could indicate security issues.
    • Scenario: A sudden spike in CPU usage on a critical server is observed.
    • Action: Compare the spike with the system’s performance baseline to determine if it’s an anomaly, possibly indicating a DDoS attack or malware.
  • User Behavior Baselines → Establishing normal user activity patterns to detect anomalies that could indicate compromised accounts or insider threats.
    • Scenario: A user account is accessing sensitive data outside of normal working hours.
    • Action: Compare the access times with the established baseline. If it deviates significantly, investigate for potential account compromise.
  • Applications/Services Behavior Baselines → Establishing normal operating patterns for applications and services to detect unusual activities that could indicate security threats.
    • Scenario: An application experiences a sudden increase in error rates.
    • Action: Compare the error rates with the application’s baseline. If it deviates significantly, investigate for potential security issues such as exploitation attempts.

Incorporating Diverse Data Sources

  • Third-Party Reports and Logs → Data and logs provided by external organizations, often including security reports, audit logs, and compliance assessments.
  • Threat Intelligence Feeds → Data streams that provide information about current threats, including indicators of compromise (IoCs) and tactics, techniques, and procedures (TTPs).
  • Vulnerability Scans → Automated scans that identify vulnerabilities in systems, applications, and networks
  • Common Vulnerabilities and Exposures (CVE) Details → A list of publicly disclosed information security vulnerabilities and exposures.
  • Bounty Programs → Programs that incentivize external researchers to find and report vulnerabilities in your systems.
  • Data Loss Prevention (DLP) Data → Data collected from DLP tools that monitor and protect sensitive information from unauthorized access and exfiltration.
  • Endpoint Logs → Logs collected from endpoints, including desktops, laptops, and mobile devices.
  • Infrastructure Device Logs → Logs from network devices such as routers, switches, firewalls, and load balancers.
  • Application Logs → Logs generated by applications, capturing detailed information about their operation and user interactions.
  • Cloud Security Posture Management (CSPM) Data → Data from CSPM tools that assess and monitor the security posture of cloud environments.

Alerting

  • False Positives and False Negatives
    • False Positives: Alerts that incorrectly indicate a security incident.
    • False Negatives: Missed alerts that fail to detect an actual security incident.
    • Scenario: You receive a high number of false positives from your intrusion detection system (IDS).
    • Action: Analyze the IDS rules and thresholds, adjusting them to reduce false positives while maintaining detection accuracy.
  • Alert Failures → Situations where alerts are not generated or delivered as expected.
    • Scenario: Alerts from your SIEM system are not reaching the incident response team.
    • Action: Investigate and resolve communication issues within the SIEM and alerting infrastructure.
  • Prioritization Factors:
    • Criticality: The importance of the affected asset or system.
    • Impact: The potential consequences of the incident.
    • Asset Type: The nature and function of the asset (e.g., server, workstation).
    • Residual Risk: The remaining risk after controls have been applied.
    • Data Classification: The sensitivity of the data involved (e.g., public, confidential).
    • Scenario: You receive an alert about potential malware on a critical server hosting confidential data.
    • Action: Prioritize the alert based on the server’s criticality, the impact of potential data exposure, and the data classification.
  • Malware Alerts → Alerts indicating the presence of malware on a system.
  • Vulnerability Alerts → Alerts indicating the presence of vulnerabilities in systems or applications.

Reporting and Metrics

  • Visualization → The process of representing data in graphical or pictorial format to enhance understanding and analysis.
  • Dashboards → Interactive interfaces that display real-time data and metrics from various sources, providing an overview of the current security status.

Objective 4.2

Vulnerabilities and Attacks

  • Injection → Attackers insert malicious code into a vulnerable program, typically through user inputs.
    • Ex. SQL injection, Command injection
  • Cross-Site Scripting (XSS) → Attackers inject malicious scripts into web pages viewed by other users.
    • Ex. Stored XSS, Reflected XSS
  • Unsafe Memory Utilization → Poor memory management can lead to vulnerabilities such as buffer overflows.
    • Ex. Buffer overflow, Use-after-free
  • Race Conditions → Flaws that occur when the timing of actions impacts the system’s behavior.
    • Time-of-check to time-of-use (TOCTOU) bugs
  • Cross-Site Request Forgery (CSRF) → Attackers trick users into executing unwanted actions on a different site where they are authenticated.
  • Server-Side Request Forgery (SSRF) → Attackers manipulate server-side requests to access internal resources.
  • Unsecure Configuration → Poorly configured systems can lead to vulnerabilities.
  • Embedded Secrets → Hard-coded credentials or keys within the source code
  • Outdated/Unpatched Software and Libraries → Using outdated components with known vulnerabilities.
  • End-of-Life Software → Software that is no longer supported with security updates.
  • Poisoning → Manipulating data to affect the behavior of systems or models.
  • Directory Service Misconfiguration → Poor configuration of directory services leading to unauthorized access.
  • Overflows → Buffer or integer overflows that lead to arbitrary code execution.
  • Deprecated Functions → Usage of outdated and insecure functions in the code.
  • Vulnerable Third Parties → Dependencies on third-party services or software with vulnerabilities.
  • Time of Check, Time of Use (TOCTOU) → Discrepancies between the time a condition is checked and the time it is used.
  • Deserialization → Insecure deserialization leading to arbitrary code execution.
  • Weak Ciphers → Usage of outdated or weak cryptographic algorithms.
  • Confused Deputy → When a program inadvertently misuses its authority on behalf of an attacker.
  • Implants → Malicious code inserted into a system to maintain unauthorized access.

Mitigations

  • Input Validation → Ensuring that all input data is validated against expected formats and values to prevent malicious data from being processed.
  • Output Encoding → Encoding data before rendering it to ensure that it is safely interpreted by the browser or application.
  • Safe Functions → Utilizing functions that are designed to handle operations safely, avoiding common vulnerabilities.
  • Security Design Patterns → Implementing established design patterns that promote security best practices.
  • Updating/Patching → Regularly applying updates and patches to fix known vulnerabilities.
    • Implement automated patch management for operating systems, software, hypervisors, firmware, and system images.
  • Least Privilege → Granting users and processes the minimal level of access necessary to perform their functions.
  • Fail Secure/Fail Safe → Designing systems to default to a secure state in the event of a failure.
  • Secrets Management → Properly managing secrets like API keys, passwords, and certificates to ensure they are kept secure.
  • Least Function/Functionality → Limiting the functionality of systems to the minimum required to reduce the attack surface.
  • Defense-in-Depth → Implementing multiple layers of security controls to protect against attacks.
  • Dependency Management → Properly managing software dependencies to ensure they are secure and up-to-date.
  • Code Signing → Using digital signatures to verify the integrity and authenticity of software code.
  • Encryption → Using cryptographic techniques to protect data confidentiality and integrity.
  • Indexing → Organizing data to improve searchability and access control.
  • Allow Listing → Permitting only known and trusted entities or actions, blocking everything else by default.

Objective 4.3

Internal Intelligence Sources

  • Adversary Emulation Engagements → Simulating real-world attack techniques and tactics to evaluate the effectiveness of security controls and incident response capabilities.
  • Internal Reconnaissance → Gathering information from within the organization to identify potential vulnerabilities and areas of risk.
  • Hypothesis-Based Searches → Developing and testing hypotheses about potential threats based on available data and intelligence.
  • Honeypots → Deploying decoy systems designed to attract attackers, gather intelligence, and analyze attack techniques.
  • Honeynets → Creating a network of honeypots to simulate a larger, more complex environment for detecting and analyzing sophisticated threats.
  • User Behavior Analytics (UBA) → Analyzing user behavior patterns to detect anomalies that may indicate insider threats or compromised accounts.

External Intelligence Sources

  • Open-Source Intelligence (OSINT) → Gathering information from publicly available sources to identify potential threats and vulnerabilities.
  • Dark Web Monitoring → Monitoring the dark web for discussions, leaked data, and other information relevant to potential threats.
  • Information Sharing and Analysis Centers (ISACs) → Collaborating with industry-specific organizations that share threat intelligence and best practices.
  • Reliability Factors → Evaluating the trustworthiness and accuracy of external threat intelligence sources.

Counterintelligence and Operational Security

  • Counterintelligence → Actions and strategies designed to detect, prevent, and mitigate espionage and intelligence activities conducted by adversaries.
  • Operational Security (OpSec) → Processes and practices to protect information and activities from adversaries who might seek to exploit them.

Threat Intelligence Platforms (TIPs) and Third-Party Vendors

  • Threat Intelligence Platforms (TIPs) → TIPs are tools designed to collect, aggregate, analyze, and disseminate threat intelligence data to improve an organization’s security posture.

Indicator of Compromise (IoC) Sharing

  • Structured Threat Information eXchange (STIX)NOTES
  • Trusted automated exchange of indicator information (TAXII) → NOTES

Rule-Based Languages

  • Sigma → Sigma is a standardized open-source format for writing and sharing detection rules across different SIEM systems.
  • YARA → YARA is a tool for identifying and classifying malware samples and other indicators of compromise (IoCs).
  • Rita → Rita (Real Intelligence Threat Analytics) is an open-source tool for analyzing network traffic and detecting anomalies.
  • Snort → Snort is a widely used open-source network intrusion detection system (NIDS) that uses rules for traffic analysis.

Indicators of Attack (IoAs)

  • TTPs describe the behaviors and methods used by adversaries to achieve their objectives. The MITRE ATT&CK Framework is a valuable resource for understanding TTPs.
  • Tactics: The high-level goals of an attacker (e.g., Initial Access, Execution).
  • Techniques: The methods used to achieve those goals (e.g., Phishing for Initial Access).
  • Procedures: The specific implementations of techniques used in attacks.

Objective 4.4

Malware Analysis

  • Detonation → Involves running the malware in a controlled environment to observe its behavior.
    • Techniques:
      • Static Analysis: Examining the malware’s code without executing it.
      • Dynamic Analysis: Observing the malware’s behavior during execution.
  • IoC Extractions → Involves identifying indicators from the malware analysis for detection and mitigation.
    • Techniques:
      • File Hashes: MD5, SHA1, SHA256
      • Network Indicators: IP addresses, domains, URLs
      • File Indicators: Filenames, paths
      • Registry Keys: Specific registry modifications
      • Behavioral Indicators: System changes, processes
  • Sandboxing → Involves running the malware in an isolated environment to observe its behavior without affecting production systems.
    • Techniques:
      • Automated Sandboxes: Provides automated analysis and reports.
      • Manual Sandboxes: Allows for controlled manual analysis.
  • Code Stylometry → Used to analyze the code’s writing style to identify variants and potential authors.
    • Techniques:
      • Variant Matching: Identifying similar variants of malware.
      • Code Similarity: Comparing code to detect similar malware families.
      • Malware Attribution: Linking malware to known threat actors based on code style.

Reverse Engineering

  • Disassembly → Involves converting machine code into assembly language to understand how a program works.
  • Decompilation → Converts machine code into high-level language code to understand program logic.
  • Binary Analysis → Involves examining executable files to identify malicious behaviors, vulnerabilities, or hidden functionalities.
  • Bytecode Analysis → The examination of compiled intermediate code for applications, especially useful for Java and .NET.

Storage Analysis

  • Volatile Storage Analysis → Refers to data that exists temporarily, such as RAM. Analyzing volatile storage provides real-time insights into system activities.
    • Techniques:
      • Memory Dump Analysis: Collecting and analyzing the contents of system memory.
      • Process Analysis: Identifying running processes, their states, and associated information.
      • Network Connections: Investigating open network connections and their endpoints.
      • Registry Analysis: Extracting and examining registry keys for information on system configuration and activities.
  • Non-Volatile Storage Analysis → Refers to data that persists after a system is powered off, such as hard drives or SSDs.
    • Techniques:
      • File System Analysis: Examining files, directories, and metadata.
      • Log File Analysis: Reviewing system and application logs.
      • Disk Forensics: Recovering deleted files and examining file system structures.

Network Analysis

  • Involves examining network traffic to detect and investigate suspicious activities.
  • Techniques:
    • Traffic Capture: Collecting network packets for analysis.
    • Network Monitoring: Observing network traffic for anomalies.
    • Protocol Analysis: Understanding network protocols and detecting misuse.

Metadata Analysis

  • Email Header Analysis → Email headers contain metadata that provides information about the path an email took from sender to recipient, as well as technical details about the email’s origin and any intermediate servers.
    • Techniques:
    • Header Parsing: Extracting header fields such as ReceivedFromToSubject, and Date.
    • Trace Email Path: Tracking the path of the email through different servers.
    • Identify Spoofing: Checking discrepancies in the From address or routing information.
    • Analyze DKIM/SPF/DMARC: Verifying email authentication mechanisms.
  • Image Metadata Analysis → Image metadata can provide details about the creation, modification, and camera settings of an image.
    • Techniques:
      • EXIF Data Extraction: Extracting metadata such as camera make, model, and GPS coordinates.
      • Tamper Detection: Checking for signs of image manipulation.
      • GPS Information: Analyzing location data embedded in the image.
  • Audio/Video Metadata Analysis → Audio and video files contain metadata that can include information about the file’s creation, codec details, and modification history.
    • Techniques:
      • Extract Metadata: Reviewing details such as codec, duration, and bit rate.
      • Analyze Content: Checking for hidden or embedded data.
      • Verify Authenticity: Ensuring that the media file is genuine.
  • File/Filesystem Metadata Analysis → Analyzing the metadata of files and filesystems involves inspecting attributes like timestamps, file permissions, and file structure.
    • Techniques:
      • File Metadata Extraction: Reviewing file attributes such as creation and modification dates.
      • Filesystem Analysis: Examining filesystem structures for evidence of tampering or hidden files.
      • File Integrity Checking: Verifying that files have not been altered.

Hardware Analysis

  • Joint Test Action Group (JTAG) → JTAG is a hardware debugging standard used for testing and programming hardware devices. It provides access to the internal states of a system’s components through a set of test access ports.
  • JTAG Setup for Incident Response:
    • Connecting to the Target Device: Attach a JTAG adapter to the device’s JTAG port.
    • Accessing the JTAG Interface: Use software tools to communicate with the target device via JTAG.
    • Extracting Data: Read the contents of memory, registers, and configuration settings.
    • Analyzing Hardware Components: Check for signs of tampering or unauthorized modifications.

Host Analysis

  • Host Analysis involves investigating individual systems to find evidence of malicious activity.
  • Techniques:
    • System Inspection: Checking system configurations and installed software.
    • Event Log Analysis: Reviewing system logs for unusual activities.
    • File Integrity Monitoring: Checking for unauthorized changes to files.

Data Recovery and Extraction

  • Data Recovery and Extraction involve retrieving lost or corrupted data and extracting relevant information.
  • Techniques:
    • File Carving: Recovering files from unallocated disk space.
    • Data Extraction: Pulling specific data from a disk or storage device

Threat Response

  • Threat Response encompasses the strategies and actions taken to address and mitigate threats.
  • Techniques:
    • Incident Containment: Limiting the scope of the threat.
    • Eradication: Removing the threat from the environment.
    • Recovery: Restoring systems to normal operation.
    • Post-Incident Review: Evaluating the incident and response efforts.

Preparedness Exercises

  • Preparedness Exercises involve activities designed to test and improve incident response plans.
  • Techniques:
    • Tabletop Exercises: Simulated scenarios for team discussion and planning.
    • Red Team/Blue Team Exercises: Offensive (Red Team) and defensive (Blue Team) exercises.

Timeline Reconstruction

  • Timeline Reconstruction involves creating a timeline of events to understand the sequence of an attack.
  • Techniques:
    • Event Correlation: Linking events from different sources.
    • Log Analysis: Using log data to piece together events.

Root Cause Analysis

  • Root Cause Analysis (RCA) identifies the underlying cause of security incidents to prevent future occurrences.
  • Techniques:
    • 5 Whys Technique: Asking “why” repeatedly to identify the root cause.
    • Fishbone Diagram: Visual tool for identifying potential causes.

Cloud Workload Protection Platform (CWPP)

  • Cloud Workload Protection Platform (CWPP) secures cloud environments and applications.
  • Techniques:
    • Cloud Security Configuration: Ensuring proper security settings for cloud services.
    • Vulnerability Management: Identifying and mitigating vulnerabilities in cloud environments.

Insider Threat

  • Insider Threat refers to threats posed by individuals within the organization.
  • Techniques:
    • Behavioral Monitoring: Observing employee activities for suspicious behavior.
    • Access Control Management: Ensuring appropriate access permissions.