Practicality of Brute-Forcing CRC32
-
There's a game that uses Zip files to store its data. The file I want to edit is full of text files. The thing is, if the CRC32 value changes, then the game refuses to load. So, I had a great idea: 1. Get the CRC32 value of the file. We'll refer to it as X. 2. Make some changes to the file. 3. Get the new CRC32 value of the file. We'll refer to it as Y. 4. Append a byte to the end of the file. 5. Resume calculating the CRC32. (We do this for every bytes added, and we can resume from the previous value so we don't have to calculate from the beginning.) We'll call this value Z. 6. If Z = X, stick it back into the Zip file and play the game. Otherwise, go back to step 4. In the worst case scenario, step 4 will run about 4 billion times before it finds the bytes that gives the same CRC32 value. Does anyone think this is practical? Is there a more efficient way?
ROFLOLMFAO
-
There's a game that uses Zip files to store its data. The file I want to edit is full of text files. The thing is, if the CRC32 value changes, then the game refuses to load. So, I had a great idea: 1. Get the CRC32 value of the file. We'll refer to it as X. 2. Make some changes to the file. 3. Get the new CRC32 value of the file. We'll refer to it as Y. 4. Append a byte to the end of the file. 5. Resume calculating the CRC32. (We do this for every bytes added, and we can resume from the previous value so we don't have to calculate from the beginning.) We'll call this value Z. 6. If Z = X, stick it back into the Zip file and play the game. Otherwise, go back to step 4. In the worst case scenario, step 4 will run about 4 billion times before it finds the bytes that gives the same CRC32 value. Does anyone think this is practical? Is there a more efficient way?
ROFLOLMFAO
If you really feel so inclined, learn some assembler and change the game to not check the CRC. Ive done a few "hacks" like this a while back, but then the game executable was not compressed, etc. As to your approach, seems like a fine way to do it (albeit a bit slow, I would think). But, IIRC there are algorithms taht can predict what you need to cahnge/add to get a specific CRC value given you current data.
:badger:
-
There's a game that uses Zip files to store its data. The file I want to edit is full of text files. The thing is, if the CRC32 value changes, then the game refuses to load. So, I had a great idea: 1. Get the CRC32 value of the file. We'll refer to it as X. 2. Make some changes to the file. 3. Get the new CRC32 value of the file. We'll refer to it as Y. 4. Append a byte to the end of the file. 5. Resume calculating the CRC32. (We do this for every bytes added, and we can resume from the previous value so we don't have to calculate from the beginning.) We'll call this value Z. 6. If Z = X, stick it back into the Zip file and play the game. Otherwise, go back to step 4. In the worst case scenario, step 4 will run about 4 billion times before it finds the bytes that gives the same CRC32 value. Does anyone think this is practical? Is there a more efficient way?
ROFLOLMFAO
Ri Qen-Sin wrote:
Does anyone think this is practical? Is there a more efficient way?
Yes: discover where the game stores the "original" CRC and update it too when you change the file :)