It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
Gersen: It's not trivial as it requires them to create new installers, test/debug them, then change all the currently existing ones, etc.. compare that to simply adding a new label of a web page
Any proper solution to this mess will require them to change installers, yes. But it's a trivial change nevertheless. I don't see a need to limit the effort to cosmetic fixes. GOG created the mess, they can as well fix it.
Post edited December 31, 2014 by shmerl
avatar
shmerl: Any proper solution to this mess will require them to change installers, yes.
Why ? if they provide an easy way to obtain the password what is the problem ? there is no "restriction" at all as anybody who care about it will be easily able to do whatever they want with the installer files ?

avatar
shmerl: But it's a trivial change nevertheless.
You have a strange definition of trivial...
Post edited December 31, 2014 by Gersen
avatar
shmerl: Any proper solution to this mess will require them to change installers, yes.
avatar
Gersen: Why ?
Because there is no need in these passwords, that was already explained. And they don't serve their purpose. So proper solution is removing them and doing whatever is needed to actually properly address Gowor's concerns.
avatar
Gersen: You have a strange definition of trivial...
Rather simple one. Non trivial problem requires intensive engineering and complex design. Swapping RAR with 7z or removing a password from it and changing file extension to something else with adding a few HTTP server configs is trivial. Implementing it can take time, sure (to repack all existing installers). But the change is trivial. If it fixes GOG's situation with going against their core value - that effort taken is worth it.
Post edited December 31, 2014 by shmerl
avatar
Gersen: Why ?
avatar
shmerl: Because there is no need in these passwords, that was already explained. And they don't serve their purpose. So proper solution is removing them and doing whatever is needed to actually properly address Gowor's concerns.
Okay, we’ve ran full circle here. Please don’t start another round yet, I thought you both already agreed to disagree on the fate of the password check.
Removing the password check is an alternative, putting it on the game page is another, why can’t we just discuss *both* of them without trying to invalidate a solution or the other? That’s what I hoped when I opened this thread, and I like to think we can still do this without turning this into a clone of the first thread. Please?
avatar
vv221: Please?
Ok.

So personally I think that one the most realistic solution would be :

For GoG to offer an easy way for users to obtain the game ID (for example on the game page) which would in turn allow them to easily obtain the password.

PROs

- No change in the installer.
- Minimal cost for GoG (repacking all the installers would take a lot of time which for a business is pretty important, often more important than the actual complexity of the task)
- Keep the "dumb" user protection.
- Allows "power users" from easily generate the password (and for example save it in a TXT file with the installer or in a DB).
- For users : no need to re-download "fixed" installer, they can keep the password protected installer and just save the password.
- "Power users" won't even need to use InnoExtract, they will simply need a RAR extractor on their OS of choice.

CONs

- The installers are still "password protected". (but personally I fail to see that as a real "technical" issue as, if the password is easily obtainable/savable by "power users" there is no longer any restriction on what peoples can to with the game files)
Post edited December 31, 2014 by Gersen
avatar
Gersen: - Minimal cost for GoG (repacking all the installers would take a lot of time which for a business is pretty important, often more important than the actual complexity of the task)
Stop defending them. It doesn't take shit. A student could repackage everything in a few weeks.
avatar
Gersen: For GoG to offer an easy way for users to obtain the game ID (for example on the game page) which would in turn allow them to easily obtain the password.
Don’t you think it would be even better to directly provide the password, rather than a way to get it assuming you know how to compute a MD5 hashsum? Less hassle, all the better!
avatar
vv221: Don’t you think it would be even better to directly provide the password, rather than a way to get it assuming you know how to compute a MD5 hashsum? Less hassle, all the better!
It was mostly to make it "harder" for "dumb users to get the password "by accident" (i.e. copy an pasting it). If peoples get the ID, compute the hash and then use the hash as a password for the RAR then you can can expect that hopefully they know what they are doing ;-)
Post edited December 31, 2014 by Gersen
avatar
Elenarie: Stop defending them. It doesn't take shit. A student could repackage everything in a few weeks.
Or a script can do it, and a student can write it in a day ;)
avatar
shmerl: Or a script can do it, and a student can write it in a day ;)
I doubt your script will be able to also install the games and test that they work correctly with the new installer...let's not forget that we are not talking about zipping a bunch of files, you also have to do some QA.
avatar
shmerl: Or a script can do it, and a student can write it in a day ;)
avatar
Gersen: I doubt your script will be able to also install the games and test that they work correctly with the new installer...let's not forget that we are not talking about zipping a bunch of files, you also have to do some QA.
If GOG organized their workflow effectively, they already have automated tools for installing and verifying the result. It's not that uncommon. So changing something in the workflow requires just reconfiguring those tools accordingly. Of course if their QA is all manual it will require more work. Nothing insurmountable anyway, and as I said it's worth the effort if it touches on their core values. They had much more major changes that they had to address in the past (like regional pricing and so on).
Post edited December 31, 2014 by shmerl
Ok, here are all of the technical solutions I'd suggest using in concert, in their most recent (most considered) forms:

First, if you want to prevent ignorant users from attempting to open the installers the wrong way but you want to appear benevolent, my advice is to apply three protections in concert:

1. Choose a custom file extension like .gogpiece (BIN is heavily overused and, as I remember, VLC associates with it to support certain MPEG-1 era MPEG files)
2. Customize (but don't change the length on) the 7-byte constant header prefix in your RAR files so WinRAR won't recognize them. This should make your unrar.dll simpler to customize and maintain since, unless unrar.dll is built from the most insane code on the planet, it's likely to be simply a matter of editing a single const char[] line. (Might I suggest replacing the "Rar!" in that header with "Gog!"?)

Here are some lines you can incorporate into your workflow, with or without modification, to enable and disable the protection, respectively:

python -c 'with open("setup_some_game-1.gogpiece", "r+b") as fobj: fobj.write(b"Gog!\x1a\x07\x00")'

python -c 'with open("setup_some_game-1.gogpiece", "r+b") as fobj: fobj.write(b"Rar!\x1a\x07\x00")'

They're simple, they execute in a split second, and they're even harder to mistake for DRM than using the old, proprietary InnoSetup packing which required a custom extractor to be written.

3. Use appropriate HTTP headers to opt out of Internet Explorer content sniffing as an extra layer of protection, just to be safe:

Content-Type: application/x-gog-binary
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename=whatever.gogpiece

4. (optional) Write a simple dxdiag-like information-gathering tool to include in GOG installs. Modify the GOG support form so that, to be eligible for post-install support, Windows users must attach the tool's output. Write the tool so it checks for registry keys that only exist if the InnoSetup installer was run. If it can't find them, tell users that their install is broken and post-install support won't be provided until they do it properly.

(In other words, force Windows users requesting support to run an automated version of the "is it plugged in?" step on the troubleshooting checklist. That way, you're not restricting what they paid for... you're just making a rule about the form a support request must take. It's also a good place to put Windows version checks and "is it Wine?" checks if you think users are lying to support to get undeserved help.)

UPDATE: You could also incorporate hash checks for all installed files, if you wanted, so the tool would be able to diagnose missing or corrupt files in the install without users even having to contact GOG.

Second, if you want to extend the digital signature's validity check to the RAR, you need a mechanism that will verify the RAR's validity using something stored within the EXE. (Based on either a secure one-way hashing function or asymmetric crypto so that the tools required to forge it are not available to recipients)

The simplest solution would be to store an SHA1 or SHA256 hash of the RAR in the EXE, but that would prevent the rapid iteration you desire unless you iterate on a debug build without it and then make a release build with it.

The more correct solution (though one which would take longer to implement) would be to include a public key in the EXE and a signed manifest of expected contents in the RAR. That would allow you to change the RAR all you want as long as you have the private key to sign new manifests.

Then, Windows would verify the EXE's signature, the EXE would verify the manifest's signature, and then it could use the manifest to verify that the rest of the RAR's un-encrypted contents hadn't been tampered with.

(Security is hard, because you need to think of everything but they only need to find one thing you missed. However, That "chain of trust" design is used all over the world to protect things. It's how TLS/SSL certs are verified, it's the same approach that things like smartphones and consoles use to make their DRM robust, and the same approach Secure Boot relies on for a verified system. As long as you verify every file and the only C/C++/Pascal you change is the string constant which defines what a RAR header prefix looks like, InnoSetup and UnRAR's mature codebases should be and remain bug-free enough to ensure that attackers can only circumvent the checks by convincing users to disable or ignore them.)
Post edited January 08, 2015 by ssokolow
avatar
shmerl: Nothing insurmountable anyway, and as I said it's worth the effort if it touches on their core values. They had much more major changes that they had to address in the past (like regional pricing and so on).
And that's why I listed that in the "pros" because no matter if it's "insurmountable" (which is something relative) or not, not having to do it at all while at the same time being providing to Linux users the possibility to extract their installer easily like before is definitely an advantage of the solution.
avatar
ssokolow: ...
InnoSetup is not proprietary.
I'll also repost here a comment from @Eldarby (from the wishlist):

Stupid move, for many reasons.

1) It won't prevent file tampering and it won't aid integrity validation. That's simply not possible, passwords and encryption don't do that, they aren't meant to do that. I could easily download one of these RAR installers, use the publicly-available cracked password to unpack it, mess around with the files, repack it into an executable installer and then release it into the wild. Sure, GOG's digital signature won't be there anymore, and guess how many copyright violators really care about that warning? Absolutely zero, I assure you. Fun experiment: If anyone wants to make a proof of concept without being an evil botnet-building asshole, here's how. Unpack one of these encrypted RARs using the method I described earlier. Then just drop an empty file called "modified.txt" somewhere in the directory structure, repack it like I described, and upload it to a torrent site. Most BitTorrent trackers let you see the file listing of a torrent without even downloading it, so you can just keep an eye on how many copies of Assassin's Creed (or whatever you chose) with "modified.txt" in the directory structure are being seeded and +10/+10'ed in the comments.

2) Digital signatures, combined with hash verifications (multiple hashes if you want to be sure, and please for the love of all that is holy don't use MD5,) will do more to help people validate their downloads than this misguided encryption/password scheme could ever accomplish. It would also help if GOG's signing key were published clearly on their website and on multiple public keyservers.

3) If GOG is really concerned about tampering, they should be providing hashes for ALL of their downloads, including their Mac and Linux installers and tarballs. Nearly every Linux distribution does both hash checking and digital signature verification in their package managers, and it's something we've come to expect more and more from our software distributors. Shouldn't all users be worthy of GOG's efforts to protect them from file tampering? Forget BitTorrent for a moment and consider that I could download something 100% legitimately from my GOG account and still get a tampered-with file if someone on my network is conducting a Man-in-the-Middle (MitM) attack, but I'd be a little safer from that if I could validate my downloads based on hash and signature.

4) By encrypting the installer, the file will become larger and the download will take longer. Anyone with a UBB (Usage-Based Billing) ISP subscription will face larger fees for downloading these files than if they were not encrypted, due to their increased size. Anyone on slower, narrow-band connections will face longer download times and risk packet loss, premature disconnection and other inconveniences. Since, as I mentioned many times, password protection and encryption do not prevent file tampering, nor do they aid integrity validation, this only adds extra burdens to the legitimate customer.

GOG, you must reconsider this decision. You really don't appear to have it all together, perhaps you should consider hiring more people with expertise in security and file packaging, this really is feeling more and more like a seat-of-your-pants operation and less of a business. Smaller, more deliberate steps, guys.

And next time, please just ask us if we'd be okay with this sort of thing before just up and deciding to make a big move like this. As you can probably tell, some of us here know our shit. We would have been more than happy to freely consult with you over this and provide our input and ideas, so that we can work towards a solution that makes all of us happy. Reach out a little more, will you?
Post edited December 31, 2014 by shmerl