how to make an exe file....?
for eg: i have printed the data of an exe file like all headers, number of sections etc..

if i will write the same data to a newly created exe file, then will hat file will work in the same way??


what is the minimum rqqrmnt for an exe file to work prooperly..
?
Posted on 2011-07-07 00:08:00 by am2011
The Minimum Requirements are pretty much the requirements for an executable to work. Seriously - Search for PE Headers by Pietrek on google and be prepared to have your mind blown.

But to answer your questions if you just rip out the header and copy paste it into another exe - Nope, that will not work. Entry points can be different, IAT will not match, data wont match - and and and



Posted on 2011-07-07 08:03:35 by JimmyClif
The Minimum Requirements are pretty much the requirements for an executable to work. Seriously - Search for PE Headers by Pietrek on google and be prepared to have your mind blown.
That's  sorta outdated, though - best reference I know of these days is Microsoft's own "pecoff.doc".

"Minimum requirements" is tough. You won't find a single comprehensive list anywhere, the information is spread all across the internet. Don't try to be too cute, or your EXE will fail on one or more Windows versions; there's differences between 9x and NT, and even between the various versions.

Some rules:
1. Obey padding and alignment, even if it seems silly.
2. Don't use physical section align < 512 bytes.
3. Don't use virtual section align != 4096 bytes.
4. Be VERY careful with the resource section, it's a b*tch.
5. Use the standard sections, with standard permissions. This isn't as much of a peloader issue as a "gee, that looks suspicious, let's stamp it as malware!" issue with antiviral products.
5a. Put standard PE structures in standard sections (and in standard *order* in those sections).
6. You need to import something from kernel32; this can be done explicitly, or linking to something that ends up importing from kernel32. Instead of trying all sorts of cute things, the safe bet would be LoadLibrary, GetProcAddress, ExitProcess.

That isn't an exhaustive list, but are steps that are all necessary to have your executables working across all Windows versions. If you just want fun and giggles and minimal executables that work on your system, check out some of the minimal PE threads on the flat assembler board. Apart from the challenge, such efforts are pretty useless though.
Posted on 2011-07-13 17:01:04 by f0dder

The Minimum Requirements are pretty much the requirements for an executable to work. Seriously - Search for PE Headers by Pietrek on google and be prepared to have your mind blown.
That's  sorta outdated, though - best reference I know of these days is Microsoft's own "pecoff.doc".


Linky: http://msdn.microsoft.com/en-us/windows/hardware/gg463119
Posted on 2011-07-13 17:18:48 by Scali

That's  sorta outdated, though - best reference I know of these days is Microsoft's own "pecoff.doc".


Good to know. Last time I played with it - It was the best reference around :)


4. Be VERY careful with the resource section, it's a b*tch.


Sadly enough - I can say that once you understand it's pretty straight forward. But maybe I just spent way too much time on it ;) I remember myself sitting in an office without internet or even a PC writing a resource parser on paper. Then went home and typed it into my IDE.

... but then again.. I think the IAT is a pain :)
Posted on 2011-07-13 18:47:21 by JimmyClif