On this page
- Double clicking starts the program with your rights and no sandbox.
- Check the source and the SHA256 hash before you open anything.
- Header readers and 7-Zip open an EXE file without starting it.
- Windows Sandbox starts an unknown file in a throwaway desktop.
What Does Opening an EXE File Mean?
Opening an EXE file can mean two things. You can start the program, or you can look inside it. A double click does the first, and the first is the risky one.
IANA says a Portable Executable file contains native code that executes with the rights of the user, with no sandbox. Our EXE file guide shows the header fields byte by byte.
How Do You Check Where an EXE File Came From?
Start with the source. A file from the publisher's own site is a better bet than a file from an email you did not expect. If the message is a surprise, delete it and ask the sender through another route.
According to Microsoft, SmartScreen checks a downloaded file against lists of reported software and well known files, and it checks reputation and signature. A file with no reputation brings a warning. SmartScreen does not protect against files on network shares, so those need your own check.
How Do You Check the Hash?
The hash shows which file you received. Write it down, and compare it with the value the publisher lists when one exists.
Get-FileHash .\setup.exeA signature is not proof of safety. 10 of the 32 EXE files in our test have a certificate table. It shows that a signature exists, and we verified none.
How Do You Look Inside an EXE File Without Starting It?
Copy the File
Work on a copy and keep its hash.
Check the First Bytes
A Windows program starts with 4d 5a, the letters MZ. Use
xxd -l 2 setup.exe.Open It as an Archive
Use
7z l setup.exeto list what 7-Zip finds inside.Check the Headers
A header reader like pefile prints the machine type, the sections and the certificate table.
Our five readers examined 32 EXE files this way and started none. No hash changed after any test.
How Do You Start an Unknown EXE File Safely?
Use Windows Sandbox. Microsoft describes it as a lightweight, isolated desktop environment. Closing it deletes all software, files and state. It works on Windows Pro, Enterprise, Pro Education and Education. It does not work on Home.
Microsoft also warns that networking is on by default and can expose untrusted applications to the internal network. Switch it off in the sandbox configuration file before you start a file you cannot place.
What We Tested and What We Left Out
We read 32 EXE files from 10 public Python packages with five readers on Linux. We started none and scanned none for malware. A quiet report from a reader proves the header parses and nothing more. We did not test Windows Sandbox ourselves, so its facts come from Microsoft.
Frequently Asked Questions
How do I open an EXE file safely?
Check the source and the SHA256 hash first. Look inside with 7-Zip or a header reader. Start an unknown file only in Windows Sandbox.
Is it safe to double click an EXE file?
Not when you cannot place the file. A double click starts the program with your rights and no sandbox.
Can I look inside an EXE file without starting it?
Yes. 7-Zip and header readers print what the file holds and start nothing.
Does a signature make an EXE file safe?
No. A signature shows that a certificate table exists. We verified none of the signatures in our test files.
Does Windows Sandbox work on Windows Home?
No. Microsoft lists Windows Pro, Enterprise, Pro Education and Education as supported.
What does SmartScreen check?
Microsoft says it checks downloaded files against lists of reported software and well known files, and it checks reputation and signature.
Why does an EXE file show a warning?
SmartScreen warns about a file with no known reputation. Check the source and the hash before you start it.
