Help with basic obfuscation...

Get help with using AutoHotkey and its commands and hotkeys
AlejandroL
Posts: 1
Joined: 21 Sep 2016, 17:51

Help with basic obfuscation...

30 Jan 2017, 10:27

Hi guys...
Need a little help here...
Trying to create a very simple program, which is done.
I do not need Defense Grade encryption, just some basic obfuscation to make life harder for anyone wanting to use the code with out permission.
What I need to add to it is a simple way to crypt or salt a text string with a particular code so that the script can validate that the user is allowed to use the script.
I've tried some of the examples, but I am having issues getting anything that needs to be included in the program to work, so I would ask that whatever the solution is can be implemented as a function.
Thanks in advance for any help,
Alex

Code: Select all

SomeMagic(a,b){
--- Here Is what I need help with
return result
}

PCdata = %A_COMPUTERNAME%%A_USERNAME%
FixedData := "A_Fixed_String"
PCdataEncoded := SomeMagic(PCdata,FixedData)

InputBox AuthCode,A Title,Authorization Code:,,,,,,,,
if (AuthCode != PCdataEncoded) {
   ExitApp
}
... Keep Going...
If something goes wrong, blame the guy who can’t speak English.
-- Homer Simpson
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Help with basic obfuscation...

31 May 2018, 09:01

Still bumps on Google for 'autohotkey obfuscation'

So for info I've just released a major improved version of David Malia's Dynamic Obfuscator called 'AHK Dynamic Obfuscator L'.
[TOOL] AHK Dynamic Obfuscator L - Protect your code by Obfuscation
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: 199
Joined: 07 May 2017, 08:26

Re: Help with basic obfuscation...

31 May 2018, 13:21

To obfuscate your Autohotkey code, use AHK source code Encryptor v2.0 By FeiYue:
https://autohotkey.com/boards/viewtopic ... +Encryptor
It works very well.
----
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Help with basic obfuscation...

31 May 2018, 13:43

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.

'AHK Dynamic Obfuscator L' is open-source, obfuscation tool, flexible and completely documented.
Last edited by DigiDon on 01 Jun 2018, 05:43, edited 2 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
gregster
Posts: 2393
Joined: 30 Sep 2013, 06:48

Re: Help with basic obfuscation...

31 May 2018, 18:44

DigiDon wrote:Please we have just mentioned in a thread to not spam the Ask for Help, especially for this kind of senseless posting.
Didn't you start the necroing of ancient threads?? Speaking of "senseless postings"...

I am a marketing guy, but your kind of "promotion" is just not what we are used to in this forum. I also fear that your advertizement of obfuscation will create false expectations for many unexperienced users. Users who have the skills to (mis-)use your code, will also be able to de-obfuscate the source code in a short time. It is just not a very strong method to protect source code. It might create a false feeling of security instead and attract people who will rather see your obfuscation method as a (mild) challenge.

Anyway, spam away, but do not expect :clap:
User avatar
Flipeador
Posts: 1080
Joined: 15 Nov 2014, 21:31
GitHub: Flipeador
Location: Argentina
Contact:

Re: Help with basic obfuscation...

31 May 2018, 19:01

@gregster +1
I advise users not to use this. I do not see it as something reliable, it can leave the code unusable or in the worst case modify something important in the code that ends in a formatting of the OS. In addition to being a very poor and ridiculous "protection" method, AHK is VERY slow in itself, this would slow down the code much more. If you want protection, use a compiled language.
Windws 1♂ Pro 64-Bits I make scripts for AHKv2 (my v2 compiler) & WIN_7+ Spanish Argentina
(If any of my code written for v2 has stopped working, send me a private message. I appreciate that you correct my English.)
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Help with basic obfuscation...

31 May 2018, 19:45

First let me apologize as I realized I was a little rude in my first answer. I had a long day.

About my posting
About your remarks on obfuscation:
You should test your obfuscated software as you should test your software that are absolutely not bug risk-free. If obfuscation works well one it should work well twice, but you should still try it.
Obfuscation exists for many other languages https://en.wikipedia.org/wiki/Obfuscation_(software) and this project is well documented and open source.

Poor and ridiculous, if you say so, but I disagree. Every method of protection can be cracked with enough time and ressources.
And even if you unobfuscate all the source code (which will take time and ressources) you would still end up with lots of unreadable code, very difficult to make sense of.
Yes there are better languages for code secrecy but we are talking about AHK, not switching to another one.
Nevertheless I have added information to the topic so that users would not create false expectations.
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
SOTE
Posts: 623
Joined: 15 Jun 2015, 06:21

Re: Help with basic obfuscation...

29 Sep 2018, 06:12

Reading this, I'm in agreement that AutoHotkey's use of obfuscation is no different to what other program languages are doing, such as .NET/C# with their use of .NET Obfuscator or Dotfuscator; (https://en.wikipedia.org/wiki/Dotfuscator). C# and .NET is easy to reverse engineer by default, but they allow the bar to be set a bit higher, so that not just anybody off the street or casuals can expose source code and to do better at protecting intellectual property or copyright.

AutoHotkey code can also be so easily exposed, that you can have casuals do it with easily available 3rd party freeware tools. This can be an issue in an IT or company environment in certain cases. Such as an IT administrator not wanting users to block, interfere, or circumvent a script that they have running. It might not be the IT person's or management's goal to provide unbreakable and uncrackable protection, just make it not so easy for casuals to cause mischief or circumvent. And people might want to use AutoHotkey within a company or school environments because of it's automation abilities, flexibility, and the ease of programming make it a perfect or preferred tool for various tasks.

No, obfuscation won't stop masters or highly skilled people, but such people will likely not be stopped even if you used Assembly, C, or C++. Refer to https://youtu.be/YxPsS4YGZRU and tools like OLLYDBG, radare2, or IDA PRO. Like with .NET obfuscation tools, setting the bar just a bit higher in AutoHotkey can be a good thing. So FeiYue's and DigiDon's scripts can be helpful, as long as programmers are clear about the situation.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], roses21+ and 138 guests