Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / GameCrypt. Asset protection and file archiving system for DarkBASIC Pro

Author
Message
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 20th Nov 2006 19:18

!! Presenting GameCrypt!!
Beta Release


Finally I have been able to work out many of the little kinks and bring GameCrypt, my new system up to a usable standard.

When making a game or application in DBP, I have always considered what would happen when I include media and soembody would want to steal it and use it in their own game. Without GameCrypt its easy to do this and get away with it.

What about when making an RPG or other game that uses save files? Do you want some pesky player to be able to change their stats etc.?

Check out gamecrypt for a user friendly way to stop both of the above from happening, and also allowing you easy access to your assets and allowing you to archive any kind of data including files, memblocks, images, strings etc.

There is only so far I can take testing it on my own, so if anybody finds a bug or has any questions then please do not hesitate to post them here

The plugin comes with a demo program and html documentation on every command offered.

Find it Here: http://logicstudios.net/GameCrypt_Beta01.zip

WE SHALL BECOME ALL POWERFUL! CRUSH THE LESSER RACES! CONQUER THE GALAXY! UNIMAGINABLE POWER! UNLIMITED RICE PUDDING ! ! ! ETC. ! ! ! ETC.! ! !
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 20th Nov 2006 19:21
Just testing that the logo appears in my signature

<a href="http://forum.thegamecreators.com/?m=forum_view&t=93816&b=8"><img src=http://logicstudios.net/logo.jpg</img></a>
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 20th Nov 2006 19:23 Edited at: 20th Nov 2006 19:26
Interesting... If the security's good (read: decent enough to stop the noob army) then this could be very useful indeed.

Bookmarx0red, and keep up the good work ^^

-=-=- Activate asshat mode. -=-=-
Warning: This post may contain bloatage.
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 20th Nov 2006 19:27 Edited at: 20th Nov 2006 19:29
Can't get the signature to work properly.


@Blanky : No security or protection is uncrackable. I have gone out of my way to make it as difficult to crack as possible whilst maintaining a decent speed.

Thanks APEXnow for telling me how to do the signature.

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 20th Nov 2006 20:47
Looking good Mnem, As said on IRC, we'll need to bang heads to see if DGDK.NET can get supported

Paul.

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 20th Nov 2006 21:08
Well, you helped me a great deal on this project. My knowledge of c++ has improved a lot. Im going to get this working as a static library soon for other c++ users. Perhaps this can be adapted for .net

bandM
18
Years of Service
User Offline
Joined: 27th Sep 2006
Location: Home
Posted: 21st Nov 2006 17:07 Edited at: 21st Nov 2006 17:08
@Mnemonix : That's a great plugin.Thanks for this work.Can you show me how can i open crypted zip files?It's really important for my project.
Thank you...
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 21st Nov 2006 18:07
er, everything is shown in the helpfiles and the example program given with the zip file.

It works very similar to the standard DBP file access commands. Here is a snippet



jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 21st Nov 2006 18:33
I would be very grateful if this could be converted to work with DGSDK.net. It would solve my media worries. Already come up with an encryption for data files, but being able to encrypt media would be the thing I'm after.

WRITE PROTECTED IMAGE
READ PROTECTED IMAGE
WRITE PROTECTED SOUND
READ PROTECTED SOUND
WRITE PROTECTED MESH
READ PROTECTED MESH

Would there need to be one for music, my mind is a bit of a blank at the moment?

Cheers,

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 21st Nov 2006 20:02
Music is a bit tricky to do. If I can find someway of getting access to the music data in C++ and being able to read-write it then it may be possible. I shall look into this.

French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 21st Nov 2006 23:46
Very nice Mnem, this is something I'm after since a long time! But... I've made a test using the example.dba file , adding a suspend for key command between the writing data part and the reading one just to let me time for modify the data.txt file. Your plugin detected that the file was modified but closing the program with an error (see attached screenshot).

Attachments

Login to view attachments
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 22nd Nov 2006 00:57
I will try and locate the error. Did you close the protected file successfully whilst you edited it?

French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 22nd Nov 2006 16:44 Edited at: 22nd Nov 2006 16:49
Hmm, yes I think. Look, this is the example code I've modified:




So, what I've done is:

1)Execute the above code
2)When the program wait for you to press a key, open the data.txt
file in notepad and randomly edit something
3)Save the edited data.txt
4)Press a key to continue the program and then the error should happen...

[edit] Maybe it's because the data.txt file is altered so the READ PROTECTED STRING command create an error...
French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 22nd Nov 2006 16:54
OK, it's working, (added a line after result check..)

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 22nd Nov 2006 18:18
Yes, thanks for that. I forgot to mention that decrypting an invalid file will result in an error. Is everything working fine for you now?

French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 22nd Nov 2006 19:21
Yes, everything is fine, thank for this plugin. I guess I can use MEMBLOCK FROM IMAGE command to encrypt my images medias? Maybe you can add a faster command for this?
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 22nd Nov 2006 19:31
I have a question.

Can't someone just download the the encrypter and use it to decode the media files of someone else's program.

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 22nd Nov 2006 19:36
No, because it uses a custom key

warship45
20
Years of Service
User Offline
Joined: 24th Jul 2004
Location: uk
Posted: 22nd Nov 2006 20:05
but they could make an app to do that just the same e.g. u load the dll in somthing like delphi that lets u use try u then make it go thoght all of the keys then trys to load the media once if it does not work it trys agin or somthing like that

dbpro plugins
www.0z0.co.uk
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd Nov 2006 20:23
To crack this you probably need to open game exe file into any HEX editor and search for any string that may contain password for the archive. Once done you must open the archive and extract the data using this key. Although it might be quite hard to find this key-string if it uses symbols like "#@$!#@$!@$^$^%&t43f3f34", but if it uses something like "mypass" then its very easy.

AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2
http://www.myspace.com/producerolby
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 22nd Nov 2006 20:32
Very nice plugin! I am using it to encrypt all my media, but I am having trouble encrypting a 3d mesh. Here is my code:



When I run it (file$ and key$ are already set with input commands), Gamecrypt says: The image number you are trying to write does not exist.

There are no image commands in there, so something must be wrong. I did the same kind of thing with images and sounds, and it works fine.

Do you know what I am doing wrong, or is it a bug in the plugin?

Thanks

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 22nd Nov 2006 20:52 Edited at: 23rd Nov 2006 00:28
I fixed the error message but I cannot work out why you are recieving the error for the mesh. I will try and fix it.

Oh, I think there is an error in my help files.

The close file should be CLOSE PROTECTED FILE .

Updated help files and dll. Please get the new version. Its still marked as beta 01 though.

Thanks for the feedback guys


http://logicstudios.net/GameCrypt_Beta01.zip

Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 22nd Nov 2006 23:01
@warship45: Yes, that is possible. And if you think about it, the same is true with any password system, and it could take years to decode a strong password (very long string, numbers, upper and lower case letters, other weird symbols), so this just isnt practical.

@Olby: Not necessarily, the key itself could be stored encrypted using a one-way hash which makes it very hard to crack even if you manage to find it in a file

Mnem, well done by the way, keep up the good work

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 22nd Nov 2006 23:18
Thank you.

In addition to what Kentaree has said, even with the password available you would then have to have the full file structure that you wish to decode and know if it has been compressed or not.

If anybody is particularly security conscious however, email me and I can make a special compile for you, so that files created with that plugin could only be undone with the same plugin.

Also would md5 commands be useful to anybody?

Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 22nd Nov 2006 23:23
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 23rd Nov 2006 22:01
Yay! Thanks . I got it to work now. The required include file somehow got deleted.

The only thing that can be better in this plugin (IMO) is the compression. With a 5-letter key: The compression for 3D meshes is great: 148 kb(original) to 8 kb(encrypted and compressed), but the image compression is just the opposite: 16 kb(original) to 200 kb(encrypted and compressed)!!!

What is wrong with the image compression?

Thanks

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 24th Nov 2006 00:01
I shall explain what the problem is. When DBP makes a memblock out of an image, it stores it in an uncompressed bitmap format which is large, and that is whats being compressed. This is a problem which I can do nothing to change. The alternative of course is to protect the image files themselves, and then extract them at runtime.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 24th Nov 2006 02:01 Edited at: 24th Nov 2006 02:02
Quote: "@Olby: Not necessarily, the key itself could be stored encrypted using a one-way hash which makes it very hard to crack even if you manage to find it in a file "

Er.. if the key is stored as a hash, then how does the program find out what the key is? Or does it decrypt the file using the hash? In which case, the hash is the key, and it can be found in the file.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Nov 2006 12:58 Edited at: 24th Nov 2006 12:59
...and if my auntie had testicles she'd be my uncle.

All these's if's are dependant on 2 things...you have someone who is willing to spend hours trying to decrypt the file, and you have a programmer who was daft enough to encrypt the files but couldn't be bothered to make a decent job of coding the key.



Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 29th Nov 2006 14:53
Batvink is right. I will be working on commands to help protect keys from being stolen, this will not be 100% foolproof as nothing is. I'll see what I can come up with.

Also, there seems to be a problem when protecting images that have been prepared for use as a texture. This problem is part of DBP itself and im not sure if I can fix it or suggest a workaround.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 29th Nov 2006 18:36
For the key, you could compile the exe, look through it in a hex editor, and find a few hex numbers that come up a lot, then work out the letters they produce, and use those letters in the key

Anybody searching the code would certainly ignore common hex numbers, and look for a unique number.

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 5th Dec 2006 16:48
MD5 functions almost complete. I don't know if making a hash of your key will make it more difficult to crack, but the functionality has more applications anyway so watch this space for the new version.

Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 12th Jan 2007 18:57
Any news Mnemonix ?

AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2
http://www.myspace.com/producerolby
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 12th Jan 2007 19:27
Nice one.

i emailed you about a personal key

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 12th Jan 2007 19:29
Hello. I haven't been working on the project lately as I have been practicing on the keyboard(musical). Prince of Darkness I got your email and I will be able to handle your request I think.

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 12th Jan 2007 19:30
Thank You.

i included the data where it is required for so you would see i am not just using it or asking it while im never going to have a real use for it.

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 12th Jan 2007 22:19
Not at all. Im glad that somebody is finding it useful

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 12th Jan 2007 23:11
hehe.

i was allready looking for something as this.

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 13th Jan 2007 03:51
umm i think theres a bug. I downloaded it put it in the place and loaded the demo it worked fine but i edited the file and changed the contents of "data.txt" to "oooo" loaded it and it still showed Verification SUCESS and loads the same text so it doesn't seem to do much.

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 14th Jan 2007 12:16
Everything works fine with me.

I modifided my editors source code and everything works fine.Thanks for this Great Plugin!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Jan 2007 13:11
This is an amazing plugin! But, are there any commands to see if a protected file is open? Or check to see if the protected files password is correct. (I think verify protected file does this).

-db

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 14th Jan 2007 23:51
@Kieran: read posts #14 and #15 of this thread...
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 18th Jan 2007 06:06
Perhaps a way to check if a file has ended?

-db


Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 17th Feb 2007 13:12 Edited at: 17th Feb 2007 13:12
Is this thread still alive?


Cheers,

-db


[href]www.tree3d.co.nr[/href]
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 17th Feb 2007 13:35
Lol,

there is no way to check if a file has ended unfortunately. You just need to make sure you find someway to keep the structure of your file intact

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 18th Feb 2007 03:08
ok.


Cheers,

-db


[href]www.tree3d.co.nr[/href] Tree3D Software... Because a 2D tree isnt good enough.
Ian T
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 18th Feb 2007 06:38
Quote: "This problem is part of DBP itself and im not sure if I can fix it or suggest a workaround."


Way to pass the buck, cheapo! I see what's really going on here
Juso
22
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 22nd Feb 2007 17:15
@Mnemonix

Very nice plugin, but compiled prog's size will increase about 570 kilos. Could you somehow make the dll smaller?
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 22nd Feb 2007 17:26
Well, not really. We live in the age of broadband when 570kb might add 3-5 extra seconds on to the download. Sorry, but I can't really make it smaller

Juso
22
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 22nd Feb 2007 18:01
OK, I thought the dll could be cut to smaller (simple) pieces. I need to load only 1..2 megas so 570 k is much

Login to post a reply

Server time is: 2024-11-17 17:17:04
Your offset time is: 2024-11-17 17:17:04