Network Security & Cryptography

Chapter 12
Security Monitoring, Analytics and Incident Response

Post Graduate Program in Information Technology
Network Security & Cryptography   •   Post Graduate

Security Monitoring, Analytics and Incident Response

Introduction

Modern security depends on the ability to observe systems, distinguish ordinary activity from malicious behaviour, respond before damage expands, and learn from events. Prevention remains important, but no control is perfect: credentials are stolen, vulnerabilities are exploited, insiders make mistakes, and attackers operate through legitimate administrative tools. Security monitoring and incident response therefore form an operational feedback loop connecting technical telemetry, analytical judgement, organizational decision-making, and recovery.

Security monitoring is the systematic collection and interpretation of evidence about assets, identities, networks, applications, and cloud services. Incident response is the coordinated process used to prepare for, detect, analyse, contain, eradicate, recover from, and learn from security incidents. At postgraduate level, these activities should be understood not merely as tool configuration, but as socio-technical systems involving data quality, detection logic, governance, human expertise, legal constraints, and business priorities.

Learning Objectives

After studying this chapter, students should be able to:

  • distinguish logs, events, alerts, telemetry, and incidents;
  • design a monitoring architecture using centralized logging, SIEM, SOAR, and behavioural analytics;
  • explain detection engineering, threat hunting, and analytical limitations;
  • apply an incident-response lifecycle to a realistic case;
  • preserve and evaluate digital evidence;
  • assess recovery, business continuity, metrics, and post-incident improvement;
  • discuss privacy, governance, automation, and emerging AI-assisted operations.

1. The Evidence and Monitoring Chain

A log is a recorded representation of an event, such as an authentication attempt or firewall decision. An event is an occurrence reported by a system. Telemetry is a broader stream of measurements and observations, including packet metadata, endpoint process activity, cloud API calls, identity signals, and performance data. An alert is an event or correlation judged sufficiently suspicious to require attention. An incident is a confirmed or suspected occurrence that threatens confidentiality, integrity, or availability and requires coordinated response.

The monitoring chain is:

Security monitoring chain Sourceslogs/telemetryCollectionnormalizationAnalyticscorrelationDecisiontriageResponseand learning
Security monitoring chain from data collection to improvement
Figure: Security monitoring chain from data collection to improvement

Figure: The operational chain from observations to response and improvement.

The chain is only as strong as its weakest stage. A sophisticated correlation rule cannot compensate for missing identity logs; accurate logs cannot produce value if analysts lack context; and a good alert is ineffective if containment authority is unclear.

1.1 Log sources and telemetry

Important sources include:

SourceTypical evidenceSecurity value
Identity providerLogin, token, MFA, privilege eventsAccount compromise and privilege misuse
Endpoint detection and responseProcesses, files, registry, network connectionsMalware and living-off-the-land activity
Network devicesFlow, DNS, firewall, proxy, VPN recordsScanning, command-and-control, exfiltration
ApplicationsRequests, errors, administrative actionsAbuse of business logic and APIs
Cloud control planeResource creation, policy changes, API callsUnauthorized infrastructure changes
Data storesQueries, exports, permission changesData access and leakage

Collection should address time synchronization, retention, integrity, availability, and privacy. Network telemetry may show that a host contacted an unusual domain, but endpoint telemetry may be needed to determine which process initiated the connection. Correlation across sources is consequently central to modern detection.

1.2 Data quality

Useful monitoring requires consistent timestamps, stable asset and user identifiers, meaningful severity fields, and sufficient context. Common defects include clock drift, duplicated events, dropped records, unparsed formats, excessive verbosity, and retention periods shorter than the investigation window. Organizations should document source ownership, expected volume, parsing rules, and failure indicators.

2. SIEM, SOAR and Behavioural Analytics

A security information and event management (SIEM) platform centralizes, parses, indexes, correlates, and presents security data. Its functions commonly include collection, normalization, search, rule-based detection, dashboards, case management, and reporting. A SIEM is not automatically a complete security program: poor data engineering can create expensive storage with little analytical value.

A security orchestration, automation and response (SOAR) platform coordinates playbooks across tools. For example, a confirmed phishing case may cause a ticket to be created, a message to be quarantined, a URL to be blocked, and an account to be temporarily restricted. Automation should be proportional to confidence and impact. Reversible actions, such as adding a temporary network block, are generally safer to automate than irreversible actions, such as deleting evidence or disabling a business-critical account.

User and entity behaviour analytics (UEBA) establishes behavioural context for users, devices, service accounts, and other entities. Signals may include unusual login geography, abnormal access volume, rare administrative actions, or a new relationship between a host and destination. Behavioural analytics can identify previously unknown patterns, but “unusual” does not mean “malicious.” Travel, maintenance, acquisitions, software deployment, and remote work can all produce anomalies.

A simple standardized score is sometimes used to compare an observation with a baseline:

z = (x − μ) ÷ σ

Here, x is the observed value, μ is the baseline mean, and σ is the standard deviation. This score assumes that the baseline is representative and that variation is reasonably described by the standard deviation. It is not, by itself, a probability of attack. Heavy-tailed or seasonal data may require robust statistics, quantiles, or time-aware models instead.

3. Detection Engineering

Detection engineering treats detections as engineered products rather than ad hoc searches. A detection should have:

  1. a defined threat behaviour or analytic objective;
  2. identified data sources and fields;
  3. logic expressed in a query or rule language;
  4. severity and confidence criteria;
  5. a test dataset or simulation method;
  6. an owner, version, and review date;
  7. an investigation guide and response recommendation;
  8. documented limitations and expected false positives.

Detection logic may be signature-based, behavioural, correlation-based, or threat-intelligence-informed. Signature rules are precise when indicators are reliable but can be bypassed. Behavioural rules offer broader coverage but often increase analyst workload. A mature program combines both.

Detection quality can be analysed using a confusion matrix. A true positive is malicious activity correctly detected; a false positive is benign activity incorrectly alerted; a true negative is benign activity correctly ignored; and a false negative is malicious activity missed. Precision and recall are:

Precision = TP ÷ (TP + FP)
Recall = TP ÷ (TP + FN)

These measures assume that labels are sufficiently accurate. Precision describes the proportion of alerts that are genuinely relevant, whereas recall describes the proportion of known malicious cases detected. Neither measure alone is adequate: a rule that alerts on everything may have high recall but poor precision, while a highly restrictive rule may have high precision but miss attacks.

Detection engineering should be risk-driven. Coverage can be mapped to adversary behaviours, critical assets, attack paths, and business consequences. Testing should include adversary emulation, controlled simulations, replayed historical events, and negative testing. Changes must be version-controlled so that analysts can explain why an alert changed over time.

4. Threat Hunting and Investigation

Threat hunting is a hypothesis-driven search for malicious or suspicious activity that has not generated a dependable alert. It differs from routine alert triage because the hunter begins with a question, such as: “Could an attacker have used stolen cloud tokens to access sensitive storage without triggering endpoint controls?”

A sound hunt proceeds through:

  • scope definition and asset prioritization;
  • a hypothesis based on threat intelligence, exposure, or anomaly;
  • identification of observable behaviours;
  • query design and data validation;
  • examination of timelines and relationships;
  • confirmation, refutation, or refinement of the hypothesis;
  • conversion of useful findings into detections or control improvements.

Investigators should avoid confirmation bias. A suspicious event must be tested against alternative explanations, maintenance records, identity context, and known software behaviour. Analysts should preserve original records and distinguish observed facts from interpretations.

5. Incident-Response Lifecycle

A widely used lifecycle contains preparation; detection and analysis; containment, eradication, and recovery; and post-incident activity. In practice, these stages overlap and repeat.

Preparation

Preparation includes policies, roles, contact lists, asset inventories, logging standards, playbooks, exercises, legal advice, backup strategies, communication plans, and relationships with suppliers, law enforcement, and specialist responders. Authority must be explicit: who may isolate a server, suspend an account, notify a regulator, or disclose information to customers?

Detection and analysis

The team validates the alert, establishes scope, identifies affected assets and accounts, estimates impact, assigns severity, and constructs a timeline. Classification should be evidence-based. An alert may be closed as benign, escalated as suspicious, or declared an incident when the available evidence and risk justify coordinated action.

Containment

Short-term containment limits immediate spread; long-term containment preserves business operations while removing attacker access. Options include network isolation, credential rotation, token revocation, segmentation, blocking indicators, and temporary access restrictions. Containment can destroy volatile evidence or disrupt essential services, so it requires explicit trade-off analysis.

Eradication and recovery

Eradication removes persistence, malicious accounts, unauthorized changes, and exploited weaknesses. Recovery restores trusted systems, validates backups, monitors for recurrence, and returns services in a controlled sequence. “Reimaging” alone is not eradication if the initial access vector remains open or credentials remain compromised.

Post-incident activity

The organization conducts a blameless but accountable review. It examines timeline accuracy, decision quality, control performance, communication, vendor dependencies, and residual risk. Improvements should become owned, prioritized work rather than an untracked list of recommendations.

6. Digital Forensics and Evidence Handling

Digital forensics applies disciplined methods to identify, acquire, preserve, examine, analyse, and report digital evidence. Evidence may include disk images, memory captures, logs, email headers, cloud audit records, browser artifacts, and network captures.

Important principles are integrity, provenance, reproducibility, minimization, and competence. Investigators should document who collected an item, when and how it was collected, which tool and version were used, where it was stored, and who accessed it. A cryptographic hash can support integrity verification:

h = H(D)

Here, D is the digital data, H is a specified cryptographic hash function, and h is the resulting digest. If the data changes, a secure hash function is expected to produce a different digest with overwhelming probability; however, a hash proves consistency with a recorded value, not that the data is truthful or complete.

A chain-of-custody record should include an evidence identifier, description, source, collector, acquisition time, hash, storage location, transfers, access history, and purpose. Original evidence should be protected, while analysis should use verified copies. Legal admissibility varies by jurisdiction; technical preservation does not substitute for legal advice.

Volatile evidence, such as memory and active network connections, may disappear when a system is powered off. Acquisition order should therefore be planned according to investigative objectives, system criticality, authorization, and the risk of altering evidence. Every forensic action changes some state; the aim is to minimize and document alteration, not to claim that observation is entirely non-invasive.

7. Metrics and Decision Support

Metrics should support decisions rather than reward superficial activity. Useful measures include mean time to detect, mean time to acknowledge, mean time to contain, mean time to recover, detection coverage, alert precision, false-positive rate, percentage of critical assets logging successfully, and completion of corrective actions.

For a set of incidents with detection times t1, t2, …, tn, mean time to detect is:

MTTD = (t1 + t2 + … + tn) ÷ n

The unit is time, such as minutes or hours. The mean can be distorted by extreme incidents, so median and percentile values should also be reported. Metrics must state the population, time window, start and end definitions, exclusions, and data quality. A low response time achieved by prematurely closing cases is not genuine improvement.

Business-facing measures connect operational results to risk: reduction in exposure time for critical vulnerabilities, percentage of high-value systems covered by tested recovery procedures, or estimated loss avoided through rapid containment. Such estimates should be labelled estimates and accompanied by assumptions.

8. Business Continuity and Recovery

Incident response focuses on managing the security event; business continuity ensures that essential functions continue; disaster recovery restores technology and data. They are related but not identical. Business impact analysis identifies critical processes, dependencies, maximum tolerable disruption, recovery priorities, and acceptable data loss.

Recovery time objective (RTO) is the target time for restoring a service. Recovery point objective (RPO) is the maximum tolerable period of data loss, expressed as time between the last acceptable recovery point and the disruption. For example, an RPO of four hours does not guarantee zero data loss; it establishes a target for backup or replication frequency.

Recovery must address integrity as well as availability. Backups should be protected from the same identity compromise or ransomware event affecting production. Offline, immutable, or logically isolated copies; restoration testing; dependency maps; and staged reconnection reduce recovery risk.

9. Governance, Ethics and Privacy

Monitoring can expose personal information, communications, location, health-related data, or employee behaviour. Governance should define purpose limitation, data minimization, access controls, retention, transparency, lawful authority, and review mechanisms. Analysts should access only information necessary for the investigation, and sensitive fields should be masked where possible.

Organizations must balance security with proportionality. Continuous monitoring can become surveillance if it lacks limits and accountability. Automated decisions affecting employment, access, or reputation require human oversight, explainability appropriate to the context, and appeal or review processes. Cross-border cloud logging may create jurisdictional and transfer obligations.

Third-party services introduce shared-responsibility questions: who owns the logs, who can investigate, how quickly can data be supplied, and how are incidents communicated? Contracts should address retention, evidence access, breach notification, security obligations, and exit procedures.

10. AI-Assisted Security Operations

Machine learning can prioritize alerts, identify unusual relationships, summarize cases, classify malware, and assist query generation. Generative AI can help draft investigation notes or translate queries between platforms. However, models may hallucinate, inherit biased training data, leak sensitive information, or be manipulated by adversarial inputs. AI output should be treated as an analyst aid, not authoritative evidence.

Controls include approved data boundaries, prompt and output logging, human review, evaluation against representative cases, access restrictions, model-change management, and clear accountability. Automation should be calibrated to confidence, reversibility, and business impact. The strongest architecture combines deterministic controls, statistical methods, expert review, and continuous validation.

Illustrative Case: Cloud Credential Compromise

Background

A fictional financial-services organization operates a hybrid environment. Its identity provider, cloud control plane, endpoint platform, and data warehouse send records to a SIEM. A service account is authorized to export transaction data to a managed analytics platform.

Problem

UEBA identifies an unusual token use from a new region, followed by a sharp increase in data-export API calls. No malware is detected on the associated workstation. The first alert has low confidence because the organization uses global contractors.

Analysis

The response team correlates identity events, cloud API records, proxy telemetry, and service-account configuration. The token was created shortly after a contractor’s mailbox was accessed through a phishing page. The export calls used valid credentials but occurred outside the service account’s normal schedule and targeted an unusually broad dataset. Analysts preserve cloud audit records, record hashes of exported evidence, and confirm that the destination storage was not an approved integration.

Approach and solution

The team revokes active sessions, rotates service-account credentials, disables the unauthorized integration, and applies a temporary export restriction. It preserves the compromised mailbox and cloud logs before making destructive changes. A forensic review identifies the phishing message and confirms that a limited dataset was accessed. Legal and privacy officers assess notification duties. Recovery includes rebuilding the integration with short-lived credentials, least privilege, conditional access, and an approval workflow for bulk exports.

Outcome

The organization contains the incident without shutting down all analytics services. It improves detections for token use, unusual API volume, new service-account relationships, and mailbox forwarding rules. A tabletop exercise reveals that the original playbook lacked a clear owner for cloud-token revocation.

Learning points

The case demonstrates why valid credentials can be used maliciously, why cross-source correlation is essential, why containment must preserve evidence, and why post-incident improvements should address identity design and governance rather than merely add another indicator.

Challenges and Best Practices

Major challenges include alert overload, incomplete asset inventories, encrypted traffic, cloud complexity, attacker adaptation, vendor dependence, scarce expertise, and conflicting privacy or retention requirements. Best practices include:

  • prioritize critical assets and attack paths;
  • synchronize clocks and standardize event schemas;
  • measure logging health continuously;
  • design detections with owners, tests, and expiry reviews;
  • maintain tested playbooks and authority matrices;
  • separate evidence preservation from convenience;
  • use automation for repeatable, reversible actions;
  • validate assumptions through exercises and hunts;
  • report both operational and business outcomes;
  • review incidents for systemic causes, not individual blame.

Chapter Summary

Security monitoring transforms system activity into evidence that can support detection and decision-making. Logs and telemetry must be collected, normalized, protected, and correlated across identities, endpoints, networks, applications, and cloud services. SIEM platforms centralize analysis, SOAR platforms coordinate response, and behavioural analytics add context, but none removes the need for skilled judgement.

Detection engineering requires explicit objectives, reliable data, tested logic, measurable quality, ownership, and continuous tuning. Threat hunting searches proactively from hypotheses, while digital forensics preserves evidence and reconstructs events under integrity and legal constraints. Incident response proceeds through preparation, analysis, containment, eradication, recovery, and learning. Recovery must protect integrity and align with business continuity objectives such as RTO and RPO. Metrics are valuable only when definitions and limitations are clear. Privacy, proportionality, third-party governance, and human oversight are essential, particularly when AI is used to augment operations.

Key Terms

Log: A recorded representation of an event.

Telemetry: Observations and measurements produced by systems and networks.

SIEM: A platform for centralized security-event collection, analysis, and case management.

SOAR: Technology for orchestrating and automating security workflows.

UEBA: Analytics that model behaviour of users and entities.

Detection engineering: The disciplined design, testing, deployment, and maintenance of detections.

False positive: A benign event incorrectly identified as suspicious.

False negative: Malicious activity that a detection fails to identify.

Threat hunting: Hypothesis-driven searching for previously undetected threats.

Incident: A confirmed or suspected event requiring coordinated security response.

Containment: Actions that limit an incident’s spread or impact.

Eradication: Removal of attacker access, persistence, and root causes.

Digital forensics: Scientific examination and interpretation of digital evidence.

Chain of custody: Documentation of evidence possession and handling.

Hash: A fixed-length digest used to check data consistency.

RTO: Target time for restoring a service.

RPO: Maximum targeted period of acceptable data loss.

MTTD: Mean time taken to detect incidents.

Business continuity: Capability to maintain essential functions during disruption.

Post-incident review: Structured examination used to improve controls and response.

Review Questions

Short Answer Questions

  1. Distinguish a log, an alert, and an incident.
  2. What are the principal functions of a SIEM?
  3. Why should automated containment actions be reversible where possible?
  4. Define RTO and RPO.
  5. What information belongs in a chain-of-custody record?

Long Answer Questions

  1. Explain how data quality affects SIEM detection performance and incident investigation.
  2. Compare signature-based, behavioural, and correlation-based detection approaches.
  3. Describe the complete incident-response lifecycle and the decisions made at each stage.
  4. Discuss the relationship between threat hunting and detection engineering.
  5. Evaluate the privacy, governance, and accountability issues associated with AI-assisted security operations.

Analytical / Application Questions

  1. An organization has high alert volume, incomplete endpoint coverage, and no tested cloud playbook. Prioritize a six-month improvement program and justify the sequence.
  2. Design an investigation plan for unusual bulk data exports using identity, cloud, endpoint, and network telemetry. Identify evidence-preservation requirements.
  3. A detection has TP = 72, FP = 18, and FN = 8. Calculate its precision and recall, then explain whether either metric alone is sufficient for judging operational value.

Multiple Choice Questions with Answers

Question 1

Which statement best distinguishes telemetry from a log?

A. Telemetry is always generated only by network devices

B. Telemetry is a broader category that can include logs, measurements, and activity streams

C. A log is always more reliable than telemetry

D. Telemetry is an incident confirmed by an analyst

Correct Answer: B. Telemetry is a broader category that can include logs, measurements, and activity streams

Question 2

What is the primary purpose of a SIEM?

A. To replace all human analysts

B. To physically isolate every compromised host

C. To centralize and analyse security-relevant data

D. To guarantee that no false positives occur

Correct Answer: C. To centralize and analyse security-relevant data

Question 3

Which action is generally safest to automate first in a high-confidence response playbook?

A. Deleting forensic evidence

B. Permanently shutting down a critical database

C. Adding a temporary, documented network block

D. Notifying the public without approval

Correct Answer: C. Adding a temporary, documented network block

Question 4

If TP = 80 and FP = 20, what is precision?

A. 20%

B. 50%

C. 80%

D. 100%

Correct Answer: C. 80%

Question 5

What is the central characteristic of threat hunting?

A. It begins with a hypothesis and searches proactively

B. It only reviews closed incidents

C. It ignores baseline behaviour

D. It is limited to malware signature matching

Correct Answer: A. It begins with a hypothesis and searches proactively

Question 6

What does a cryptographic hash primarily help demonstrate in forensic handling?

A. That a file was created by a particular person

B. That data is consistent with a recorded digest

C. That an incident was legally admissible in every jurisdiction

D. That the data contains no malicious code

Correct Answer: B. That data is consistent with a recorded digest

Question 7

Which statement about RPO is correct?

A. It is the target time to restore service

B. It is the maximum targeted period of acceptable data loss

C. It is the number of analysts assigned to recovery

D. It is the time required to detect an attack

Correct Answer: B. It is the maximum targeted period of acceptable data loss

Question 8

A false negative occurs when:

A. Benign activity generates an alert

B. Malicious activity is missed by the detection

C. An alert is correctly escalated

D. A backup is successfully restored

Correct Answer: B. Malicious activity is missed by the detection

Question 9

Why should incident metrics define their population and measurement window?

A. To make all metrics appear lower

B. To make comparisons meaningful and reproducible

C. To eliminate the need for evidence

D. To ensure that mean values equal median values

Correct Answer: B. To make comparisons meaningful and reproducible

Question 10

Which principle is most appropriate for privacy-conscious monitoring?

A. Collect every available personal attribute indefinitely

B. Use purpose limitation and collect only necessary information

C. Allow all analysts unrestricted access

D. Avoid documenting monitoring decisions

Correct Answer: B. Use purpose limitation and collect only necessary information

Network Security & Cryptography
Chapter 12 of 15