Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sun Apr 11, 2021 10:26 am

All times are UTC

Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Dec 16, 2020 4:47 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12076
A couple of days ago I was thinking about a way for generating endless versions of the same script to avoid filters and blocks of the file hosting service.

  • text output
  • no password
  • hash checking the content
  • able to be decrypted even if splitted in multiple lines

I was surprised that it was so easy to do it:

The format is very simple:
  • 32bit flags
  • 32 bytes random key
  • 16 bytes random ivec
  • NUL-delimited hmac sha1 hash of the original content
  • encrypted data of the compressed file

The hmac hash is based on the key and the content of the file, since the key is ever random also the hash will ever change
For the encryption I opted for AES 256 CTR, where the CTR mode avoids the annoyances of handling the padded blocks: encrypted length == decrypted length.
For the compression I opted for zlib.
The flags field is currently unused, I just left the first bit set to zero for future usages.

The script works with ANY file, not just bms scripts, therefore you can use it with any content.
Just remember that the script automatically decrypts the files with the TXT extension, while the files with any other extensions will be encrypted... better to have one script doing the job instead of two separate scripts for encryption and decryption.
And remember to not use it with big files.

The goal is not protecting the content (there is no password) but just eluding any check on the file hosters in case your scripts are blocked or their format is not accepted and you need a 100% textual content.

I attached 3 examples of generated files plus the original one (the current script for Cyberpunk 2077, no particular reason).

Looking for your feedback!

File comment: Third generated output
cyberpunk_2077.bms_00000002.txt [1.36 KiB]
Downloaded 50 times
File comment: Second generated output
cyberpunk_2077.bms_00000001.txt [1.36 KiB]
Downloaded 45 times
File comment: First generated output
cyberpunk_2077.bms.txt [1.36 KiB]
Downloaded 46 times
File comment: Original bms script
cyberpunk_2077.bms [2.43 KiB]
Downloaded 45 times
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited