Join our Newsletter — 33% off our NHI Course
Home› Guides› Attachment Sandboxing vs CDR: detect the threat or…
Guide Email & Communications Security

Attachment Sandboxing vs CDR: detect the threat or sanitise the file

PDF for newsletter subscribers · free to read online

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

Attachment sandboxing decides whether a file is malicious by running it and watching what happens, while content disarm and reconstruction (CDR) skips the verdict and rebuilds the file without anything that could carry an attack, and the two fail in opposite ways. A sandbox can miss malware that recognises it is being watched, and it adds delivery delay; CDR can break documents users rely on, and it has nothing to say about a file it cannot parse. This guide compares the two as controls on the email attachment path: the threat each addresses, how each works, where each fails, what each costs in latency and usability, and how to combine them. It is written for email security owners, security architects and SOC leads choosing or tuning attachment controls. Where products are named as examples, platforms are listed alphabetically; the order is not a ranking.

Key takeaways

  • Verdict versus transformation: sandboxing produces a judgement (malicious, suspicious, clean) and blocks on it; CDR produces a new file and delivers that, whatever the original intended.
  • Evasion hits sandboxes, fidelity hits CDR: malware that checks for virtual machines, waits out the analysis window or needs user interaction can pass a sandbox; CDR is indifferent to evasion but can strip macros, links and signatures that business processes depend on.
  • Latency is a design choice: sandbox detonation typically delays delivery by minutes, which pushes teams towards preview or deliver then retract modes; CDR adds seconds per file but must be scaled for volume.
  • Neither handles encrypted files well: password protected archives defeat both unless the platform can obtain the password, so a policy for files that cannot be inspected or rebuilt matters as much as the engine.
  • Layer them by file type and risk: rebuild the formats CDR handles well for high risk groups, detonate the rest, and keep the threat intelligence a sandbox produces flowing to the SOC.

The short answer

Choose sandboxing when you need detection and intelligence: a verdict, indicators, behaviour for hunting, and automatic blocking of repeat copies. Choose CDR when you need prevention that does not depend on recognising the threat, and when your users mainly need the content of documents rather than their active features. Most mature email estates use both: CDR or strict format controls for the bulk of Office and PDF attachments to exposed groups, sandbox detonation for executables, scripts and files CDR cannot rebuild, and the sandbox's verdicts feeding detection. The overview of each tool lives elsewhere: see the Malware Sandbox Guide for sandbox operation and the Content Disarm and Reconstruction buyer's guide for evaluating CDR products. This page covers only the choice between them on the attachment path.

Side by side

DimensionAttachment sandboxingContent disarm and reconstruction
Core questionIs this file malicious?What safe version of this file can we deliver?
MethodOpen or execute the file in an instrumented virtual environment and score its behaviourParse the file against its format specification, discard non-conforming and active parts, rebuild a new file
MITRE D3FENDD3-DA Dynamic AnalysisD3-CNR Content Rebuild
Unknown threatsCaught only if behaviour is observed and scored as maliciousNeutralised if carried in parts the rebuild removes, regardless of novelty
Typical latencyMinutes per file (vendor documented figures range from a few minutes to around 15)Seconds per file, scaling with size and nesting
Output for the SOCVerdict, behaviour report, indicators, hashes; automatic blocking of repeatsLog of what was removed; little threat intelligence
User impactDelay, or placeholders and previews while scanningChanged files: macros, embedded objects or links removed; originals held for release
Main failure modeEvasion and analysis timeoutsUnsupported formats passed or blocked; broken business features
Encrypted attachmentsOpened only if the password is found or suppliedCannot be rebuilt without decryption

Sandboxing in depth: threat model, architecture and failure modes

Threat model

Sandboxing targets malicious attachments delivered by MITRE ATT&CK T1566.001 Spearphishing Attachment that rely on the user opening them, T1204.002 Malicious File: Office documents with macros or exploits, PDFs, scripts, shortcut files, disk images and executables inside archives. Its strength is detecting novel payloads that signature engines miss, by observing behaviour: process creation, network connections, file drops and registry changes. D3FEND defines Dynamic Analysis as executing or opening a file in a synthetic "sandbox" environment to determine whether it is malicious or exploits another program such as a document reader. NIST SP 800-53 Rev. 5 names the control SC-44 Detonation Chambers.

Architecture in words

Attachments first pass signature and reputation checks. Files that are not already known pass to a pool of virtual machines with representative operating systems and applications. Each file is opened, sometimes with simulated user activity, for a fixed analysis window; the engine scores observed behaviour and returns a verdict. The mail flow then holds, releases or quarantines the message. Good platforms also extract nested files from archives, identify the true file type rather than trusting the extension, and push hashes of malicious files to block future copies.

Failure modes

  • Environment checks: ATT&CK T1497 Virtualization/Sandbox Evasion covers malware that looks for virtualisation artefacts or analysis tools (T1497.001 System Checks), for signs of real user activity (T1497.002 User Activity Based Checks), or that sleeps to outlast the analysis window (T1497.003 Time Based Checks). MITRE notes the technique is hard to mitigate with preventive controls. See T1497 Virtualization/Sandbox Evasion.
  • Staged delivery: the attachment is a clean lure that links to, or later downloads, the real payload, so the file itself behaves benignly in the analysis window.
  • Encrypted archives: MITRE's T1566.001 entry records many groups sending password protected ZIP or RAR archives with the password in the email body, to get past boundary inspection.
  • Smuggled content: HTML attachments that assemble a payload in the browser can behave innocuously inside a mail sandbox. See the HTML Smuggling Guide.
  • Delay driven bypass: users and executives complain about held mail, and exceptions grow until high risk groups are excluded.

CDR in depth: threat model, architecture and failure modes

Threat model

CDR assumes every incoming file may be hostile and removes the places an attack can hide rather than looking for the attack. It addresses the same T1566.001 and T1204.002 delivery path, plus macro based persistence (T1137 Office Application Startup) and exploits aimed at parsers in document readers. D3FEND defines Content Rebuild (D3-CNR) as rebuilding the file according to the specification so any unreferenced components or objects are removed, with Content Reconstruction as a synonym. Because it does not rely on recognition, CDR is unaffected by sandbox evasion and is useful against zero day document exploits.

Architecture in words

The engine identifies the true file type, parses the file into its components, keeps only components that conform to the format and to policy (text, images, tables, approved features), and writes a fresh file. Active content (macros, scripts, embedded objects, external links, form actions, hidden data) is removed or converted according to policy, and some deployments flatten high risk documents into a simpler format such as an image based PDF. The original is usually held in secure storage for release on request. The NCSC pattern for safely importing data describes the stronger form of this design: transformation on the untrusted side, a separate and simpler verification engine on the trusted side doing syntactic and semantic checks, and a protocol break. It explains that complex formats such as PDF and Word have a large attack surface, so transforming into a simple format lets the verifier be strict, and it states that the pattern is not a guarantee of safety.

Failure modes

  • Format coverage gaps: files the engine cannot rebuild (unusual formats, CAD files, nested archives beyond the depth limit) must be blocked, quarantined or passed, and "passed" quietly reopens the door.
  • Broken business processes: finance workbooks lose macros, contracts lose digital signatures, forms lose fields; users then ask senders for links to file sharing services that bypass the control entirely.
  • Release abuse: if any user can release the original without checks, attackers simply write "click to request the original" in the lure.
  • Parser exposure: the CDR engine parses hostile files itself; NCSC assumes the transformation engine may be compromised and recommends monitoring it for unexpected outbound connections, crashes or calls to unfamiliar binaries.
  • Link blindness: CDR can neutralise links but does not judge the destination; URL rewriting and time of click checks remain separate controls.

Latency, evasion and usability compared

ConcernSandboxing responseCDR response
Delivery delayHold mail, or deliver with placeholders or safe previews until the verdict arrivesInline rebuild in seconds; size and nesting drive the tail
Novel malwareDetected if behaviour is observedNeutralised if it lives in removed components
Anti-analysis malwareMain weakness (T1497)Not relevant
Macros needed by the businessDelivered if judged cleanRemoved unless policy allows a trusted sender or signed macro path
Password protected archivesPassword discovery from the message body, or block or quarantineBlock, quarantine or release workflow
Threat intelligenceRich: indicators, families, behaviourMinimal
Operating cost driverDetonation capacity and analyst review of suspicious verdictsRelease requests and helpdesk tickets about changed files

What major cloud email platforms document

Both major cloud email platforms document a native attachment sandbox, which shapes the decision because many organisations already hold a detonation capability. Platforms are listed alphabetically.

Google Workspace: Gmail Security Sandbox scans attachments, including files inside ZIP and RAR archives, in a virtual environment. Google documents a delivery delay of up to 3 minutes and lists executables, Office files and PDFs as supported types. Turn it on in the Admin console under Apps, Google Workspace, Gmail, Spam, Phishing and Malware, either with "Enable virtual execution of attachments in a sandbox environment" for all attachments or with Security sandbox rules to target senders, recipients or content (off by default). Messages with harmful attachments go to spam unless a content compliance rule quarantines them. Availability: Google lists Frontline Plus, Business Standard and Plus, and Enterprise Standard and Plus editions.

Microsoft 365: Safe Attachments in Defender for Office 365 detonates attachments in a virtual environment after anti-malware scanning, with scanning that Microsoft says typically completes within 15 minutes. The unknown malware response can be Off, Monitor, Block (the default and the value in the Standard and Strict presets) or Dynamic Delivery, which delivers the message immediately with placeholders and lets most PDF and Office files be previewed in safe mode while scanning runs. The Built-in protection preset covers recipients not in other policies. Files are identified by true type, and password protected attachments are evaluated. Availability: Microsoft documents the feature under Defender for Office 365 Plan 1 and Plan 2; Dynamic Delivery applies to Exchange Online mailboxes.

As of November 2026 both pages describe detonation; organisations that want file rebuilding typically add CDR through their email security layer or a gateway. See ICES vs Secure Email Gateway for where those layers sit.

Worked scenario: a law firm with high risk inboxes

A 900 person law firm receives around 40,000 external attachments a week, about 70% PDF and Office files. Its cloud email sandbox is on in Block mode, and partners complain about held mail during deal closings. Figures are illustrative.

  1. Measure first: a month of logs shows median sandbox delay of four minutes, a 0.3% suspicious rate, and 2% of attachments are password protected archives, mostly from clients sending court bundles.
  2. Segment by group: the finance, conveyancing and executive assistant groups receive the most invoice and payment themed lures. For these, PDF and Office attachments go through CDR with macros stripped and documents rebuilt, delivered within seconds; originals are held for 30 days and releasable by the security team after a sandbox scan.
  3. Keep detonation for the rest: executables, scripts, disk images and anything CDR cannot rebuild are detonated; the firm switches to a preview mode for Office and PDF in other groups to remove the complaint about delays.
  4. Encrypted archive policy: archives with a password in the body are opened and scanned where the platform can; otherwise they are quarantined and clients are moved to the firm's managed file transfer portal, which applies CDR on upload.
  5. Result after a quarter: hold time complaints stop, release requests settle at about 25 a week (mostly signed PDFs), and sandbox verdicts continue to feed hunting rules in the SIEM.

Decision criteria

SituationLean towardsWhy
Need indicators and behaviour for hunting and blocking repeatsSandboxingOnly detonation produces threat intelligence
Targeted users who receive documents from strangers all day (finance, HR recruiting, legal intake)CDR on documents, plus sandbox for the restRemoves the attack surface without waiting for a verdict
Users depend on macros, signatures or form fieldsSandboxing, with CDR exceptions by trusted senderCDR would break the workflow
Files cross between networks of different trustCDR with verification, per the NCSC patternTransformation and verification give stronger assurance than detection
Delivery delay is unacceptableCDR, or sandbox in preview or deliver then retract modeAvoids holding mail for minutes
Small organisation on a cloud email suiteNative sandbox plus macro blockingOften sufficient before buying CDR. See the Office Macro Blocking Guide

Implementation sequence

  1. Profile your attachment mix: a month of file types, sizes, archive depth, encrypted share and sender categories per user group.
  2. Block what nobody needs: following ATT&CK M1021 Restrict Web-Based Content, reject unused executable and script types (.exe, .scr, .pif, .cpl and similar) outright; this shrinks both sandbox load and CDR scope.
  3. Run the sandbox in monitor or preview mode for a pilot group: measure delay and verdict rates before enforcing.
  4. Pilot CDR on one high risk group in report mode where available: compare rebuilt files with originals on real samples and log every lost feature.
  5. Write the exception and release policy: who can release originals, after what checks, how it is logged, and retention for held originals.
  6. Set the encrypted file policy: attempt password discovery, then quarantine or redirect senders to a managed upload channel.
  7. Enforce in rings: high risk groups first, then all users. Roll back by switching CDR policy to pass with logging or the sandbox to monitor mode for an affected group, not by turning protection off globally.

Detection and measurement

  • Delivery delay: median and 95th percentile time from receipt to delivery by control path.
  • Sandbox outcomes: malicious and suspicious verdict rates, timeouts and analysis errors (a rising timeout rate can indicate evasion).
  • Uninspectable files: share of attachments that are encrypted, unsupported or exceed size limits, and what happened to them.
  • CDR release rate: release requests per thousand rebuilt files and the share released without a further scan.
  • Post delivery detections: malicious attachments found after delivery by endpoint detection or retroactive removal, by path; this is the closest measure of misses.
  • Engine health: crashes, unexpected outbound connections and verification failures on CDR and sandbox hosts, which NCSC says should be treated as alerts.

Framework mapping

FrameworkReferenceSandboxingCDR
NIST SP 800-53 Rev. 5SC-44 Detonation ChambersDirectNot applicable
NIST SP 800-53 Rev. 5SI-3 Malicious Code ProtectionDirectDirect, prevention without signatures
NIST SP 800-53 Rev. 5SI-10 Information Input Validation, SC-18 Mobile CodeIndirectDirect: strict format validation and active content removal
NIST CSF 2.0DE.CM-09, PR.PS-01Monitoring of file behaviourConfiguration of allowed content
MITRE D3FENDD3-DA, D3-CNR, D3-CQD3-DA Dynamic AnalysisD3-CNR Content Rebuild; D3-CQ Content Quarantine for files that fail
MITRE ATT&CK mitigationsM1049, M1031, M1021M1049 Antivirus/AntimalwareM1031 tools that strip malicious attachments; M1021 type blocking
MITRE ATT&CK techniquesT1566.001, T1204.002, T1137, T1497Counters T1566.001 and T1204.002; weak against T1497Counters T1566.001, T1204.002 and T1137; unaffected by T1497

Common failure patterns

  • Exempting executives from the sandbox to avoid delay: the most targeted inboxes get the least protection; use preview or CDR paths instead of exemptions.
  • Passing unsupported files through CDR silently: attackers move to the formats the engine skips. Make the default for unrebuildable files block or quarantine.
  • Self service release of originals: the lure tells the user to request the original, and the control becomes one extra click.
  • Treating encrypted archives as clean: password in the body is a long established technique documented in ATT&CK; quarantine or redirect.
  • Ignoring sandbox output: verdicts and indicators never reach the SIEM, so the intelligence value of detonation is lost. See the Email Security Guide for the wider pipeline.

Practitioner checklist

  • Profile attachment types, sizes, archive depth and encrypted share per user group.
  • Block unused executable and script attachment types before tuning either engine.
  • Confirm which native sandbox your email platform offers, its mode and its documented delay.
  • Pilot CDR on high risk groups and record every lost feature on real files.
  • Define a default for files that cannot be detonated or rebuilt: block or quarantine, never silent pass.
  • Restrict release of originals to analysts, with a scan before release and a logged reason.
  • Send sandbox verdicts, indicators and CDR removal logs to the SIEM.
  • Monitor engine hosts for crashes and unexpected outbound connections.
  • Review delay, release and post delivery detection metrics monthly.

Standards and references

Related NHI Mgmt Group resources: Malware Sandbox Guide, Content Disarm and Reconstruction, Malware Sandboxes, Email Security Buyer's 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 14 November 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.