I have a 10KB empty executable file on Windows.
If I run it, what is it going to do? In other words, what does
00 00 00 00 00 00 00 1 2 Answers
If I run it, what is it going to do?
Nothing at all, other than generate an error message, as the file does not contain a valid executable file header.
On Windows 7:
On Windows 10:
Portable Executable
The Portable Executable (PE) format is a file format for executables, object code, DLLs, FON Font files, and others used in 32-bit and 64-bit versions of Windows operating systems. The PE format is a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code. This includes dynamic library references for linking, API export and import tables, resource management data and thread-local storage (TLS) data.
...
Source Portable Executable
Further Reading
- Peering Inside the PE: A Tour of the Win32 Portable Executable File Format
- x86 Disassembly/Windows Executable Files
Most popular files, executables included, have a header. The header, or the first few bytes of code, identify what kind of file it is. When you launch an executable, windows will first check the header, and given that it is not the default header for an executable, windows will simply give you a message that the file was damaged, or that it is not a valid 32-bit executable.
So long story short, you get an error message, nothing more.
If it were to have a valid header, but for the rest only 00 bytes are found, it would launch the app then quit, because there are no further instructions. So in short, that would do nothing.