1

I use autohotkey to put different password combinations into different apps or devices I access. I also have an RSA token for additional authentication. Using an .ahk file is not very safe security wise, if anyone ever got access into my desktop that would have my password. So, I have found away around this. First I execute the .ahk file which allows it to run in the taskbar. After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. The issue is that every time I reboot the machine I have to do this. I am not being lazy, I want to know what a true solution is.
Is it possible to encypt/decrypt the .ahk file on the fly so that it is only able to be read by the hotkey and not by a human?

This is the closest I could find to a solution, but I don't understand the steps to actually implement it.

https://autohotkey.com/board/topic/4147-small-and-fast-text-file-encryptor/

  • Not familiar with AHK, but it sounds like you want an on-the-fly encryption tool like LUKS, eCryptfs, EncFS, etc. Wouldn't leave any un-encrypted files on the HD, etc – Xen2050 Jul 23 '16 at 9:10
  • What's the difference between what you're doing and just compiling it with the source code permanently zipped/locked up somewhere else? Not that you can't decompile an exe but it sounds about the same as what you're doing now without the hassle. After the script is compiled to exe it just goes in your startup folder and runs on boot. – JJohnston2 Jul 24 '16 at 4:24
  • I clarified a part above. "After it is running then I use 7zip to compress it with encryption and a password and DELETE the original text readable file. So, now the file can not be accessed unless it is unzipped, and if you try to edit the file in the taskbar it can't be read since the original is gone, but the hotkeys still work. " – DjIns1ght Jul 24 '16 at 16:42
  • So the issue here is that everytime I reboot the computer the file is zipped in the 7zip. I will have to unzip it and run the file to get it running in the taskbar again and then delete the file and 7zip it all over again. I want the autohotkey to decrypt and encrypt the .ahk file on the fly. It's not an .exe. It's an ahk file that contains text. It can be easily read by notepad. – DjIns1ght Jul 24 '16 at 16:50
  • Why would anyone vote this down? I don't understand how this site works. I am asking a legitimate question looking for a serious answer. – DjIns1ght Jul 25 '16 at 13:59
1

Try converting it into an .exe with the compiler. It makes it unreadable but there are also ways to 'decrypt' machine code. I know this is late but I just needed to look this up and came up with this solution.

  • Decrypting machine code is hard.   Finding text strings in executable files is easy. – Scott Feb 5 at 7:32
  • Hmm. I guess you could try looping through a word with if statements? If a written, write b, if b written - write c, if c written - write d. This also could be recognized with pattern searches or something similar I guess – Anonynoose Feb 11 at 9:36
0

zipping and unzipping is complete overkill.

The easiest thing to do is just use Windows Encrypted File System to encrypt the AHK files. To use this feature, right-click a file or folder, select Properties, and click the Advanced button on the General tab. Enable the Encrypt contents to secure data option. Files are essentially encrypted with your Windows user account password, so you’ll lose them if you forget your Windows password.

  • But...I can still read it. I want the file to be unreadable in plain text. – DjIns1ght Jul 25 '16 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.