# Disguised programs: the invoice.pdf.exe trick explained

> A disguised program is an executable named to look like a document, such as invoice.pdf.exe. How double extensions work, the signs, and what stops them.

Source: https://trotta.email/threats/disguised-programs

A disguised program is a program named and dressed to look like a document. The classic form is a double extension such as invoice.pdf.exe, often with a document's icon. The last extension decides what the file does, so opening it runs the program. The trick works because Windows hides known extensions by default.

Updated November 20, 2026

## How a disguised program works

A disguised program works by showing the reader one file type and the computer another.

1. The attacker builds a program, the kind of file an operating system runs.
2. The attacker names it like a document and leaves the real extension at the end: `Invoice.pdf.exe`. The first extension is for the reader. The last is for the computer.
3. The attacker gives the file a document's icon. A program can carry any icon its author chooses.
4. The file is attached to a message that makes a document expected: an invoice, a receipt, a resume.
5. On a system that hides known extensions, the reader sees `Invoice.pdf` beside a PDF icon.
6. The reader opens it. A decoy document appears, or nothing does, and the program is already running.

Variants hide the ending in other ways: a long run of spaces before it, a less familiar program extension such as `.scr`, or a right-to-left control character that makes a name display in a different order than it is stored.

## What a disguised program looks like

A disguised program looks like the document the message promised. The same attachment reads differently once extensions are shown.

One attachment, seen three ways:

```text
Extensions hidden:  Northwind-Invoice-4471.pdf
Extensions shown:   Northwind-Invoice-4471.pdf.exe
Type column:        Application
```

## Signs of a disguised program

The signs of a disguised program come from what the system reports about the file, not from its name or picture.

| Sign | What it means |
| --- | --- |
| Two extensions, the last one a program type | The last one is the truth. `.exe`, `.scr`, `.pif` and `.cpl` are not documents. |
| A document icon, and a type column that says Application | The sender chose the icon. The system reports the type. |
| A long gap in the file name, or a name cut short | The real ending may be pushed out of view. |
| The document arrives inside an archive or a disk image | The wrapper keeps a mail filter from seeing the name. |
| Nothing opens when you double-click | A program ran. Disconnect and tell whoever handles security. |

## Why disguised programs get through

Disguised programs get through ordinary filtering less often than they once did, because Gmail and Outlook refuse the obvious program types as attachments. They still arrive inside archives and disk images, behind a download link, or through a filter that trusts the name.

Disguised programs get past the reader because the check is visual and takes a second. A hurried reader matches the sender, the subject and the icon, and the attacker chose all three. The one honest signal, the last extension, is hidden by default on Windows.

That moment of trust is common. The Verizon 2026 Data Breach Investigations Report found the human element present in 62% of breaches.

## When an AI agent reads the mail

An AI agent is not fooled by an icon, because it never sees one. An agent reads the full file name as text, last extension included. That does not end the risk.

An agent often does not weigh what an extension means for the human who opens the file next. Asked to file the invoice, it may save `Invoice.pdf.exe` to a shared folder, or forward it with a note that the invoice is attached. The program now arrives from a trusted colleague.

An attachment's file name is also text the sender chose, so it can carry an instruction aimed at the model.

## How to stop disguised programs

Disguised programs are stopped by judging a file by what it is, not by what it is called, and by not letting a program arrive as mail.

### General controls

- Turn off the Windows setting that hides extensions for known file types. MITRE ATT&CK lists this as a mitigation for double extensions.
- Block program extensions and mislabeled files at the mail gateway, as the phishing guidance from CISA, the NSA, the FBI and MS-ISAC recommends.
- Teach one habit: read the last extension before opening anything that came by mail.
- Tell agents not to forward, save or run an attachment whose name ends in a program type.

### At the door, with a pre-delivery inbox

A pre-delivery inbox can refuse the file before the message is accepted. In Trotta Mail, a program under a document's name, such as `invoice.pdf.exe` or a Windows, Mac or Linux program named `.pdf`, is refused while the sending server is still connected and never arrives.

The sender gets an error. A copy waits in Blocked for a human to check, in case it was a mistake. The same file is refused on the way out, whoever sends it.

Other programs and disk images are held for a human on the way in, and held when an agent sends one. The [bookings use case](https://trotta.email/use-cases/bookings-and-purchases) shows a program posing as a hotel receipt being refused.

No filter catches everything. A program behind a download link is a [deceptive link](https://trotta.email/threats/deceptive-links) problem, and the reading habit above still matters.

## Questions

### What is a double extension file?

A double extension file has two endings, such as invoice.pdf.exe. The last one counts: it tells the operating system what kind of file it is. The first is there to be read by a human.

### What happens if I open invoice.pdf.exe?

The program runs with your permissions. It may show a decoy document or nothing at all. Disconnect the computer from the network and report it, even if nothing seemed to happen.

### How do I show file extensions on Windows?

In File Explorer on Windows 11, open the View menu, choose Show, and turn on File name extensions. Every file then displays its real ending.

## Sources

- [MITRE ATT&CK T1036.007, Masquerading: Double File Extension](https://attack.mitre.org/techniques/T1036/007/)
- [MITRE ATT&CK T1036.002, Masquerading: Right-to-Left Override](https://attack.mitre.org/techniques/T1036/002/)
- [CISA, NSA, FBI and MS-ISAC, Phishing Guidance: Stopping the Attack Cycle at Phase One (October 2023)](https://www.cisa.gov/resources-tools/resources/phishing-guidance-stopping-attack-cycle-phase-one)
- [Verizon, 2026 Data Breach Investigations Report, executive summary](https://www.verizon.com/business/resources/executivebriefs/2026-dbir-executive-summary.pdf)

## Related

- [Malicious attachments](https://trotta.email/threats/malicious-attachments) Threat library
- [Deceptive links](https://trotta.email/threats/deceptive-links) Threat library
- [Hidden instructions in attachments](https://trotta.email/threats/hidden-instructions-in-attachments) Threat library
- [Security model](https://trotta.email/docs/security) Docs
- [Send later, invites, files](https://trotta.email/docs/mail-features) Docs
- [Bookings and purchases](https://trotta.email/use-cases/bookings-and-purchases) Use cases

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

[Get an inbox](https://trotta.email/signup) [Read the security model](https://trotta.email/docs/security)
