I am currently working on a software challenge where you have to unlock several functions of a piece of software. The software is written in Java. One of them is the update mechanism of the firmware. What it does is to download a file from a webserver and make a few checks, before the update is performed. I need to find a way to overcome these checks in such a way, that I am able to update the firmware using my own created firmware update.

Here is how the update mechanism works:

  1. The software downloads a file from the webserver. It is a zip file which should have the following structure:

    |Zip file content| SecurityTag: | Tag|
    • Zip file content: This is where I have to add a file, called version.txt which needs to contain a number x > 1.0. (The software reads that part as ZipInputStream.)
    • SecurityTag: This is a string, which has to be within this file! I cannot modify that one.
    • Tag: The Tag which is used during the check.
  2. It takes the Zip file content, checks if the version.txt file is included and extracts the number from it.

  3. It hashes the Zip file content using hash = MD5(Zip file content)

  4. Takes the tag and decrypts it using RSA: t = (tag)^e mod N. I know e and N.

  5. It verifies if hash == t

Somehow, I have to pass this check but I am not sure how. I started to look into different kind of attacks but none of it seemed like suitable in order to overcome that check.

Is there any attack scenario which I am missing here? Can anyone point me in the right direction?

  • I don't understand what the problem is. What have you tried and why did it fail? Because from what you showed, it seems absolutely doable.
    – MechMK1
    Apr 11 '19 at 11:33
  • My problem is that I don't have any idea on how to do it. I am stuck at step 5, where I need to have a tag, which decrypted will result in the hash. I know the public key e but don't know the secret key d. I check signature forge attacks but I think that those do not help me here.
    – Donut
    Apr 11 '19 at 11:39
  • cross posted to crypto.stackexchange - it appears to be more on-topic for us then there, so I recommend closing the question on this site.
    – Ella Rose
    Apr 12 '19 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.