Jump to content

Self-Modifying EXE


Recommended Posts

I want to reserve a data area within a script's exe, to define special variables (memory locations) within the exe that the script can read and write to, so that the script can update the variables and re-save itself as an .exe, such that the new values of these variables would be seen on subsequent execution(s) of the exe.

How to do this?

Edited by HyperVista
Link to comment
Share on other sites

Correct. Basically I want to execute a "use count" mechanism to determine how many times the script has been executed, without using a file or registry that can be tampered with. It would also allow the user to transfer the exe to another computer and still get credit for number of uses left. Another mechanism would be the date that the file was downloaded and provide an expiration date in combination with use count. To have this embedded within a compresses or obfuscated .exe would discourage piracy and avoid additional impact (registry and files) to the client's machine.

After reviewing current responses, one possible strategy might be to identify how to make a "hole" in the exe, for example, a string of spaces someplace; disassemble the exe and identify the address within the exe of the "data area"; and then do a binary read/write of the exe within the script to get and update the information when needed.

Link to comment
Share on other sites

Correct. Basically I want to execute a "use count" mechanism to determine how many times the script has been executed, without using a file or registry that can be tampered with. It would also allow the user to transfer the exe to another computer and still get credit for number of uses left. Another mechanism would be the date that the file was downloaded and provide an expiration date in combination with use count. To have this embedded within a compressed or obfuscated .exe would discourage piracy and avoid additional impact (registry and files) to the client's machine.

After reviewing current responses, one possible strategy might be to identify how to make a "hole" in the exe, for example, a string of spaces someplace; disassemble the exe and identify the address within the exe of the "data area"; and then do a binary read/write of the exe within the script to get and update the information when needed.

Any help from the AutoIT honchos with regard to executables, compression, or obfuscation relevant here would be appreciated. I think such an API would be useful, perhaps someone can think of a stronger solution. Thanks.

(Sorry, there doesn't appear to be a way to delete posts you just made; so sorry for the duplication.)

Edited by HyperVista
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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