Page 1 of 1

Obfuscation

Posted: 25 Jan 2018, 00:11
by johnrichfield
Any methods you know of? I'm going to make my ahk script into an exe file, and I don't want clients knowing the code written inside. Here's the jist of it:

Code: Select all

^+!z::
If FileExist("C:\someProgram") {
   RunWait, cmd /c netsh advfirewall firewall show rule name="someProgram Block",, Hide
   If (!ErrorLevel){
RunWait, cmd /c netsh advfirewall firewall delete rule name="someProgram Block" dir=in program="C:\Program Files (x86)\someProgram.exe",, Hide
}
   Else{
RunWait, cmd /c netsh advfirewall firewall add rule name="someProgram Block" dir=in action=block enable=yes program="C:\Program Files (x86)\someProgram.exe",, Hide
}
} Else {
}
return
I tried this one, but it only obfuscates functions from what I understand. Is there anyway to obfuscate this also, or maybe prevent the exe file from being decompiled?

Any help is appreciated. Thanks for your time

Re: Obfuscation

Posted: 25 Jan 2018, 00:31
by Masonjar13
Ultimately, no, you can not perfectly protect your code. If that works for functions, then simply make your code functional/function based. That may or may not provide reasonable protection. While they're still susceptible to injection theft, you could try a paid PE packer/compressor for significant difficulty in decompilation.

Since this doesn't appear to need any significant protection, I'd say to just compress via MPress. You may also consider MCode, or encryption.

If you really think it needs it, you can compile AHK_H with a password (search for g_default_pwd).

Re: Obfuscation

Posted: 31 May 2018, 09:45
by DigiDon
Hi,
I'm the creator of [TOOL] AHK Dynamic Obfuscator L - Protect your code by Obfuscation
This tool is able to do much more than function obfuscation.
Then you can or not choose to compile it. Check out documentation.

Re: Obfuscation

Posted: 31 May 2018, 10:05
by Nextron
DigiDon wrote:Hi,
I'm the creator of [TOOL] AHK Dynamic Obfuscator L - Protect your code by Obfuscation
This tool is able to do much more than function obfuscation.
Then you can or not choose to compile it. Check out documentation.
A quick glance at your output example shows the obfuscation of user defined functions and variable names, but not built-in commands or literal strings, which dominates the relevant code here. Can you give an example of how the output would become?
If the code doesn't change much, this post and the bumping of other inactive topics seems spammy.

Re: Obfuscation

Posted: 31 May 2018, 10:11
by DigiDon
That's uncorrect. I provide methods in the documentation to cope with that.

Commands should be replaced by functions which calls will be obfuscated.

Strings can be hidden with the use of a special function called Hidestr().

However I agree with you that I should not populate the Ask for help section too much and therefore will stop. I planned to answer only the top 1 google search results, which I thought would make sense, but far from me the will to disturb the Help forum.

Re: Obfuscation

Posted: 31 May 2018, 13:20
by Cuadrix
To obfuscate your Autohotkey code, use AHK source code Encryptor v2.0 By FeiYue:
https://autohotkey.com/boards/viewtopic ... +Encryptor
It works very well and should do the trick.

Re: Obfuscation

Posted: 31 May 2018, 13:36
by DigiDon
Well we've just mentioned the need not to populate the Ask for help section too much...

Edit (soften answer): Explanations seems lacking for this this project and the code is not open-source. It seems to be a short encryption technique and not obfuscation.

'AHK Dynamic Obfuscator L' is open-source, obfuscation tool, flexible and completely documented.

Re: Obfuscation

Posted: 31 May 2018, 15:12
by Cuadrix
DigiDon wrote:Well we've just mentioned the need not to populate the Ask for help section too much...

Plus I do not see your comment bringing much help since this project is NOT OBFUSCATION but encryption. Which if you figure out a single password is done.
Also explanations are absolutely not clear for this project and the code is not open-source.

So I would still recommand 'AHK Dynamic Obfuscator L' which is open-source, obfuscation tool, flexible and completely documented.
The point of AHK source code Encryptor v2.0 By FeiYue is to hide the source code of the .exe file from being viewed in a text editor.
This is exactly what the OP wants:
I'm going to make my ahk script into an exe file, and I don't want clients knowing the code written inside.

Re: Obfuscation

Posted: 31 May 2018, 15:14
by DigiDon
OK well let's stop bumping these topics as other recent Help topics will get behind. Title is obfuscation and was referring to the project of which I informed of the upgrade.