Jump to content


Photo

DLLCrypt


  • Please log in to reply
9 replies to this topic

#1 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 27 July 2010 - 12:12 PM

Recently, I created this DLL on request for someone in the UltraCrypt topic:

http://dl.dropbox.co...33/DLLCrypt.zip

It's a DLL that will encrypt other DLLs, carefully skipping over important portions of the PE header and the resource section, so that it keeps the version data and icons intact.

The example, while a little impractical (it just en/decrypts; doesn't try to load the resultant DLL or anything), should be enough to get the general gist of using the DLL. The UltraCrypt DLL included with the package is the encryption target for the example program.

If it doesn't work in a specific case, then please PM me a bug report ;)

(This should also work for EXEs, but the EXE will crash on run until it's decrypted again.)

Update - Now works for non-executable files, in a separate function.

Edited by score_under, 31 July 2010 - 09:58 PM.

  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#2 rogerin0

rogerin0

    GMC Member

  • New Member
  • 43 posts

Posted 27 July 2010 - 12:57 PM

This has gotta be one of the best encryptors around for Game-Maker right now. As simple as UltraCrypt, yet so much better (in terms of decrypting/encrypting DLLs/EXEs).

Edited by rogerin0, 28 July 2010 - 06:22 AM.

  • 0

#3 Acasher

Acasher

    GMC Member

  • New Member
  • 15 posts

Posted 31 July 2010 - 03:49 AM

Hi, score_under.

Your dll uses a great encryption method. If you could make encrypting dll's and exe's a separate function i.e. a script called encrypt_dll/exe, and additionally, add a function that encrypts normal files other than dll's or exe's, like UltraCrypt does, i.e. a script called encrypt_normalfile, then this dll would truly be... the best encryptor/decryptor, as the poster said above, for GM.

I really think this Dll has some potential. Might as well make it the best, eh? If you go ahead and take my suggestion, then you should probably change the name as well; DllCrypt seems to lack in creativeness. Why not call it something special, like MochiCrypt? MochiCrypt is taken BTW, it's an extremely strong encryptor for flash files. Then, make a sleek logo for it and you're set.

Everything else works flawlessly.

-Acasher

Edited by Acasher, 31 July 2010 - 04:03 AM.

  • 0

#4 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 02 August 2010 - 02:37 AM

If you could make encrypting dll's and exe's a separate function i.e. a script called encrypt_dll/exe

There's not much point, as DLLs and EXEs are exactly the same file format. ;)

and additionally, add a function that encrypts normal files other than dll's or exe's, like UltraCrypt does, i.e. a script called encrypt_normalfile, then this dll would truly be... the best encryptor/decryptor, as the poster said above, for GM.

I've added this feature now... I've also put another DLL in the archive, its name is self-explanatory - it's a version of the DLL which encrypts only normal files, and is only 1.5KB in size. The original DLL, however, can encrypt both normal files and DLL/EXE files.

I really think this Dll has some potential. Might as well make it the best, eh? If you go ahead and take my suggestion, then you should probably change the name as well; DllCrypt seems to lack in creativeness. Why not call it something special, like MochiCrypt? MochiCrypt is taken BTW, it's an extremely strong encryptor for flash files. Then, make a sleek logo for it and you're set.

I'm no good at any of that ;) Most of my programs say what they mean, as far as the title goes, and if I manage to wrangle a catchy graphic from somewhere it's usually pure luck. I'm no artist, and I am definitely no good at naming things... believe me, I've tried. If, at some point in the distant future, I ever start a family, the wife's going to name the baby.
  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#5 anselm

anselm

    GMC Member

  • GMC Member
  • 239 posts

Posted 07 September 2010 - 03:17 AM

Now, I'm an intermediate user of GML. So I could be doing something utterly wrong here, but:

The encryption only seems to work once per game. Here's what I did;

(In the create code for the room)
init_dllenc();

(In init_dllenc())
global.file_enc=external_define("file_enc_only.dll","FileCrypt",dll_cdecl,ty_real,3,ty_string,ty_string,ty_string)
return global.file_enc;

(In the global left pressed event)
result=EncryptFile("test.ini","Stribog","ASTP$&^#@~!");
if(result==0)show_message("Encryption failed...");
else if(result==1)show_message("Encrypted!");
else if(result==2){show_message("Decrypted!");init_dllenc();}

Now, I've tried this every way I can think of. But every time I can get it to Encrypt, then Decrypt, then it fails. (When it's trying to encrypt a second time, that is.)

Any idea what's going wrong? Did I make some mistake in my coding?

Edited by anselm, 07 September 2010 - 03:17 AM.

  • 0

#6 score_under

score_under

    Least kawaii

  • GMC Member
  • 1321 posts

Posted 07 September 2010 - 07:17 PM

Now, I've tried this every way I can think of. But every time I can get it to Encrypt, then Decrypt, then it fails. (When it's trying to encrypt a second time, that is.)

Sorry, I'd missed out a line of code in the file-encryption-only version: the line that closes the file after decryption ;)

You can get the updated package from the download link in the original post, or you can get the updated DLL only:
http://dl.dropbox.co...le_enc_only.dll

(Also, I recommend you either change your keys or edit them out of your post, just for safety's sake.)

Edited by score_under, 07 September 2010 - 07:19 PM.

  • 0

Anti-Decompiler for GM6.1 to GM8.1.91! :GM8_new: [Main skin by Sindarin]
Discontinued.

decimal2.png
^ Signature image because it's been sorta empty since the old host died

If you need to contact me, I still get notification emails from PMs.


#7 anselm

anselm

    GMC Member

  • GMC Member
  • 239 posts

Posted 07 September 2010 - 07:24 PM

Ahh, thanks a ton! This DLL will help a bunch with my game, I'd just like to say, you're quite amazing at coding. Hopefully I can be as good as you someday :P

Also, I don't plan to use those as my final PW's, those were just for testing.
  • 0

#8 HD Blood

HD Blood

    GMC Member

  • GMC Member
  • 14 posts

Posted 24 July 2011 - 11:49 AM

For some reason, every time I encrypt a DLL, AVG says: "Trojan horse Win32|Heur has been found". I know this is not true, but it is pretty annoying and chases my users away who dont understand that my program isn't a virus. So they may allow there Norton/AVG/whatever, to delete my important DLLs. :(

Is there any solution to solve this problem? Maybe you can use another encryption algorithm so the DLLs aren't detected as a virus?
Or must I use another key so the DLLs are encrypted different? I dont know?
  • 0
Learning: C++
GML - HTML - PHP - Many GMDLLs

#9 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 24 July 2011 - 06:14 PM

For some reason, every time I encrypt a DLL, AVG says: "Trojan horse Win32|Heur has been found". I know this is not true, but it is pretty annoying and chases my users away who dont understand that my program isn't a virus. So they may allow there Norton/AVG/whatever, to delete my important DLLs. :(

Is there any solution to solve this problem? Maybe you can use another encryption algorithm so the DLLs aren't detected as a virus?
Or must I use another key so the DLLs are encrypted different? I dont know?

You could just not encrypt your DLLs.
  • 0

#10 HD Blood

HD Blood

    GMC Member

  • GMC Member
  • 14 posts

Posted 24 July 2011 - 06:28 PM

You could just not encrypt your DLLs.

Are you sure? Is there no other way? :o
Maybe score_under knows a way? If it is true, then how can I protect my program from hackers? GM isn't that solid, and most links to anti hack DLLs are expired <_<

Hmmm.. well, I'm going to search for other ways to protect my program, but if anyone would help me, or does have tips. just PM me :)
  • 0
Learning: C++
GML - HTML - PHP - Many GMDLLs