Loading Ogre3D assets from password-protected ZIP files
- skinkairewalker
- Enthusiast
- Posts: 772
- Joined: Fri Dec 04, 2015 9:26 pm
Loading Ogre3D assets from password-protected ZIP files
I would like to request, within reasonable possibilities, the inclusion of password-protected .zip asset loading (textures, sprites, 3D models, sounds, music, Ogre materials, shaders) in the Ogre3D ecosystem to help prevent asset theft or unauthorized copying.
Re: Loading Ogre3D assets from password-protected ZIP files
IMHO:
Don't waste your time, a password protected zip is easy to crack, as always... is better to focus in make a nice game and don't worry about the assets
Don't waste your time, a password protected zip is easy to crack, as always... is better to focus in make a nice game and don't worry about the assets

Re: Loading Ogre3D assets from password-protected ZIP files
Agreed, there are just so many attack vectors with zip files, even password-protected ones, from using JTR to crack passwords to breakpointing libzip's zip_set_default_password function to many others. This isn't just theory either, I've done this myself on numerous games.
- skinkairewalker
- Enthusiast
- Posts: 772
- Joined: Fri Dec 04, 2015 9:26 pm
Re: Loading Ogre3D assets from password-protected ZIP files
But I think it's a bit discouraging that assets are left loose in game files, even for laymen.
Re: Loading Ogre3D assets from password-protected ZIP files
Then write your own solution. I'm a reverse engineer and my motto is that you don't have to make it impossible to break, you just have to make it so annoying that I won't want to bother. E.g. give each file its own encryption key derived from a hash of the file, or embed them in an encrypted pack in a datasection so I can't strings it and figure out what pack format you're using. There are many solutions, but a universal solution built-into PB is how a tool to get all game assets from any PB game gets written.skinkairewalker wrote: Wed Feb 26, 2025 7:40 pm But I think it's a bit discouraging that assets are left loose in game files, even for laymen.
Re: Loading Ogre3D assets from password-protected ZIP files
You can embed them all into your exe file with IncludeBinary, then Catch() them from it at runtime. No need to have them on disk at all. I do that for my app, which has icons, pngs, wav files, etc. One single exe and nothing written to disk. The assets must have a corresponding Catch() command, though.skinkairewalker wrote: Wed Feb 26, 2025 7:40 pmI think it's a bit discouraging that assets are left loose in game files
Re: Loading Ogre3D assets from password-protected ZIP files
I use this method in my app too, but since we now have the amazing CatchPack() command since 6.10, I just opt to pack all my apps data into a BreifLZ pack and IncludeBinary it in a DataSection then CatchPack it. That way I don't need to manually keep track of files. There are lots of options, but like I said previously, I don't think adding this support natively to PB is a good idea, because it would give developers a false sense of security while some people probably already wrote a generic program that can crack any password-protected zip from a PB game like a week after the support got added.BarryG wrote: Thu Feb 27, 2025 2:22 am You can embed them all into your exe file with IncludeBinary, then Catch() them from it at runtime. No need to have them on disk at all. I do that for my app, which has icons, pngs, wav files, etc. One single exe and nothing written to disk. The assets must have a corresponding Catch() command, though.
- skinkairewalker
- Enthusiast
- Posts: 772
- Joined: Fri Dec 04, 2015 9:26 pm
Re: Loading Ogre3D assets from password-protected ZIP files
I understand, but at least there could be the possibility of using catchMesh(meshdata(), SkeletonData(), MaterialData()) or something along those lines of thinking…Quin wrote: Thu Feb 27, 2025 3:13 amI use this method in my app too, but since we now have the amazing CatchPack() command since 6.10, I just opt to pack all my apps data into a BreifLZ pack and IncludeBinary it in a DataSection then CatchPack it. That way I don't need to manually keep track of files. There are lots of options, but like I said previously, I don't think adding this support natively to PB is a good idea, because it would give developers a false sense of security while some people probably already wrote a generic program that can crack any password-protected zip from a PB game like a week after the support got added.BarryG wrote: Thu Feb 27, 2025 2:22 am You can embed them all into your exe file with IncludeBinary, then Catch() them from it at runtime. No need to have them on disk at all. I do that for my app, which has icons, pngs, wav files, etc. One single exe and nothing written to disk. The assets must have a corresponding Catch() command, though.
It would be very interesting if Ogre3D in PureBasic had support for Catch() functions… or added support for other types of compression, as Quin mentioned: BriefLZ and others like LZMA, Jcalg1, Zip, and Tar (and allowing password protection for them).BarryG wrote: Thu Feb 27, 2025 2:22 amYou can embed them all into your exe file with IncludeBinary, then Catch() them from it at runtime. No need to have them on disk at all. I do that for my app, which has icons, pngs, wav files, etc. One single exe and nothing written to disk. The assets must have a corresponding Catch() command, though.skinkairewalker wrote: Wed Feb 26, 2025 7:40 pmI think it's a bit discouraging that assets are left loose in game files
- skinkairewalker
- Enthusiast
- Posts: 772
- Joined: Fri Dec 04, 2015 9:26 pm
Re: Loading Ogre3D assets from password-protected ZIP files
But aren’t Zip algorithms currently protected with AES-256? If so, the attack is pretty much null, except in cases of social engineering…Quin wrote: Thu Feb 27, 2025 3:13 am There are lots of options, but like I said previously, I don't think adding this support natively to PB is a good idea, because it would give developers a false sense of security while some people probably already wrote a generic program that can crack any password-protected zip from a PB game like a week after the support got added.
But if PureBasic’s Zip algorithm only supports ZipCrypto, then I would agree!
Re: Loading Ogre3D assets from password-protected ZIP files
How would this help?
Commonly game hacks hook the renderer and manipulate the models (for ex. see them through walls).
Extracting/logging model and texture data through the render pipeline is not much different.
But having something like #PB_3DArchive_Memory would be very useful in general.
Commonly game hacks hook the renderer and manipulate the models (for ex. see them through walls).
Extracting/logging model and texture data through the render pipeline is not much different.
But having something like #PB_3DArchive_Memory would be very useful in general.
Re: Loading Ogre3D assets from password-protected ZIP files
Perhaps, but encryption is null and void if I can breakpoint the function where you set the password and inspect the stack.skinkairewalker wrote: Thu Feb 27, 2025 5:14 am But aren’t Zip algorithms currently protected with AES-256? If so, the attack is pretty much null, except in cases of social engineering…
But if PureBasic’s Zip algorithm only supports ZipCrypto, then I would agree!