A file called something like invoice.pdf.exe is almost certainly malware. Windows only looks at the last extension, so this is a program (.exe) dressed up to look like a PDF, and because Windows hides known extensions by default you may only see invoice.pdf. Do not open it: delete it, or scan it first if you need to be sure.
The double-extension trick is old, simple and still effective, which is why criminals keep using it in email attachments, downloads and files shared over chat apps. The good news is that it is easy to defeat once you know what to look for.
How the double-extension trick works
Every file name ends with an extension that tells Windows what kind of file it is and which program should open it. Only the final extension counts. So:
photo.jpgis a picture.photo.jpg.exeis a program that will run when you double-click it.statement.pdf.scris a screensaver file, which is also an executable program.
With "Hide extensions for known file types" switched on (the Windows default), statement.pdf.scr appears as statement.pdf. Attackers often give the file a PDF or Word icon too, so it looks convincing at a glance.
The hidden right-to-left character trick
A cleverer variation uses an invisible Unicode "right-to-left override" character. It reverses the display of the text after it, so a file actually named invoice[RLO]fdp.exe can appear on screen as invoiceexe.pdf. The real extension is still .exe. You cannot see the hidden character, which is why checking the file type, not just the name, is important.
Other disguises to watch for
- Lots of spaces before the real extension, for example
document.pdf .exe, so the end is pushed out of view. - Shortcut files (
.lnk) with a document icon that run a hidden command. - Disk image (
.iso,.img) or ZIP files that contain one of the above.
| Extension | What it really is | Should a "document" ever have it? |
|---|---|---|
.exe, .com, .scr, .pif | Executable programs | No |
.js, .vbs, .wsf, .hta | Scripts that run on Windows | No |
.bat, .cmd, .ps1 | Command and PowerShell scripts | No |
.lnk | Shortcut that can launch a command | No |
.docm, .xlsm | Office files that contain macros | Only if you were expecting macros |
How to see the real file type in Windows 10 and 11
Turn on file name extensions
- Open File Explorer.
- Windows 11: click View > Show > File name extensions.
- Windows 10: open the View tab and tick File name extensions.
From now on you will see the full name, including the last extension, for every file.
Check the Type column and Properties
- In File Explorer, switch to Details view. The Type column shows what Windows thinks the file is, for example "Application" or "Screen saver", even when the name is disguised.
- For a closer look, right-click the file and choose Properties. The Type of file line on the General tab tells you the real type. If it says Application for something that should be a PDF, it is not a PDF.
What to do if you find one
- Do not double-click it. Close any email or chat it came from.
- Scan it. Drag it onto the Threat Eraser window, or right-click it and choose Scan with Threat Eraser (on Windows 11, under Show more options).
- Delete it, then empty the Recycle Bin. If it came by email, report it as phishing and delete the message.
- Check with the sender using a phone number or address you already have, not the details in the message. Their account may have been compromised.
If you already opened it
Assume the PC may be infected. Disconnect from the internet, run a Threat Eraser Full Scan and quarantine anything it finds, and for anything deeply hidden, a Microsoft Defender Offline scan from Windows Security > Virus & threat protection > Scan options. Many disguised attachments are trojans or infostealers that grab saved passwords, so change your important passwords from another device. Our guides on removing a trojan and infostealer malware cover what to do next.
How Threat Eraser catches disguised files
Threat Eraser includes a suspicious-file-name check as one of its detection layers. Together with hash matching, byte-pattern virus signatures and malware detection rules, it flags file names that use double extensions such as invoice.pdf.exe and names containing hidden right-to-left characters, even if the file is new and not yet in any signature database. It also scans inside ZIP archives, including nested ones, where these files often hide.
A Quick Scan covers the usual landing spots, including Downloads, Desktop, Documents and temporary folders, or you can drag a single attachment onto the window to check it. With a license, Real-Time Watch scans new files in your watched folders a moment after they arrive, and detections can be quarantined so they cannot run, then restored or erased for good.
See every Threat Eraser detection layer.
Frequently asked questions
Why does Windows hide file extensions?
Hiding known extensions is a long-standing default intended to make file names look simpler. You can turn extensions on in File Explorer's View menu.
Is every file with two dots dangerous?
No. Names like report.v2.pdf are normal; what matters is the final extension and whether it is a program or script.
Can a real PDF contain a virus?
PDFs can contain malicious links or exploit flaws in outdated readers, so keep your PDF reader updated and scan unexpected files.
