Join our Newsletter — 33% off our NHI Course
Home› Guides› Forensic Readiness Guide: logging, retention and collection before…
Guide Incident Response & Forensics

Forensic Readiness Guide: logging, retention and collection before the incident

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 14 min read
On this page

Most investigations fail on evidence that was never collected, expired before anyone looked, or cannot be trusted once found. Forensic readiness is the work done before an incident so that the evidence needed to answer "what happened, to what, by whom and since when" already exists, is kept long enough and can be collected without delay. ISO/IEC 27043 treats readiness as its own class of processes, separate from the investigation itself, and NIST SP 800-61 Rev. 3 expects incident data to be collected with its integrity and provenance preserved. This guide covers how to plan readiness around realistic scenarios, set logging and retention against platform defaults, keep time and integrity sound, and prepare collection capability and access. It is written for incident response leads, SOC and platform engineers, and risk owners who fund logging. For investigation technique itself see the Digital Forensics (DFIR) Guide.

Key takeaways

  • Start from the questions, not the logs. List the incident scenarios you must be able to investigate and the evidence each needs, then close the gaps.
  • Platform defaults are short. Entra ID free tenants keep sign-in and audit logs for seven days and AWS CloudTrail event history holds 90 days of management events, while attacker dwell time often exceeds both.
  • Retention you cannot restore is no retention. Microsoft notes that upgrading an Entra licence does not recover expired data, so export has to be set up before it is needed.
  • Integrity and time decide whether evidence is usable. Synchronised clocks in UTC, write-protected storage and recorded hashes turn logs into evidence a regulator, insurer or court will accept.
  • Collection is a capability, not a purchase. Pre-deployed tools, pre-approved access, trained people and rehearsed procedures are what make the first 24 hours productive.

What forensic readiness means

Forensic readiness is an organisation's ability to gather and use digital evidence with minimal cost and disruption when an incident, dispute or investigation occurs. It sits upstream of incident response: the plan, logging design and evidence procedures exist before anyone declares an incident.

  • ISO/IEC 27043:2015 (Incident investigation principles and processes) describes investigation from pre-incident preparation through closure. Its clauses separate readiness processes (clause 7) from initialisation, acquisitive, investigative and concurrent processes (clauses 8 to 11). The ISO catalogue lists it as reviewed and confirmed in 2020.
  • ISO/IEC 27037:2012 covers identification, collection, acquisition and preservation of potential digital evidence. Readiness makes those steps possible at speed.
  • NIST SP 800-61 Rev. 3 (final, April 2025) maps incident response to CSF 2.0. RS.AN-07 asks that incident data and metadata are collected with integrity and provenance preserved, and recommends retaining evidence under defined preservation procedures and retention policies, weighing possible prosecution against the cost of keeping data and the tools needed to read it. It also notes that collected incident data is evidence even when formal chain of custody is not used.
  • NIST SP 800-86 (2006) remains the US reference for integrating forensic techniques into incident response from an IT rather than law enforcement perspective, and advises consulting management and legal counsel before applying its practices.

Readiness is not the same as "log everything". Logging without a purpose is expensive and still misses the one field an investigation needs. The method below ties every logging and retention decision to a question.

Scenario-driven evidence requirements

Pick six to ten scenarios that reflect your threat model and obligations, then work out the evidence each requires. Involve legal, HR and privacy early: some scenarios, such as insider data theft, depend on monitoring that needs a lawful basis and a clear policy.

ScenarioQuestions the investigation must answerMinimum evidence
Ransomware on Windows estateInitial access, accounts used, lateral movement path, data staged or exfiltrated, first encryption timeSecurity log logons (4624, 4625) and process creation (4688 with command line) or Sysmon Event ID 1; EDR telemetry; VPN and firewall logs; domain controller logs; backup system audit logs
Cloud identity takeoverWhich sign-ins were the attacker, what consent, role or credential changes were made, which data was accessedIdentity provider sign-in and audit logs exported beyond default retention; mailbox and file access audit records; service principal and app registration changes
Leaked cloud access keyWhat the key could reach, what it did, from whereCloudTrail trail or event data store including data events for sensitive buckets; key creation and last-used metadata; VPC flow logs
Compromised edge deviceExploit time, configuration changes, credentials captured, onward connectionsDevice syslog shipped off-box; configuration backups with hashes; NetFlow; authentication logs for accounts that pass through the device
Web application data breachVulnerable request, records accessed, attacker sessionsWeb server and WAF logs with request IDs; application audit log of record access; database audit for privileged queries
Insider data removalWhat left, through which channel, by whom, with what intent indicatorsDLP and proxy logs; SaaS sharing and download events; endpoint USB and file activity; HR case reference (under policy)
Supply chain or CI/CD compromiseWhich builds, secrets and artefacts were touchedCI system audit logs, runner logs, artefact registry access logs, secret store access logs, commit signing records

For each scenario, record the data source, owner, current retention, gap and remediation. That table becomes the readiness backlog and the business case for logging spend.

Logging and retention design

Retention must cover realistic dwell time plus time to detect, investigate and meet legal holds. The Storm-0558 investigation illustrates both points: the US State Department detected the intrusion through a custom alert on premium mailbox audit records (MailItemsAccessed) it was licensed for, and later review of older logs showed access had begun weeks earlier. See the Microsoft Storm-0558 key breach.

SourceDefault retention (as documented)Readiness action
Microsoft Entra ID sign-in and audit logs7 days (Free), 30 days (P1, P2)Route through Azure Monitor diagnostic settings to storage, event hub or SIEM; upgrades do not restore expired data
Microsoft Purview Audit (Standard)180 daysAssess Audit (Premium): one year by default for Entra, Exchange, OneDrive and SharePoint records, up to 10 years with an add-on
AWS CloudTrail event history90 days of management events per Region, no data eventsCreate an organisation trail or event data store; enable data events where sensitive data lives
Endpoint event logsSize-limited local logs that overwriteForward centrally (for example Windows Event Forwarding or an agent); alert on log clearing (Security Event ID 1102)
EDR telemetryProduct and licence dependentConfirm the look-back window in the contract and export key telemetry if it is shorter than your target
Network full packet captureUsually hours to days, storage boundKeep at chokepoints only; keep flow records much longer
  • Reference points for targets: CIS Controls v8.1 Safeguard 8.10 sets a minimum of 90 days for audit log retention. US federal memorandum OMB M-21-31, as issued in August 2021, set 12 months in active storage and 18 months in cold storage for most log categories, and 72 hours for full packet capture. Many organisations adopt 12 months searchable as a practical baseline for identity, cloud control plane and endpoint logs.
  • Fields matter as much as sources: M-21-31 lists minimum fields such as accurate timestamps, status codes, source and destination addresses, user identifiers, executed commands and a unique event identifier for correlation. Check that parsing keeps them.
  • Tiering: keep recent data hot for hunting and triage, older data in cheaper archive that can be rehydrated within a stated time. Test the rehydration.
  • Privacy: set retention per category with a documented purpose, and delete at the end of it. NCSC CAF outcome C1.b expects logs to be kept for a suitable period and then deleted.

See the Log Management and Retention Guide and the SaaS Audit Log Retention and Licensing Guide for platform detail.

Time, integrity and storage

  • Time synchronisation: sync all systems to authenticated, internal time sources and log in UTC with an ISO 8601 timestamp including milliseconds and an offset. M-21-31 specified the format YYYY-MM-DDThh:mm:ss.mmm with Z or an offset. Record clock drift when collecting from devices that cannot sync. NIST SP 800-53 AU-8 and SC-45 cover this.
  • Separation: ship logs off the source system quickly so that an attacker with administrative access cannot erase them. Store them in a separate account, subscription or tenant with different administrators.
  • Immutability: use write-once or object lock storage for the evidence tier, and restrict delete rights to a break-glass role. NCSC CAF C1.b at Achieved expects analysis on copies so the master log stays unaltered, attributable access and detection of tampering including deletion.
  • Hashing: hash exported evidence sets at collection (SHA-256) and record the hash in the case record. NIST SP 800-61 Rev. 3 RS.AN-06 asks for the integrity and provenance of investigation records to be preserved.
  • Health monitoring: alert when a source stops sending, volume drops sharply or audit policy changes. Silent log loss is common after rebuilds and agent upgrades.

Collection capability and access

When an incident starts, responders lose hours waiting for access, tools and approvals. Prepare them in advance.

CapabilityPrepared in advanceTest
Endpoint triage collectionEDR live response or triage collector deployed; script packages approved; output location definedCollect from a pilot host per OS each quarter
Memory acquisitionTool and procedure approved per OS; storage for large imagesAcquire and parse a lab image. See the Memory Forensics Guide
Cloud snapshotsForensic account with roles to snapshot and share volumes; isolated analysis environmentSnapshot, share and mount a test volume end to end
SaaS exportsAdmin roles and API apps for audit export pre-approved; licence features confirmedExport a week of audit data for one user
Responder accessPre-provisioned, monitored break-glass accounts for IR with phishing-resistant MFA, separate from production admin identitiesActivate in a tabletop and confirm alerts fire
Third-party supportIR retainer with agreed data transfer, tools and legal termsJoint exercise once a year
  • Order of volatility: procedures should capture volatile data (memory, network connections, running processes) before disk, following RFC 3227. Decide in advance which hosts may be isolated before collection and which, such as safety or production critical systems, need owner approval.
  • Evidence handling: agree chain of custody forms, storage and access before you need them. NCSC advises tracking findings, decisions and actions in a form that will stand up to regulator or court review. See the Evidence Handling and Chain of Custody Guide and the Chain of Custody Form Template.
  • Legal readiness: legal hold process, privilege arrangements for investigation reports, and contact points for law enforcement and regulators.

Where identity fits

Most modern intrusions use valid accounts, so identity evidence is often the spine of the timeline. Readiness for identity means keeping sign-in, token issuance and directory change logs long enough, including those for non-human identities: service principals, workload identities, API keys and OAuth grants. Record which application or automation owns each machine credential, because "who is this account" is the first question investigators ask and the hardest to answer during an incident. Keep secret store and key management access logs with the same retention as identity logs. See Audit Readiness for AI Agents and NHIs.

Implementing forensic readiness

  1. Set policy and ownership. Write a short readiness policy: scope, scenarios, retention per log category, evidence handling and who owns each source. Get legal and privacy sign-off.
  2. Run the scenario gap analysis. For each scenario fill the source, retention, field and gap table. Prioritise identity, cloud control plane and endpoint process data, which answer most questions.
  3. Fix retention and export first. These are cheap, quick and irreversible if missed: data that expires is gone. Configure exports for identity provider, SaaS and cloud audit logs.
  4. Harden the log pipeline. Central collection, separate administrative boundary, immutable tier, time sync and log health alerts.
  5. Prepare collection. Deploy triage tooling, pre-approve access, create the forensic cloud account, document procedures per platform.
  6. Test in a pilot. Run a purple team or tabletop scenario and attempt to reconstruct a full timeline from evidence alone. Measure how long each source took to obtain.
  7. Roll out and review. Extend to all business units, then review annually and after every significant incident or platform change. If a retention change causes cost or privacy problems, roll back per category rather than across the board, and record the risk acceptance.

Decision guidance

  • Small organisations: focus on exporting identity and SaaS audit logs to low-cost storage, enabling the vendor audit features you already pay for, and holding an IR retainer. A basic triage procedure and a contact list beat an unused toolset.
  • Large or regulated organisations: formal readiness programme with scenario coverage metrics, a dedicated evidence store, legal hold integration and annual testing with the retainer provider.
  • Hot versus archive: keep data hot where analysts hunt regularly; archive where it is needed only for investigations, provided rehydration time is stated and tested.
  • Full packet capture versus flow: full capture at a few chokepoints for short periods; flow records everywhere for long periods. Flow answers "who talked to whom" for months at a fraction of the cost.
  • In-house versus retainer: even with an in-house team, a retainer adds surge capacity and specialist skills. See the Incident Response Retainer Buyer's Guide.

Measuring readiness

  • Scenario coverage: percentage of defined scenarios where all minimum evidence exists for the target retention.
  • Retention compliance: percentage of in-scope sources meeting their retention target, checked automatically.
  • Log source health: sources silent for more than their expected interval, and mean time to restore them.
  • Time to evidence: hours from request to having a source in the hands of the investigator, measured in exercises.
  • Clock accuracy: percentage of systems within the allowed drift.
  • Exercise findings closed: readiness gaps from tests remediated within target dates.

Framework mapping

FrameworkReferenceRelevance
NIST CSF 2.0PR.PS-04, DE.CM-09, RS.AN-06, RS.AN-07, ID.IM-04Log generation, monitoring, preserving records and evidence, maintaining plans
NIST SP 800-53 Rev. 5AU-2, AU-8, AU-9, AU-11, AU-12, SC-45, IR-4, IR-8Event logging, time stamps, protecting and retaining audit records, incident handling and plan
ISO/IEC 27001:2022Annex A 5.28, 8.15, 8.17Collection of evidence, logging, clock synchronisation
CIS Controls v8.1Control 8 Audit Log ManagementCentralised logs, time sync, retention (Safeguard 8.10). See the CIS Control 8 Audit Log Management Guide
NCSC CAFC1.a, C1.bSources and tools for logging, securing logs
ISO/IEC 27043, 27037Readiness processes; evidence handlingInvestigation process model and evidence preservation

Common failure patterns

  • Relying on defaults: discovering during an incident that the identity provider kept seven or 30 days of sign-ins and the intrusion began two months ago.
  • Logs on the compromised system: local logs cleared by the attacker, with nothing forwarded. Alert on Event ID 1102 and on audit policy changes, and forward in near real time.
  • Licence-dependent visibility: the decisive audit records exist only in a premium tier nobody bought, as Storm-0558 showed for mailbox access records.
  • No access for responders: the IR team has no rights to snapshot cloud volumes or export SaaS logs, and the only admins are the ones whose accounts may be compromised.
  • Unparsed or truncated data: command lines not captured, proxy logs without user identity, or timestamps in mixed local time zones that make correlation unreliable.
  • Readiness never tested: archives that cannot be rehydrated in time, and collection scripts that fail on the current OS build.

Practitioner checklist

  • Define six to ten investigation scenarios and the evidence each needs, signed off by legal and privacy.
  • Export identity provider, SaaS and cloud audit logs beyond default retention, starting today.
  • Set a retention target per log category (for example 12 months searchable for identity, control plane and endpoint process data).
  • Forward endpoint and device logs off-box; alert on log clearing and source silence.
  • Store evidence-tier logs immutably in a separate administrative boundary.
  • Synchronise all clocks to authenticated sources and log in UTC with ISO 8601 timestamps.
  • Pre-deploy triage tools, create a forensic cloud account and pre-approve responder access with monitored break-glass accounts.
  • Agree chain of custody, legal hold and retainer engagement procedures.
  • Test with a full timeline reconstruction exercise each year and track time to evidence.

Standards and references

Related NHI Mgmt Group resources: Digital Forensics (DFIR) Guide · Cloud Forensics Guide · Cloud Logging and Audit Trail Guide · Incident Response Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.