Jump to content

Recommended Posts

Posted

Alright, I want to patch a file (.exe) and add to it whatever I want, for example:

Add to a file a messagebox, like, everytime you open the file, you have to click OK on the message box and then it opens.

Sorry if it's hard to understand, but I really need your help here, thanks guys.

Posted

You can't just add code to an arbitrary executable file. You need the the source code of the compiled executable in order to modify it in the way you are suggesting.

Posted

I know, I'm not an idiot, I mean like:

WinLicense, this program's demo will patch any file, when you open the file, it will make a short splash screen of WinLicense and then the program opens.

Posted

You will need to know some assembler/reversing to inject code into executables. Here's a beginners tute; http://home.inf.fh-rhein-sieg.de/~ikarim2s/how2injectcode/code_inject.html

This forum might not be the right place for such things..

Joakim

Posted

Yeas it's psooible, but there is other software more suitable to do so.

If you require help doing it in autoit it might be hard for the following reasons:

1. Most people on the forum don't know the first thing about this kind of code injection. (I know I don't)

2. The potential for malicious use is probably rather high.

Posted

I only tried this type of thing once a long time ago, but the software shown in the link seems to do exactly what you want and I believe it can also be done using Cheatengine.

Posted

I don't think there exist a simple solution to code injection. The tools you need are;

1. Hex editor (WinHex)

2. Disassembler (IDA)

3. Debugger (Ollydbg, IDA)

4. PE editor (PEiD)

5. Knowledge of assembler/reversing and the win api.

Some of the above are not freeware though.

Actually the patcher itself can be written in autoit, but figuring out the patch must be done through either or all of the above-mentioned tools.

Joakim

  • Moderators
Posted

I'm not an expert with AutoIT, but I would think this would depend mainly upon the executable you're wanting to "add" to. If it is a commonly installed windows app (Notepad for example), that you expect to already be on the system, you could simply write the script to do what you want, and then call the executable. Something like:

$message = "Loading... "

SplashTextOn("Starting Application", $message, 500, 50)

For $x = 1 to 10

$message = $message & $x & " "

ControlSetText("Starting Application", "", "Static1", $message)

sleep(300)

Next

$var = Msgbox(262144+4, "Accept", "This application is only for company employees. Click Yes if you wish to continue or no to exit.")

If $var = 6 Then

Run( "Notepad" )

Else

Exit

EndIf

If, however, it is an executable you are delivering with the splash screen/msgbox, etc., you might try an open source wrapper utility such as QuickBFC. With that, you can launch your first executable, and then whenever the conditions are met, use it to call the second. QuickBFC (I know there are others, but it is what I use) will wrap both executables into a single .exe for you. Hope this helps.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...