Obfuscation

Get help with using AutoHotkey and its commands and hotkeys
johnrichfield
Posts: 3
Joined: 24 Jan 2018, 14:19

Obfuscation

25 Jan 2018, 00:11

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
User avatar
Masonjar13
Posts: 1477
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: Obfuscation

25 Jan 2018, 00:31

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).
OS: Windows 7 Ultimate | Editor: Notepad++
My Personal Function Library | Check Out My Computer Rig
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Obfuscation

31 May 2018, 09:45

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.
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
User avatar
Nextron
Posts: 1368
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: Obfuscation

31 May 2018, 10:05

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.
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Obfuscation

31 May 2018, 10:11

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.
Last edited by DigiDon on 01 Jun 2018, 05:07, edited 1 time in total.
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
User avatar
Cuadrix
Posts: 203
Joined: 07 May 2017, 08:26

Re: Obfuscation

31 May 2018, 13:20

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.
----
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Obfuscation

31 May 2018, 13:36

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.
Last edited by DigiDon on 01 Jun 2018, 05:44, edited 4 times in total.
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
User avatar
Cuadrix
Posts: 203
Joined: 07 May 2017, 08:26

Re: Obfuscation

31 May 2018, 15:12

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.
----
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Obfuscation

31 May 2018, 15:14

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.
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, Bing [Bot], chngrcn, taylope1 and 244 guests