Join our Newsletter — 33% off our NHI Course

Double File Extension

Double File Extension is a file name that uses two extensions, such as a deceptive document name followed by an executable extension. Attackers use it to hide malicious files from careless users, so defenders should show full extensions, filter suspicious attachments, and inspect files that rely on misleading naming.

What a Double File Extension Is

A double file extension is a filename that appears to contain a harmless document type first, then a second extension that can reveal or enable executable content. The trick works because many users, mail clients, and file browsers visually emphasise only part of the name.

Attackers rely on that mismatch between what the file looks like and what it actually is. A file named to resemble a PDF, image, or Office document can still end in an executable or script-related extension, making the name itself part of the deception.

Why Double Extensions Are Effective

Double extensions exploit human trust in familiar file labels and interface shortcuts. If a system hides the full name, or if a user inspects only the first visible extension, the dangerous part of the filename can be missed even when the file is already present on disk or in an attachment queue.

The technique is especially effective where users expect documents to be safe by default, or where workflows depend on quick approval of attachments. It is not the extension pair alone that causes harm, but the way misleading naming lowers suspicion long enough for the file to be opened.

When defenders need a broader view of how adversaries use misleading naming and file-based persistence, Persistence Techniques Guide is useful because file disguise often supports later execution and follow-on abuse.

Common Delivery and Abuse Patterns

Double extensions are often seen in email attachments, downloaded archives, shared folders, and cloud-synced files where filenames are the first thing a recipient sees. They may be paired with archive nesting, icon spoofing, or social engineering that encourages the user to open the file without checking the true type.

In practice, the filename is only one layer of concealment. A file can still be blocked, scanned, or sandboxed if security tools inspect the actual MIME type, script markers, or executable headers rather than relying on the visible label alone.

Attackers also use this technique to bypass casual review in development or admin environments. For example, a deceptive name can hide a payload inside a directory of ordinary documents, or make a malicious file look like a routine support attachment to reduce scrutiny.

For defenders interested in how hidden payloads and trust abuse show up in development tooling, Secrets in VS Code extensions 2025 shows the broader pattern of deceptive file and package content being used to mislead users and systems.

How to Inspect and Reduce Exposure

The safest response is to make the full filename visible everywhere users handle files, including email clients, file explorers, web portals, and remote access tools. If the last extension is visible, the deception becomes much harder to sustain.

Inspection should focus on the file’s actual type, not just its name. Security teams should verify suspicious attachments with content-aware scanning, block dangerous executable formats where possible, and treat files that combine a document-like first extension with a script or binary ending as suspicious until proven otherwise.

Mail and download controls should also reduce exposure by filtering high-risk attachment types, flagging inconsistent filename and file-type combinations, and warning users when a file’s name and payload do not match. These controls are most effective when paired with user training that teaches people to check the full name rather than the first visible fragment.

Risk and Threat Considerations

Double file extensions are risky because they lower the chance that users, reviewers, or lightweight filters will notice that a file is actually executable or otherwise dangerous. The result is a simple but effective delivery mechanism for malware, unwanted script execution, and social-engineering-based compromise.

Failure mechanism: The attacker relies on interface truncation, default file-hiding behaviour, or user inattention so the second extension is missed and the file is treated as a benign document.

Impact: A disguised attachment or download may be opened, launched, or forwarded, creating a path to code execution, malware installation, or broader phishing success.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 CIS-9 — Email and Web Browser Protections Double extensions commonly arrive through email and web downloads.
CIS-14 — Security Awareness and Skills Training Users must recognise misleading file naming and extension hiding.
Recommendation — Block risky attachments and enforce controls that inspect downloaded files by type, not name. Train users to verify full filenames before opening attachments or downloads.
NIST SP 800-53 Rev 5 SI-3 — Malicious Code Protection File inspection and filtering are core defenses against disguised malicious files.
SI-4 — System Monitoring Detection depends on monitoring suspicious file activity and misleading payload delivery.
AC-6 — Least Privilege Limiting execution rights reduces the damage if a disguised file is opened.
Recommendation — Scan attachments and downloads for malicious content before execution or delivery. Monitor file delivery and execution events for deceptive attachment patterns. Restrict execution permissions so a mistaken file open cannot easily become compromise.

Practitioner Guidance

Why practitioners should care: This is a naming trick, not a technical exploit, which means it often slips through unless the environment is configured to show and validate complete file names. That makes filename presentation and content inspection important control points.

What to watch for: Look for attachments and downloads whose visible label suggests a document, but whose full name ends in a risky executable, script, or shortcut type. Treat mismatched name-and-content combinations as a review signal, not a convenience issue.

Practitioner takeaway: If users can only see part of a filename, attackers can hide the dangerous part in plain sight.