An attachment travels a long way before it reaches your screen. It passes through your email provider’s servers, goes through automatic checks, is sometimes opened in a sealed room to see how it behaves, and once you download it, it meets the defences of the program that opens it and of your operating system. Almost all of this happens quietly.
Knowing how attachment scanning works is useful for two reasons: it helps you keep the protections you already have switched on, rather than turning them off for convenience, and it shows you where they stop. No automatic check is infallible, and there is always a final step that belongs to a person.
This post lays out the technologies involved, with their real advantages and limits, without pointing to any specific product. It is the technology side of the recommendation on not opening unknown attachments.
How to read this list
The technologies are organised into four functions, the same ones used in the post on what to do after opening a suspicious attachment:
- prevention — stopping a harmful file from arriving or from being able to act;
- detection — noticing that a file is not what it seems;
- response — containing the problem and putting things right;
- governance — keeping things in order over time, especially when there is more than one device or person involved.
For each one you’ll find the risk it reduces, its advantages, its honest limits, and how complex it is to use.
One idea runs through the whole list: these defences work in layers. Each one stops a share of harmful files; it is the sum of the layers, not any single check, that makes it unlikely for a malicious attachment to get all the way through.
1. Prevention technologies
Email provider filters
The checks your email service runs on every attachment before delivering it to your inbox.
- Risk reduced: attachments carrying known malicious software, dangerous file formats, messages from senders with a poor reputation.
- Advantages: they work on every message without your having to turn them on; they compare the file with the signatures of known malware (a signature is the fingerprint that identifies a harmful program that has already been seen); many services reject executable files — programs that start with a double click — even inside a compressed archive; they learn from users’ reports.
- Limits: they are better at recognising what has already been seen; a password-protected archive cannot be inspected; if the “attachment” is really a link to a file stored elsewhere, there is nothing in the message to analyse; a message sent from the hacked account of someone you know inherits that person’s good reputation.
- Example: a fake invoice in executable format never reaches your inbox: the service blocks it.
- Complexity: basic (it’s already on).
Analysis in an isolated environment (sandbox)
A sandbox is a disposable computer, cut off from everything else, in which the file is opened so that its behaviour can be watched. If it tries to download something else or change the system, it is stopped before it ever reaches you.
- Risk reduced: new malicious files that don’t yet have a known signature.
- Advantages: it judges the file by what it does, not by what it looks like; it can catch threats nobody has seen before; if something goes wrong, it happens in an environment that is then wiped.
- Limits: some files can tell they are being watched and stay dormant; the analysis can delay delivery by a few minutes; it is more common in business email services than in personal accounts.
- Example: a harmless-looking document, opened in the sandbox, tries to download a program; the service holds it back and shows you a warning in place of the attachment.
- Complexity: basic for the recipient, advanced for whoever runs it.
Protected view for documents
A mode in which office programs open files that came from the internet or by email as read-only, with many features switched off. A bar at the top tells you the document comes from an outside source.
- Risk reduced: documents that exploit active features or flaws in the program to run code.
- Advantages: you can read the content without giving it the chance to act; it is on by default in recent versions of the main office programs.
- Limits: one click on “enable editing” is enough to leave it, and harmful documents are written precisely to persuade you to click; it relies on an invisible label that the system attaches to files arriving from outside, and some steps, such as extracting files from certain archives, can strip that label away.
- Example: you read a quote received by email in protected view and, if you don’t need to edit it, you never leave that mode.
- Complexity: basic.
Macros disabled by default
Macros are small programs embedded in documents and spreadsheets to automate repetitive tasks. Useful at work, they were for years one of the most common ways of hiding malicious code inside an ordinary-looking file.
- Risk reduced: documents that, once opened, launch harmful software through macros.
- Advantages: recent versions of the main office programs block macros in files that arrived from the internet; if you don’t use macros, you lose nothing.
- Limits: in older versions the block may be reduced to a simple confirmation prompt, and the document contains convincing instructions to make you say yes; at work, someone may have relaxed the setting so that an old template keeps working.
- Example: a “delivery note” spreadsheet asks you to enable macros to see the data; the program keeps them blocked.
- Complexity: basic.
Browser preview
Many webmail services let you view an attachment as a preview inside the page, without downloading it to your device.
- Risk reduced: active content running on your computer or phone.
- Advantages: the document is shown in converted form, so macros don’t run and the file never lands on your device; it is the simplest way to look at a file you are unsure about.
- Limits: not every format can be previewed; links and QR codes are still visible and can lead to fake pages; once you download the file, you are back to relying on the other defences.
- Example: you preview an unexpected PDF, see that it is a generic payment reminder with a link, and delete it without ever downloading it.
- Complexity: basic.
2. Detection technologies
Built-in system protection
The security software that modern operating systems already include: it checks files when they are downloaded, opened, or run.
- Risk reduced: harmful files that slipped past the email filters.
- Advantages: it is free and on by default; as well as signatures, it watches for suspicious behaviour, such as a program changing lots of files in a few seconds; it updates itself.
- Limits: it is better at recognising what is already known; it only works if it stays switched on and up to date; it should not be confused with scareware, the fake virus warnings that appear on web pages: genuine alerts come from the system, not from a web page asking you to call a number.
- Example: you download an attachment and, before you open it, the system flags it and isolates it.
- Complexity: basic.
Visible file extensions
The extension is the last part of a file’s name, after the dot, and it tells you what type of file it is. Many systems hide it by default; you can make it visible in the file display options.
- Risk reduced: disguised files, such as a program called “invoice.pdf.exe” which, with extensions hidden, appears as “invoice.pdf”.
- Advantages: you switch it on once, in a few seconds; it exposes a disguise you would otherwise miss.
- Limits: the file’s icon can still be misleading; you need to know which extensions belong to programs; on a phone, full file names are less visible.
- Example: in your downloads folder you notice a “CV.docx.js”: the full name tells you it isn’t a document.
- Complexity: basic.
Email service warnings
The banners your email service displays above a message: “external sender”, “this attachment could not be scanned”, “similar to messages reported as phishing”.
- Risk reduced: automatic trust in messages that imitate a known contact.
- Advantages: they appear at the very moment you make the decision; they also flag files the filter was unable to open.
- Limits: the absence of a warning does not mean the attachment is safe; as with emails pretending to be your bank, graphics and logos prove nothing.
- Complexity: basic.
3. Response technologies
Quarantine and full scan
Quarantine is an isolated area where the system’s protection moves a suspicious file: it isn’t deleted straight away, but it can no longer act. A full scan checks the whole device, not just the file you have just opened.
- Risk reduced: harmful software that remains active or has copied itself elsewhere.
- Advantages: quarantine kicks in on its own; a full scan can be started in a few clicks.
- Limits: a clean scan reduces doubt but doesn’t remove it; it takes time and slows the device down while it runs.
- Complexity: basic.
Reporting the message
The “report phishing” or “report spam” button in your email service.
- Risk reduced: the same attachment reaching other people.
- Advantages: it removes the message from your inbox and helps the filter recognise similar ones, including in other people’s inboxes.
- Limits: it doesn’t undo what has already happened if the file was opened; if the sender is a real contact whose account has been hacked, it’s worth warning them through another channel too, as explained in messages sent in your name.
- Complexity: basic.
Restoring files
Backups and the “previous versions” of files that many cloud services and operating systems keep automatically.
- Risk reduced: losing documents and photos for good after an infection, for example by ransomware — software that makes your files unreadable and demands a ransom.
- Advantages: it turns the incident into a question of time rather than loss.
- Limits: it has to be set up beforehand; a backup that is always connected to the device can be hit along with the originals. The topic has its own recommendation: backing up photos and videos.
- Complexity: basic for automatic versions, intermediate for a complete backup plan.
4. Governance technologies
These become relevant when the devices aren’t only yours: a family, a professional practice, a charity, a small office.

Cyber Security for All: Online Security, Passwords
On the page that opens, choose:
- The best available terms
- Valid until 25 November, for a limited number of enrolments
- Lifetime access to the content, updates included
Automatic updates
Some harmful documents exploit a flaw in the program that opens them; updates close those flaws.
- Risk reduced: files built to exploit vulnerabilities that are already known and already fixed.
- Advantages: they make many of the malicious attachments in circulation useless; they also refresh the signatures used by the built-in protection.
- Limits: they don’t cover flaws that are still unknown; a device neglected for a long time falls behind. The principle is the one behind keeping your software up to date.
- Complexity: basic.
Simple agreements on how documents circulate: a shared folder instead of attachments, no password-protected archives accepted by email, a phone call to check any unusual request.
- Risk reduced: unexpected attachments accepted because they “look like work”.
- Advantages: anything outside the rule becomes easy to spot; nobody has to decide alone.
- Limits: a rule nobody remembers protects no one; rules that are too rigid push people to work around them.
- Complexity: intermediate.
Training and awareness
Learning paths that explain the why, not just the how.
- Risk reduced: the final click, the one no filter can prevent.
- Advantages: it’s what makes behaviour last over time; it’s the pillar on which the Cyber Welfare Framework rests.
- Limits: it requires continuity; a one-off session has a short-lived effect.
- Complexity: basic.
Comparison table
| Function | Technology | Risk reduced | Main advantage | Main limit | Complexity |
|---|---|---|---|---|---|
| Prevention | Email provider filters | Known malware, dangerous formats | Always on, for every message | Can’t read protected archives | Basic |
| Prevention | Sandbox | New malware | Judges the file by what it does | Some files stay dormant during the test | Basic / Advanced |
| Prevention | Protected view | Documents that run code | Read without letting it act | One click to leave it | Basic |
| Prevention | Macros disabled | Code hidden in documents | Blocked by default | Convincing requests to enable them | Basic |
| Prevention | Browser preview | Code running on the device | The file never reaches the device | Links and QR codes still visible | Basic |
| Detection | Built-in protection | Files that slip past filters | Free, watches behaviour | Better at the known | Basic |
| Detection | Visible extensions | Disguised files | Switched on once | Icons can still mislead | Basic |
| Detection | Email warnings | Automatic trust | Arrive at the right moment | Silence is no guarantee | Basic |
| Response | Quarantine and scan | Malware still active | Acts on its own | A clean result is no guarantee | Basic |
| Response | Reporting | Spreading to others | Protects other people too | Doesn’t undo what happened | Basic |
| Response | Restoring files | Losing files for good | The incident becomes recoverable | Must be set up beforehand | Basic / Intermediate |
| Governance | Automatic updates | Known vulnerabilities | Make many attachments useless | Don’t cover the unknown | Basic |
| Governance | File-exchange rules | Fake “work” attachments | Make anomalies visible | Must be remembered | Intermediate |
| Governance | Training | The final click | Makes behaviour last | Needs continuity | Basic |
How to choose
If you’re an individual. Almost everything is already on: your job is not to switch it off. Make file extensions visible, leave macros blocked, use the preview for files you weren’t expecting, and keep your system and programs up to date.
If you’re a professional. Add previous file versions in the cloud service you use for work, an account without administrator rights (one that can’t install programs) for everyday use, and the habit of staying in protected view unless you need to edit the document. For documents from suppliers, a check through a channel you already know is worth more than any filter.
If you manage a group or a small office. Check that the email service everyone uses scans attachments, ideally in a sandbox too; agree on how files circulate; keep macros blocked and automatic updates on across all devices; and add short, recurring training.
A rule of thumb. No filter is infallible. The combination that gives the best result for the effort involved is protections left on + visible extensions + preview before downloading. But if an unexpected attachment gets through every layer, the last line of defence is still the question “who is sending me this, and why?”.
How this connects to the Cyber Welfare Framework
| Pillar | What this content contributes |
|---|---|
| Skills | Knowing what filters, sandboxes and the system actually check, and which settings to leave on |
| Awareness | Recognising that every automatic check has a blind spot, and that the absence of a warning is not a guarantee |
| Secure Behaviour | Not stepping outside the protections for convenience: no “enable content” on a file you weren’t expecting |
Reference level: FL3 — Autonomous. This is the level at which you understand a tool well enough to set it up without help and to read the signals it gives you correctly.
Conclusion
Attachment checks are among the quietest work in digital security: a large share of harmful files is stopped long before it reaches you. Your part is small but decisive: leave the defences on, and don’t override them when a document asks you to. If you’d like to know where to start, the digital resilience self-assessment gives you a reference point.
What to do next. Today, make file extensions visible on the computer you use most, and check that your system’s built-in protection is on and up to date.
Related content
- Not opening unknown attachments — the recommendation this belongs to
- What to do after opening a suspicious attachment — how to use these technologies when something has already happened
- Malware in email attachments — the techniques these checks are designed against
- Signs of a dangerous attachment — what to look for when technology isn’t enough
Related resources
Short pieces from the Resources section, for anyone who wants to focus on a single aspect:
- How to Recognise Phishing When It Is Built to Be Convincing
- Scareware: The Warning That Is Itself the Attack
Start with the first step: the Cyber Welfare Programme guides you free of charge, one recommendation at a time.




