Tiniest portable executable
-
Hi everyone! I've been, for the past days, searching for the smallest executable for Windows. The reason is that I want to start a small macro for a game (basically just presses a key and maybe draw some pixels on screen), and I'd like it to be tiny, just for the sake of it. I'll not use NASM, however; I intend to use Ollydbg or another such tool to directly "code" in the executable itself (sort of like a challenge). I searched the web for the smallest executable, and it appears to be 97 bytes large. I couldn't find it for download, but I don't think it would run in any version of Windows (I want it to run from XP up (XP,7,8,10)). I found one called "hh2 golden.exe" (~400 bytes), which apparently runs from XP up, but it prints "Hello World!" in the screen (I'd like one that did nothing). Also, I couldn't assemble them (I don't know how to properly use NASM or other assembler). I'd use "hh2 golden.exe", but or other assemblerthen I had the idea to ask here if one of you guys have a better executable that I could use in this adventure. tl;dr: I'm asking for the smallest executable capable of running from winXP up. Preferrably it does nothing, since I want to modify it and put some functionality to it (but I need it to be completely clear at the beginning) Thanks!
-
Hi everyone! I've been, for the past days, searching for the smallest executable for Windows. The reason is that I want to start a small macro for a game (basically just presses a key and maybe draw some pixels on screen), and I'd like it to be tiny, just for the sake of it. I'll not use NASM, however; I intend to use Ollydbg or another such tool to directly "code" in the executable itself (sort of like a challenge). I searched the web for the smallest executable, and it appears to be 97 bytes large. I couldn't find it for download, but I don't think it would run in any version of Windows (I want it to run from XP up (XP,7,8,10)). I found one called "hh2 golden.exe" (~400 bytes), which apparently runs from XP up, but it prints "Hello World!" in the screen (I'd like one that did nothing). Also, I couldn't assemble them (I don't know how to properly use NASM or other assembler). I'd use "hh2 golden.exe", but or other assemblerthen I had the idea to ask here if one of you guys have a better executable that I could use in this adventure. tl;dr: I'm asking for the smallest executable capable of running from winXP up. Preferrably it does nothing, since I want to modify it and put some functionality to it (but I need it to be completely clear at the beginning) Thanks!
There was a competition some time back to make the smallest PE header for windows. If you ran across golden I was surprised you didn't find the link Tiny PE[^] The answer was 97 bytes but it won't work on Windows 2000, 133 bytes to get it to work on Windows 2000. I don't believe any of those work on Windows 7,8 or 10. This one works on windows 10 x64bit I tried it ... that is 268 bytes DPE64small/DPE64small.asm at master · DrakoPensulo/DPE64small · GitHub[^] Having looked at it I think the statement the smallest PE is 252 bytes on Win32, or 268 bytes on Win64 is correct. Personally I would go with the 268 bytes because it works on every windows version that exists currently. Here is the layout of the created 268 byte executable https://github.com/LdB-ECM/Docs_and_Images/blob/master/Images/Small_PE.jpg?raw=true This is how windows sees the details on the file https://github.com/LdB-ECM/Docs_and_Images/blob/master/Images/SmallPE_report.jpg?raw=true I did have fun messing around with it thanks to your question. For reference a linux executable PE you can squeeze to 45 bytes.
In vino veritas