Engineering
Forensic readiness: the logging you need before a breach
Retention, endpoint telemetry and audit trails are decided months before an incident, and they set what an investigation can ever establish.
Computing America Cyber. Security assessments, penetration testing and staff training.
Send the question
In short
- Notification clocks start at different points (becoming aware, a materiality determination, discovery), and what you must report depends on what you can establish. Without logs you can't establish it.
- Default retention can be seven or thirty days. An intrusion noticed months after it began has already lost its initial access and scope by the time the investigation starts.
- Reimaging a compromised host destroys the evidence that scopes the incident. Isolate it and leave it powered on, because memory doesn't survive a shutdown.
- Decide before the incident who may disconnect a production system, whether counsel runs the investigation, and what the insurance policy requires.
- Test readiness by picking three plausible incidents and checking, source by source, whether current logging could answer them. The gaps are the work.
During an incident the room asks whether it's over. Afterward a regulator, an insurer, a customer's security team and possibly a court ask those questions and how you know. The notification clocks start at different points, and several depend on what you can establish:
- GDPR's 72 hours run from becoming aware of a personal data breach (Article 33 (opens in a new tab)).
- An SEC Form 8-K Item 1.05 is due four business days after the company determines the incident is material (SEC compliance guide (opens in a new tab)).
- HIPAA requires notice without unreasonable delay and no later than 60 days after discovery of the breach (45 CFR 164.404 (opens in a new tab)).
Default retention sets how far back you can look¶
Retention is often whatever the product's default or license tier gives you. Microsoft Entra ID keeps audit and sign-in logs for seven days on the Free license and 30 days on P1 and P2, and keeping more means exporting them, to a storage account for example (Microsoft Entra data retention (opens in a new tab)). With 30-day retention, an intruder who got in during February and was noticed in June leaves an investigation that sees only the last month, and how the intruder got in is already gone.
Set retention per source as a decision, and write the reason next to the number. PCI DSS covers cardholder-data environments, but it gives a published reference point. Requirement 10.5.1 says to "retain audit log history for at least 12 months, with at least the most recent three months immediately available for analysis" (quoted in Microsoft's PCI-DSS guidance (opens in a new tab)). Check each source against the 12-month question, keep recent data searchable and move the expensive sources to cold storage.
days of log history
- Entra ID, Free7 days
- Entra ID, P1 and P230 days
- PCI DSS 10.5.1 reference12 months
Entra ID keeps logs for 7 days free and 30 days on P1 and P2, so even the paid tier holds about a twelfth of the 12 months PCI DSS 10.5.1 references.
SourceMicrosoft Entra data retention; PCI DSS requirement 10.5.1 as quoted in Microsoft's PCI-DSS guidance.
The first hour is where evidence is destroyed¶
A competent operations team facing a compromised machine wants to reimage it and restore service. That's right for availability and catastrophic for the investigation, because the machine was the record. Volatile memory holds things that exist nowhere on disk, and it doesn't survive a power cycle.
Isolate the machine and leave it powered on. Stop log rotation on anything relevant before it rolls. Acquire before you remediate, even when it feels like a delay you can't afford, and choose and test a memory-capture tool for each operating system in advance. NIST's guide to integrating forensic techniques into incident response (opens in a new tab) (2006) says that volatile data exists only on a live system and should be collected first.
Write down what you do as you do it, so responders' actions can be told apart from the intruder's later.
What to build¶
Build logging to answer four investigator questions, each from its own source:
- How did they get in? Authentication logs from the identity provider, VPN, cloud console and database. Each place a credential is accepted needs its own.
- What was accessed? Application audit trails, which record reads as well as writes.
- What did they do next? Endpoint process lineage: what executed, from where, with which parent.
- What left? DNS and egress records, because exfiltration is a network event.
On Windows, Sysmon records the process lineage (Microsoft says Sysmon logs process creation with the full command line for both current and parent processes (opens in a new tab)). For DNS and egress, keep resolver query logs and firewall or proxy logs of outbound connections.
Two mechanisms make the logs usable as evidence:
- Write-once storage for the audit trail, somewhere an administrator of the source system can't alter it. S3 Object Lock in compliance mode is one option. AWS says a protected object version "can't be overwritten or deleted by any user, including the root user in your AWS account" (Amazon S3 Object Lock (opens in a new tab)).
- Synchronized clocks. Point every source at the same NTP servers and check the offset, so one timeline can be built across sources.
Decide three things before the incident¶
- Who may disconnect a production system, and on what evidence. Otherwise you spend an hour deferring upward.
- Whether the investigation runs under counsel, which affects the privilege position of everything it produces and is hard to arrange afterward.
- What your cyber insurance policy requires. Some require a panel response firm or prior written approval, and engaging outside that can affect coverage.
Test it like a backup¶
A backup isn't trusted until it's been restored, and logging deserves the same test. Pick three incidents plausible for your business: a compromised administrator account, a departing employee taking data, ransomware reaching a file server. Write down the questions you'd have to answer for each, then check source by source whether you could.
For a harder version, have a tester do something realistic, then compare their account of what they did against what your logs show. The difference is your detection gap.
Sources
- 1.SP 800-86: Guide to Integrating Forensic Techniques into Incident Response (opens in a new tab), NIST
- 2.General Data Protection Regulation, Article 33: Notification of a personal data breach to the supervisory authority (opens in a new tab), European Union, Regulation (EU) 2016/679
- 3.Cybersecurity Risk Management, Strategy, Governance, and Incident Disclosure: Small Entity Compliance Guide (opens in a new tab), U.S. Securities and Exchange Commission
- 4.45 CFR 164.404: Notification to individuals (opens in a new tab), Electronic Code of Federal Regulations
- 5.Microsoft Entra data retention (opens in a new tab), Microsoft Learn,
- 6.Locking objects with Object Lock (opens in a new tab), Amazon Web Services
Next step
Send us one incident question.
Ask the question you would need answered after a breach, and we will tell you which systems would have to be logging today for it to be answerable at all.
- Phone
- (214) 723-2510
- Reply
- A person replies, not a sequence: within one business day, from someone who would be on the engagement.
Packages
Start with a package
Four packages, each with its price on the page. Pick one and buy it online.
$199/month
Billed monthly
$182.42/month
Billed yearly
$499/month
Billed monthly
$457.42/month
Billed yearly
- Scammers stopped from sending email as you
- Your website and systems scanned every week
- Your email settings checked every week
- Everything in the 1 to 10 plan
- Covers up to 50 people
$199/month
after a one-time setup fee
- A site planned, designed and built for you
- Hosting and updates every month
$499/month
Billed monthly
$457.42/month
Billed yearly
$999/month
Billed monthly
$915.75/month
Billed yearly
- Your Google profile, fully set up
- A Google post every week
- 2 social posts a week
- Everything in Get found
- 4 social posts a week
- Your top 10 Google searches tracked
from$500/month
after a one-time setup fee
- Your data gathered from the tools you use
- A first analysis that answers your questions
- New findings every month
Related reading
Security4 min readCybersecurity tabletop exercise: how to design one that finds something
A tabletop only finds something if the room can fail it. Here is how to design one that can, and who has to be in it.
Security4 min readVulnerability research: most of the work is ruling things out
A recon pass hands you hundreds of finding-shaped candidates. Which ones die is a person's call; two gates around that call are mechanical.
Security5 min readOT network anomaly detection with fuzzy hashing (TLSH)
How a TLSH similarity hash over Modbus/TCP packet clusters flags drift, the alternatives that failed, and what the method misses.
