Security operations

What Is Digital Forensics and Incident Response (DFIR)?

DFIR is how you stop an attack and prove what happened. Here are the NIST and SANS phases, the evidence that matters, the tools teams use, and the mistakes to avoid.

Cysoro Security TeamPublished · 14 min read
SECURITY OPERATIONS Digital Forensics & Response Stop the attack. Prove what happened. 02:47 login admin 02:48 process spawned 02:49 outbound traffic 02:51 host isolated EVIDENCE TIMELINE CONTAIN CYSORO
Quick answer

Digital forensics and incident response (DFIR) is the combined practice of investigating a security incident and stopping it at the same time. Digital forensics collects and analyzes evidence to show how an attacker got in, what they touched, and what they took. Incident response contains the attack, removes the attacker, and restores normal operations.

Key takeaways

  • DFIR pairs two jobs: forensics proves what happened, and incident response stops the harm and restores systems.
  • Preserve evidence before you clean up — rebooting or reimaging a machine can destroy memory and logs you will never get back.
  • NIST SP 800-61 Rev. 3 maps response to the CSF 2.0 functions, while SANS PICERL gives you six practical steps to run during an incident.

Your laptop is locked by ransomware, or a supplier email turns out to be fake and money has moved. Two questions hit at once: how do you stop it, and how do you prove what happened? That is exactly what digital forensics and incident response — DFIR — is for.

What is digital forensics and incident response?

Digital forensics and incident response (DFIR) combines forensic investigation with structured incident response, so you detect, analyze, contain, and recover from a security incident while preserving the evidence that explains it.

When a breach happens, you need to stop the damage and understand it at the same time. Forensics without response means watching an attack continue while you study it. Response without forensics means stopping an attack without knowing how it started, whether the attacker left other footholds, or what data they took.

DFIR unifies the two so each side informs the other. Forensic findings reveal where the attacker is and which techniques they used, which guides containment. At the same time, containment steps such as isolating a system must be done carefully, so they do not destroy the evidence the investigation needs. A hasty reboot, for example, wipes memory that might have shown the attacker's tools.

DFIR also covers work before and after an incident: logging, playbooks, and a practiced team beforehand, then a timeline, a root-cause finding, and fixes afterwards. Many teams map findings to the MITRE ATT&CK framework, a public knowledge base of attacker tactics and techniques.

Digital forensics vs incident response: what's the difference?

Digital forensics asks what happened and proves it with evidence, while incident response asks how to stop the harm and restore normal operations. They share tools and data, but their goals, pace, and end products are different.

Digital forensicsIncident response
Main questionWhat happened, how, and who did it?How do we stop it and get back to normal?
GoalEvidence that holds up in court, with a regulator, or with an insurerLimit damage, remove the attacker, restore systems
SpeedCareful and methodical, even if slowFast, because the attacker is still active
Key habitWork on verified copies, never the originalIsolate, contain, then eradicate
OutputTimeline, findings report, chain of custodyContained incident, clean systems, restored service
Who uses itInvestigators, law enforcement, lawyers, auditorsSecurity and IT teams, leadership, insurers

The tension between the two is real. A responder who wipes and rebuilds a server quickly may destroy the only copy of the evidence, while an investigator who insists on imaging every disk first may let ransomware spread. DFIR resolves that tension: capture the volatile evidence first, then contain, then keep investigating while recovery proceeds.

That is why the same person often does both jobs in a small team, while larger organizations split them into separate roles that work side by side. Either way, the rule is the same: "preserve before you clean up."

What are the NIST incident response phases?

NIST SP 800-61 Rev. 2 described four phases: preparation, detection and analysis, containment, eradication and recovery, and post-incident activity. Rev. 3, finalized on April 3, 2025, keeps that work but maps it onto the six functions of the NIST Cybersecurity Framework (CSF) 2.0.

Under Rev. 3, Govern, Identify, and Protect are the preparation that happens before an incident: policy, asset inventory, risk assessment, and safeguards. Detect, Respond, and Recover are the response itself: finding and analyzing the incident, acting on it, and restoring operations. Lessons learned feed an Improvement step that updates every function, not just the last one.

That change matters for how you plan. Incident response is no longer a separate document you open in a crisis; it is part of your wider risk management. The old four phases are still useful for talking about an active incident, but Rev. 3 is the current NIST guidance.

NIST SP 800-61 Rev. 3: preparation supports response PREPARATION — BEFORE AN INCIDENT Govern · Identify · Protect — policy, assets, risks, safeguards, logging, playbooks RESPONSE — DURING AN INCIDENT Detect · Respond · Recover — find it, contain it, remove it, restore service Lessons learned → Improvement feeds back into every function
How NIST SP 800-61 Rev. 3 (April 2025) maps incident response to CSF 2.0. Illustration by Cysoro.

Each phase has a clear job. Preparation sets up the team, tools, contact lists, and logging before anything happens. Detection and analysis turns alerts and user reports into a confirmed incident with a scope and severity. Containment stops the spread, eradication removes the attacker's access, and recovery restores systems to normal. Post-incident activity reviews what worked and what should change.

For the forensic side, NIST SP 800-86 adds its own four phases: collection, examination, analysis, and reporting. Investigators collect data, examine it for signs of attacker activity, analyze it to build a timeline and findings, and report what happened. That report may go to leadership, law enforcement, insurers, or regulators.

What is SANS PICERL?

SANS PICERL is a six-step incident-handling model: Preparation, Identification, Containment, Eradication, Recovery, and Lessons Learned. It covers the same work as NIST, split into more steps so a responder can follow it as a checklist.

The extra steps are practical. NIST groups containment, eradication, and recovery into one phase; PICERL separates them, because each is a distinct decision in a live incident. Identification is also its own step: confirming that an alert is a real incident, and deciding its type and severity, before you start isolating systems.

NIST Rev. 2 phaseSANS PICERL stepWhat happens
PreparationPreparationTeam, playbooks, tools, logging, and exercises ready before an incident
Detection and analysisIdentificationValidate the alert, confirm the incident, set severity and scope
Containment, eradication, and recoveryContainmentLimit damage: isolate hosts, block accounts, stop the spread
Containment, eradication, and recoveryEradicationRemove the threat: delete malware, close access, patch the entry point
Containment, eradication, and recoveryRecoveryRestore systems from clean backups and verify they stay clean
Post-incident activityLessons LearnedReview, report, and fix the controls that failed

Use whichever vocabulary your team already uses. PICERL is often the better runbook during an incident, while NIST Rev. 3 is the better framework for planning, governance, and audits. If you are writing your first plan, start with PICERL steps and check them against the NIST functions.

How does the DFIR process work step by step?

A DFIR engagement follows the incident lifecycle, with forensic collection woven through it: prepare, detect and triage, preserve evidence, investigate, contain and eradicate, recover, and learn. The order matters, because evidence disappears fast.

  1. Prepare. Write the incident response plan, name the team and decision-makers, keep an offline contact list, set up logging, and rehearse with tabletop exercises. Agree in advance who can authorize isolating a system or calling in outside help.
  2. Detect and triage. Alerts, user reports, and threat intelligence point to something wrong. Triage decides whether it is a real incident and how severe it is, so you do not launch a full investigation for every false alarm.
  3. Preserve evidence. Capture memory, disk images, and logs before containment changes anything. Work on copies, hash them to prove they are unchanged, and record the chain of custody.
  4. Investigate and analyze. Build a timeline by correlating timestamps across logs, endpoints, and network data. Map what you find to MITRE ATT&CK techniques, and work out the entry point, the systems reached, and the data accessed or taken.
  5. Contain and eradicate. Isolate affected systems, revoke compromised credentials, block attacker infrastructure, remove malware and persistence, and close the entry point.
  6. Recover. Restore from clean, verified backups, rebuild affected systems where needed, and monitor them to confirm the attacker is really gone.
  7. Learn. Hold a blameless review, write the report, update playbooks and detection rules, and fix the root cause rather than only the symptom.

Real cases show why the order matters. In September 2025, the FBI warned that criminal groups were stealing data from organizations' Salesforce environments, in some cases using stolen OAuth tokens from a third-party integration.

Investigating that kind of intrusion depends on identity provider logs and records of which applications had access to which accounts. That evidence is only useful if it was being kept, and exported before retention windows closed.

One practical rule runs through every step: collect the most volatile evidence first. Memory, running processes, and open network connections vanish when a machine reboots. Disk data lasts longer. Cloud and SaaS logs are time-sensitive too, because providers delete them after a set retention period.

What evidence do DFIR teams collect?

DFIR teams collect evidence from endpoints, memory, networks, cloud services, and email, then correlate it into a single timeline. No one source tells the whole story, so investigators gather several and check them against each other.

  • Disk and file system evidence: disk images, deleted files, file creation and change times, and operating system logs. On Windows, the registry and event logs show which programs ran, which accounts signed in, and which USB devices were connected.
  • Memory evidence: running processes, open connections, and encryption keys held in RAM. Some malware runs only in memory and leaves little or nothing on disk, so a memory capture can be the only record of it.
  • Network evidence: packet captures, flow records, and logs from firewalls, proxies, DNS servers, and VPNs. Even with encrypted traffic, the metadata shows which systems communicated and how much data moved.
  • Cloud and identity evidence: sign-ins, configuration changes, data access, and API calls from provider audit logs, plus identity provider logs that show authentication attempts and privilege changes.
  • Email evidence: message headers, mailbox audit logs, and forwarding rules. Headers record the servers a message passed through and the results of SPF, DKIM, and DMARC checks. Mailbox logs show who signed in and what they opened.
  • Mobile evidence: messages, call records, app data, photos, and location history from phones and tablets. Encryption is the main obstacle, and a locked, fully updated phone can be difficult to examine.

Every item gets the same treatment: a hash such as SHA-256 that proves the copy matches the original, a note of who collected it and when, and a record of everyone who handled it afterwards. That record is the chain of custody, and without it the evidence may be challenged in court or rejected by an insurer.

Chain of custody: every handover is recorded 1 Collect who, when, how, where 2 Hash it SHA-256 proves the copy is exact 3 Store safely original sealed, access logged 4 Analyze copies never work on the original 5 Document every handover, every access If a step is missing, the evidence can be challenged — however good the analysis is.
Chain of custody turns raw data into evidence a court, insurer, or regulator can trust. Illustration by Cysoro.

If you suspect a phone was involved, start with the signs rather than the device itself: unexpected logins, new forwarding rules, and apps you did not install. Our guide on how to know if your phone is hacked walks through what to check before you hand the device to anyone.

What tools do DFIR teams use?

No single tool covers DFIR. Teams combine detection, collection, and analysis tools, and the right mix depends on whether the environment is mostly endpoints, cloud, or a mix of both.

  • Velociraptor: an open-source endpoint tool for collecting artifacts and running hunts across many machines at once, often used for triage and large-scale evidence gathering.
  • Autopsy and The Sleuth Kit: open-source disk forensics tools for examining file systems, recovering deleted files, and building timelines from disk images.
  • Volatility: an open-source memory forensics framework for analyzing RAM captures, including running processes, loaded modules, and signs of injected code.
  • FTK and EnCase: commercial forensic suites used for disk imaging, evidence processing, and case management, commonly in law enforcement and enterprise investigations.
  • Wireshark: a network protocol analyzer for inspecting packet captures and understanding what systems communicated and what the traffic looked like.
  • Splunk and other SIEM platforms: tools that collect and correlate logs from across the environment, so analysts can search years of events and spot patterns no single log would show.

Detection and response platforms sit alongside these. Endpoint detection and response (EDR) watches endpoint behavior and can isolate a host, while extended detection and response (XDR) unifies signals across endpoints, email, identity, and cloud.

Tools alone do not make a DFIR capability. The team also needs logging turned on before the incident, retention long enough to cover the investigation, and people trained to use the tools under pressure.

What are the most common DFIR mistakes?

Most DFIR failures are not technical. They are decisions made in the first hour, when pressure is highest and evidence is most fragile. These are the ones that keep showing up in post-incident reviews.

  1. Rebooting or reimaging first. Shutting a machine down destroys memory evidence. CISA advises isolating affected systems immediately and powering them down only if you cannot disconnect them.
  2. Working on the original evidence. Every analysis step changes timestamps and metadata. Always image first, hash the image, and analyze the copy.
  3. No chain of custody. If nobody recorded who collected an image or who accessed it, the evidence is hard to defend later, even if the analysis is correct.
  4. Logging that was never turned on. The most common discovery in an investigation is that the logs needed to answer the key question were never collected, or were kept for only a few days.
  5. Declaring recovery too early. Restoring systems while persistence mechanisms remain means the incident never actually ended. Verify the attacker is gone before you call it done.
  6. Communicating on the compromised system. Email and chat on affected systems may be watched by the attacker. Use out-of-band channels, such as phone calls, for incident coordination.
  7. Skipping the lessons-learned review. Without a written review and fixes, the same entry point stays open and the next incident repeats the first.
Do not pay a ransom before you investigateCISA, the FBI, and other agencies do not recommend paying, because payment does not guarantee a working decryptor or erase stolen data. Get legal and law enforcement advice first, and check whether a decryptor already exists.

Business email compromise shows the cost of slow evidence work. The FBI's Internet Crime Complaint Center recorded more than $3 billion in reported business email compromise losses in its 2025 Internet Crime Report, and email investigations often turn on headers and mailbox logs that are only kept for a limited time.

When does a small business need DFIR vs MDR?

A small business usually needs both capabilities, but it should own only some of them. Managed detection and response (MDR) is an ongoing service that watches your systems around the clock, triages alerts, and contains threats quickly. DFIR is the deep investigation you call on when an incident needs proof, scope, and a defensible report.

Think of it this way: MDR is the team that spots the fire and holds it back. DFIR is the team that finds how the fire started, what it burned, and whether it is really out. Many MDR providers can do both, and many DFIR firms offer retainers that guarantee a response time when you call.

Call a DFIR firm or your retainer provider when you cannot preserve evidence forensically yourself, when regulated or customer data may have been taken, when an insurer, regulator, or lawyer is involved, or when the attack is still spreading and your team is out of its depth. Tell your insurer early, because many policies require prompt notice and may specify approved vendors.

For day-to-day protection, start with the basics that make both MDR and DFIR work: an incident response plan with named decision-makers, logging with useful retention, tested offline backups, and a contact list kept off company systems. Our small business cybersecurity checklist covers those controls alongside backups, updates, and device security.

You do not need a full-time DFIR team to be ready. You need a plan, a retainer or a provider you can call, and the discipline to isolate first and preserve evidence before you clean up.

How do you start a career in DFIR?

DFIR careers usually start in IT support, system administration, or a security operations center, then specialize into forensics or incident handling. Hands-on practice matters more than any single course, so labs, capture-the-flag challenges, and home investigations carry real weight.

Three GIAC certifications are the most commonly cited for this field, and SANS describes each one by the job it prepares you for. The GIAC Certified Incident Handler (GCIH) validates the ability to detect, respond to, and resolve computer security incidents. The GIAC Certified Forensic Examiner (GCFE) validates forensic analysis of Windows systems, including evidence acquisition, browser forensics, and tracking user and application activity.

The GIAC Certified Forensic Analyst (GCFA) is the advanced step: it covers formal incident investigations, including internal and external intrusions, data breaches, advanced persistent threats, and the anti-forensic techniques attackers use. A common path is GCFE first, then GCFA, with GCIH alongside them if your work leans more toward response than forensics.

Other routes exist, but the pattern is the same: learn operating systems and networking deeply, practice evidence handling until it is habit, and build a portfolio of investigations you can explain step by step. Clear writing matters too, because the report is often what leadership, lawyers, and regulators actually read.

How is DFIR different from a red team?

A red team attacks your systems on purpose, with permission, to test your defenses before a real attacker does. DFIR responds after a real attack, or a suspected one, to stop it and prove what happened. One simulates the adversary; the other deals with the real one.

The two sides still help each other. Red team findings show where detection is weak, which tells DFIR teams what evidence to look for. DFIR findings show which techniques real attackers used, which tells red teams what to simulate next. If you want the offensive side explained, read our guide to what a red team is.

The bottom line

DFIR is two disciplines working as one: forensics proves what happened, and incident response stops the harm and restores your systems. The habit that ties them together is simple — preserve evidence before you clean up, and write down everything you do.

Start before an incident: a short plan, logging with real retention, tested backups, and a provider you can call. Then check the surface attackers actually see, with Cysoro's attack surface management platform, so fewer incidents reach the DFIR stage at all.

Frequently asked questions

What does DFIR stand for?

DFIR stands for digital forensics and incident response. It is the combined discipline of investigating a security incident forensically while also containing the attack, removing the attacker, and restoring normal operations.

What is the difference between digital forensics and incident response?

Digital forensics investigates and proves what happened by collecting and analyzing evidence in a way that can support legal or regulatory action. Incident response focuses on stopping the harm, removing the attacker, and restoring systems. DFIR combines them so cleanup does not destroy evidence.

What are the four phases of NIST incident response?

The classic NIST SP 800-61 Rev. 2 lifecycle has four phases: preparation, detection and analysis, containment, eradication and recovery, and post-incident activity. Rev. 3, published in April 2025, maps that work onto the six functions of the NIST Cybersecurity Framework 2.0 instead.

What is SANS PICERL?

PICERL is the SANS incident-handling model with six steps: Preparation, Identification, Containment, Eradication, Recovery, and Lessons Learned. It covers the same work as the NIST lifecycle, split into more steps so a responder can follow it as a checklist during an incident.

What is chain of custody in digital forensics?

Chain of custody is the documented record of who collected each piece of evidence, when, how it was stored, and who handled it afterwards. It proves the evidence was not altered, which is what makes it usable in court, in an insurance claim, or in a regulatory audit.

Should you turn off a hacked computer?

Usually no. Disconnect it from the network instead. CISA advises powering a device down only if you cannot disconnect it, because shutting it down destroys evidence held in memory. Isolate first, capture memory and logs, then clean up.

When should a small business call a DFIR firm?

Call one when you cannot preserve evidence properly yourself, when regulated or customer data may have been taken, when an insurer or regulator is involved, or when the attack is still spreading. For everyday monitoring and fast containment, a managed detection and response service is often the better fit.

How long does a DFIR investigation take?

It depends on scope. A single compromised laptop can take days; a ransomware incident across a network can take weeks. The timeline grows with the number of systems, how long logs are kept, and whether data theft, legal action, or regulatory notification is involved.

Sources

  1. NIST — SP 800-61 Rev. 3, Incident Response Recommendations and Considerations for Cybersecurity Risk Management: A CSF 2.0 Community Profile
  2. NIST — SP 800-86, Guide to Integrating Forensic Techniques into Incident Response
  3. CISA — I have been hit by ransomware
  4. IBM — What is Digital Forensics and Incident Response (DFIR)?
  5. Wiz — What Is Digital Forensics and Incident Response (DFIR)?
  6. Magnet Forensics — What Is DFIR? Digital Forensics and Response
  7. Group-IB — DFIR: Meaning, What It Is and Role in Cybersecurity
  8. SANS Institute — What Cybersecurity Certification Do I Need?
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against NIST SP 800-61 Rev. 3 and SP 800-86, CISA ransomware response guidance, and SANS certification descriptions.

How we write and fact-check →

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free