Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Tiniest portable executable

Tiniest portable executable

Scheduled Pinned Locked Moved C / C++ / MFC
game-devalgorithmstutorialannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DaviFN
    wrote on last edited by
    #1

    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!

    L 1 Reply Last reply
    0
    • D DaviFN

      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!

      L Offline
      L Offline
      leon de boer
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups