How to Check If a File Is Safe Before Opening It
To check if a file is safe before opening it, do not double-click it: first inspect its real file extension (watching for double extensions like Invoice.pdf.exe or risky formats such as .iso, .lnk, .hta, .vbs, and .scr), upload it to an isolated scanner like NoBait's File Safe-Checker to verify its true magic-byte file type, hashes, macros, and sandbox behavior, and confirm unexpected attachments with the sender on a separate channel.
Most workplace malware infections do not happen by magic—they happen when someone busy in finance, recruiting, sales, or operations double-clicks an ordinary-looking invoice, resume, shipping manifest, or software update. Because Windows and macOS can hide file extensions by default, a dangerous program can wear a harmless PDF or Word icon on your desktop. Here is how to inspect any file safely before it runs.
Purchase_Order_Nov2026.pdf (Custom PDF icon embedded in binary)
Purchase_Order_Nov2026.pdf.exe · Starts with MZ (0x4D 0x5A) Windows Portable Executable header
- When file extensions are hidden, Windows strips '.exe' from display and leaves '.pdf' visible.
- File header bytes (MZ) prove it is runnable software, not a %PDF- document.
- Arrived inside a password-protected .zip archive with the password written in the email body so email antivirus could not peek inside.
1. Turn On Real File Extensions—and Spot High-Risk Formats
On Windows 11, open File Explorer and choose View -> Show -> File name extensions. On macOS, open Finder -> Settings -> Advanced -> Show all filename extensions. That single setting permanently defeats the oldest trick in malware delivery: naming an executable Invoice_9482.pdf.exe and giving it an Adobe Acrobat icon.
Even when extensions are visible, attackers use lesser-known formats that execute code or mount virtual drives when double-clicked. Treat any unexpected email attachment ending in these extensions as dangerous by default:
- Executables & installers (.exe, .msi, .scr, .com, .bat, .cmd, .ps1): No vendor, client, or courier ever needs to send a routine invoice, receipt, or resume as a runnable program or PowerShell script. Note that .scr (Windows screensaver) is a full executable in disguise.
- Shortcuts, disk images & HTML apps (.lnk, .iso, .img, .vhd, .hta): Attackers pack .lnk shortcut files inside .zip or .iso containers so double-clicking launches hidden command-line downloaders.
- Password-protected archives (.zip, .rar, .7z with password in email): Giving you the archive password right in the email provides zero real privacy—its sole purpose is blinding automated email security scanners.
- HTML attachments (.html, .htm, .svg): Often open locally in your browser to display a fake Microsoft 365 or webmail sign-in box rather than a real document.
2. Check True File Type ('Magic Bytes') Instead of Trusting the Name
Renaming malware.exe to photo.jpg does not turn it into a picture, and renaming an executable to report.doc or archive.zip leaves its internal binary header intact. Every standard file format starts with specific signature bytes—often called magic bytes—such as %PDF- for PDF documents or MZ for Windows programs.
When you drop a file into NoBait's File Safe-Checker, the engine compares the declared filename extension against the actual binary header, computes cryptographic SHA-256 hashes, measures byte entropy (which spikes when malware is encrypted or packed), and inspects internal streams without running anything on your own device.
3. Never Click 'Enable Content' or 'Enable Editing' to Fix a Blurred Document
Plain .docx, .xlsx, and .pdf files viewed in modern Protected View are much safer than executables—until an attacker convinces you to turn on embedded scripts or macros (.docm, .xlsm). A classic lure shows a fake blurred graphic saying 'Document created in an earlier version of Microsoft Office—click Enable Editing and Enable Content above to view.'
Genuine Word and Excel documents do not blur their text behind a graphic until macros run. Microsoft now blocks macros in files downloaded from the internet by default (Mark of the Web); never manually unblock a downloaded file's Properties just because an email instruction tells you to.
4. Use Isolated Sandbox Analysis for Software & Unknown Downloads
Sometimes you genuinely need to evaluate a small utility, a vendor tool, or a suspicious attachment sent to a colleague. Instead of testing it on a laptop that holds your browser cookies and company network access, upload it (up to 32 MB on NoBait File Safe-Checker, or inspect locally offline with NoBait Sentinel Desktop) first.
Static checks catch known signatures, suspicious Office VBA macros, and embedded PDF JavaScript (/OpenAction or /JS tags), while isolated dynamic sandbox execution observes whether a Windows binary tries to contact external command-and-control IPs, drop hidden startup files, or modify registry keys—complete with runtime visual evidence.
Chapter 4 · Malicious Files & EXE
Practice identifying double extensions, macro lures, fake software updaters, and safe file-handling steps in Chapter 4 of NoBait Course Quest.
Frequently Asked Questions
Is downloading a file dangerous if I haven't opened it yet?
Simply saving a file into your Downloads folder without opening or running it does not execute code inside the file. That gives you a safe window to scan the file in NoBait File Safe-Checker or delete it immediately.
Can a PDF file contain a virus or scam?
Yes—most commonly today, malicious PDFs contain clickable phishing links or fake QR codes leading to credential-theft sites, though rare PDFs also embed risky JavaScript actions or exploits targeting outdated PDF readers. Keep your browser or PDF reader updated and scan unfamiliar PDFs first.
Why do scammers send password-protected ZIP files with the password in the email?
Encrypting a ZIP archive prevents corporate email gateways and cloud antivirus engines from scanning the files inside during delivery, while handing you the password in plain text so you unlock the trap yourself.
