Malicious attachments

A malicious email attachment is a file sent to make the reader run harmful code or hand over a sign-in. Some files carry the code themselves, such as programs, scripts and documents with macros. Others merely lead to it, such as a PDF with a link, an HTML page or an archive that hides the real file.

Updated

How a malicious attachment works

A malicious attachment works by getting the reader to take two steps: open the file, then do what the file asks.

  1. The attacker picks a kind of file the target opens every day: an invoice, a resume, a shipping notice.
  2. The attacker builds the file. It contains code, or it is a harmless-looking container that leads to the next step.
  3. The message gives a reason to open it, and often a reason to hurry.
  4. The reader opens the file. A program runs at once. A document asks the reader to enable content. A PDF shows a button.
  5. The reader takes the second step. Code installs itself, or the page behind the button collects a sign-in.

What a malicious attachment looks like

A malicious attachment looks like routine paperwork. Its name matches the story in the message, for example Northwind-Invoice-4471.zip on a note about an overdue invoice. What matters is the kind of file.

CarrierHow it causes harm
Programs and scriptsRun as soon as they are opened.
Office documents with macrosCarry code that runs if the reader enables it.
Archives such as zip filesHide the real file from scanners, more so when locked with a password.
Disk imagesOpen like a folder and present a program inside.
HTML filesOpen a sign-in form in the browser, from the reader's own computer.
PDF filesCarry links, buttons and sometimes scripts. Most harmful PDFs lead somewhere else.

So a PDF is not a guarantee. A PDF is safer than a program, and it can still hold a link to a fake sign-in page, a QR code, or text written for an AI reader. A file can also be a program named as a document.

Signs of a malicious attachment

The signs of a malicious attachment are about context: who sent the file, and what it asks for once open.

SignWhat it means
You were not expecting a file from this senderThe most reliable sign. Check with the sender on another channel.
The file asks you to enable editing, content or macrosThe document can do nothing until you agree. Do not.
An archive arrives with its password in the messageThe password keeps scanners out, not strangers.
Opening it shows a sign-in pageA document does not need your password to be read.

Why malicious attachments get through ordinary filtering

Malicious attachments get through because many of them contain nothing a scanner can call malware. A PDF with a link is a valid PDF, and a file built this morning matches no known sample. A filter cannot open an encrypted archive without the password.

Attackers also change carrier when one is closed. Microsoft now blocks macros in Office files from the internet by default, which makes archives, disk images and HTML files more attractive. Gmail and Outlook scan attachments for malware before delivery and refuse many program types.

When an AI agent reads the mail

An AI agent reads all of every file, which changes what a malicious attachment is. An agent does not double-click a program, so malware that needs a desktop often has nothing to run on. The text inside a document is another matter.

A model reads every word in a PDF or a spreadsheet, including words a human cannot see. An instruction placed there is addressed to the agent. See hidden instructions in attachments.

An agent can also pass a file on. Forwarded to a human with a tidy summary, the file arrives with the agent's endorsement.

How to stop malicious attachments

Malicious attachments are stopped by deciding which kinds of file may arrive at all, then reading what is inside before anyone opens it.

General controls

  • Block program file types and mislabeled files at the mail gateway, and block macros by default. Both are in the phishing guidance from CISA, the NSA, the FBI and MS-ISAC.
  • Check with the sender on another channel before opening a file you did not expect.
  • Keep document readers updated, and do not give an agent that reads outside mail a tool that runs files.

At the door, with a pre-delivery inbox

A pre-delivery inbox judges a file while the sending server is still connected. In Trotta Mail, a program under a document's name is refused at that point and never arrives. Other programs and disk images are held for a human.

Text is read from PDF, Word, Excel, PowerPoint and OpenDocument files on arrival, text formatted to be invisible included. An instruction aimed at an AI inside a document holds the message for an agent's inbox and is left out of the safe text. See files.

In the hiring use case, a resume that can run macros is delivered with the caution attached. No filter catches everything. A file that is merely persuasive can still be delivered, so checking with the sender stays part of the job.

Questions

Can a PDF contain a virus?

A PDF can carry scripts and links, and a flaw in an outdated reader can be abused. Most harmful PDFs do something simpler: they show a button or a link that leads to a fake sign-in page.

Is it safe to open an attachment from someone I know?

It is safe if you expected it. A known sender's account can be taken over, and a sender's name can be forged. CISA advises checking unexpected attachments with the sender before opening them.

Why do attackers send password-protected zip files?

A scanner cannot look inside an encrypted archive without the password. Putting the password in the message keeps the file readable for the target and closed to the filter.

Sources

Every check is on, on every plan. Free for two inboxes. No card.