Results 1 to 6 of 6

Thread: Another way to bypass initrd?

  1. #1
    Join Date
    Feb 2003

    Another way to bypass initrd?

    I have used a method to bypass checksums in various devices using the following system and it may be applicable to the initrd bypass.

    Basically what you do is instead of replacing initrd you modify it. You change one or two of the asm instructions to jump past the offending code, now of course this will generate a checksum problem. For the sake of this discussion lets say that you need to change 2 bytes to branch or jump to another spot in initrd, past some offending code. You pick 2 bytes from the offending section and use those 2 bytes to modify the jump/branch. You then take the original 2 bytes that you modified and insert them into the code segement that you bypassed (in the same spot you "stole" the 2 bytes from). The code in the bypassed segement might not make sense anymore, but thats OK since it never executes. Basically what you are doing here is swapping 2 bytes in the module. Carefully choosing the bytes from the bypassed segement and exchanging them with the code you need to modify. Since you have not really changed the file, only rearranged it, the signature/checksum remains valid.

    I am not real clear on signature generation for these units, however as long as the absolute positional information is not contained in the signature it should work. It seems as though some members here could test this theory much quicker than I

  2. #2
    Join Date
    Aug 2003
    MuscleNerd explains that its not a CRC chec but an El Gamal in this thread where someone else has the same idea.

    This concept demonstrates alternative thinking. I think that some people have tried to brut force the private key to no avail.

  3. #3
    Join Date
    Jul 2003

    Not probable

    While any security system can be broken, The initrd checks evidently use something much stronger than crc checksums..

    This subject was discussed in-depth in this thread..

    (Sleeper we must have clicked send at the same time, you beat me by one minute......)

    Last edited by tivomaster; 11-26-2003 at 10:34 PM.
    Four Hacked HDVR2's,
    One Still slightly confused Hacker,
    4 dogs, 8 cats, and 1 wife that is happy as long as I don't screw up her TiVo ...... Oh yeah two grandchildren that are the light of my life!

  4. #4
    Join Date
    May 2002
    Sleeper and tivomaster are's a little more detail.

    Let's be loose with terminology and call the verification of initrd's integrity a "checksum". If that checksum were computed simply by, say, iterating over every byte in the image and adding it to some total, and then checking that total..then your plan would work.

    But the El Gamal encryption/signature/"checksum" that is actually used to check initrd's integrity is much more sophisticated. Any alteration in the byte stream, including just swapping bytes or bits around, will cause the signature check to fail.

    In theory, there likely exists a modification that would both render initrd useless *and* still satisfy the signature check. ...but it is very very very computationally intensive to determine it (which is the point of encryption, of course). Assuming you don't have a miraculous stroke of luck, the expected time it would take to brute force that approach would take many years. Part of the slowdown is the need to recompute the sha1 hash of the image on every iteration (you can't reuse any results from one iteration to the next).

    On the bright side, we should be happy that encryption provides this sort of security. Otherwise, we'd all be in a world of hurt with our ATM withdrawals, secure SSL web transactions, etc...which all use encryption to both hide data and verify it hasn't been tampered with.

    But when quantum computing becomes practical, all bets are off....all of this encryption relies on certain intrinsic difficulties dealing with factoring large numbers and determining primes, which quantum computing will cut through like warm butter.
    Last edited by MuscleNerd; 11-26-2003 at 11:02 PM.

  5. #5
    Join Date
    Aug 2003

    I posted some additional thoughts on this in the above referenced thread. Could you kindly elaborate on them there?

  6. #6
    Join Date
    Jul 2003

    Re: Another way to bypass initrd?

    Originally posted by Tiros
    You change one or two of the asm instructions to jump past the offending code
    BWAHAHAHA, why don't we just do that and call it the "PROM hack"?

    It sounds like you work on systems designed by complete idiots, because they allowed execution of unchecked code which the user could easily modify, and used silly checksum algorithms. Tivo has made a lot of stupid mistakes but this was not one of them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts