News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Build in exe with MASM code

Started by theifyppl, August 07, 2009, 08:45:28 PM

Previous topic - Next topic

theifyppl

Ok so basically what I'm asking how to do is make kind of a builder.  With a program, make another Program.  So like, say I have an exe.  I enter some data and hit build, and it builds another exe with that data.

Can any1 point me in any direction? thanks

ecube

you can create strings like

mystr byte 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',0

in exe you wanna edit, then find that offset with a debugger and patch it with other exe with what u want.

;open file
;setfilepointer (to the offset)
;writefile your new data
;close file

vanjast

Quote from: theifyppl on August 07, 2009, 08:45:28 PM
Ok so basically what I'm asking how to do is make kind of a builder.  With a program, make another Program.  So like, say I have an exe.  I enter some data and hit build, and it builds another exe with that data.

Can any1 point me in any direction? thanks
The correct request would be...

I would like to make a Builder, a program that makes another program by entering parameters (or data).

.. and I would not help you here as it has the makings of an injection/trigger virus.

If you want to do this sort of thing I suggest you do your own research (as I have done over the years) - yep it takes years.... good luck
::)



dedndave

not just viruses - haven't you ever seen the "Terminator" movies ?
be careful - you may bring judgement day down on us

hutch--

to your original question, yes you can, its generally called a compiler or an assembler followed by a linker and if needed a resource compiler. If you want to wrap all of these up into one fine but as you have been told it will take years to develop that skill.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

TmX

Hutch,

A compiler is a complicated thing.
How about patch maker, like Jørgen Ibsen's apatch?
It can create standalone executables too, and I guess you don't need specific compiler knowledge (lexing, parsing, etc) to build such thing...

:wink

hutch--

He did say "build" not just write. Patchers are kids stuff usually used for modifying someone elses exe but they can be used for doing unique mods on your own software.

What he is after is something like a dialog box front end to alter attributes of a program that is going to be built, that means something complicated like a compiler, assembler, linker and resource compiler.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

most of the "patchers" i have seen just compare files and create an exe to make the same change(s) to a target (very script kiddie - lol)
the one TmX pointed us to actually uses a script file
it may not be exactly what theifyppl was looking for, but i can see where that could be a powerful tool for many uses
of course, as assembly programmers, we can write the code to do specific tasks without messing with it

hutch--

Patchers come in varous shades, the crude write bytes at a specific offset, the slightly smarter ones that search for a byte pattern and the smarter but out of date versions that require an exact copy of the source file to patch by algorithmically combining the two. The latter is better done by simply overwriting the source file with its replacement. If you bother to compress the patcher its usually done smaller than the old style patchers.

I can think of a use for a patcher, if you want to write very simple uncompressed code that has reliable offsets to change, you can tweak both code and data but you will need to know exactly what you are doing with the specific file format.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Vortex


theifyppl

Thanks for the help every1.

And yes, I know how long it takes.  I'm not new to programming, just new to MASM...i know how much work and dedication it takes.  I wasn't really asking for code or anything, but more so methods of going about doing this.  Thanks again :)...I think I've got the info I need for now.