Results 1 to 10 of 10

Thread: crypto thought crackme #2

  1. #1
    הבּרוּ נשׂאי כּלי יהוה mike's Avatar
    Join Date
    Mar 2001
    Posts
    491

    crypto thought crackme #2

    A protector has decided to code his serial number verification scheme in Iota, so it's all interpreted minimalistic code. Not much of a chance of understanding it. You know that all it does is a simple string compare to some unknown value, so the pseudocode looks like this:
    Code:
    for (i=0; i<len; i++)
        if (myserial[i] != trueserial[i]) return false;
    return true;
    Since you can get an iota interpreter, you can take his code and run it on whatever serial numbers you want without having to type them in.

    You have no idea how long the serial number is.

    How do you break this?

  2. #2
    Simple, a timing attack.

    Brute force each character, one at a time from 0 to i. When a character is correct, it will take longer to run as the loop will execute at least one more time. This reduces the brute forcing to O(256*i) assuming Iota uses 8-bit ASCII characters.

  3. #3
    הבּרוּ נשׂאי כּלי יהוה mike's Avatar
    Join Date
    Mar 2001
    Posts
    491
    Right!

    What do people think--should posters ROT13 their answers or something, so that others that aren't so quick can try their hand? Or should I just make them harder? Or both?

  4. #4
    Teach, Not Flame Kayaker's Avatar
    Join Date
    Oct 2000
    Posts
    4,085
    Blog Entries
    5
    Ebg13 vf cebonoyl abg n onq vqrn!
    Rot13 is probably not a bad idea!

    BTW Mike, these are great, thanks

  5. #5
    FoolFox
    Guest
    Hello,

    Very interesting samples you gave us, I would personnally
    prefer if people just pm you the solution they found and you
    wait few days to post the good ones... I'm very interested to
    have the solutions if I can't find out how to do but i'm
    likely to search a bit by myself first...

    Don't know if Rot13 would be sufficient... quite easy to
    sort out....

    Regards
    FoolFox
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  6. #6
    Red wine, not vodka! ZaiRoN's Avatar
    Join Date
    Oct 2001
    Location
    Italy
    Posts
    922
    Blog Entries
    17
    Hi All!

    FoolFox, I do not like too much the idea of sending the answers to Mike, it creates a sort of limit to the spirit of these projects.
    Often, a problem can be solved in many manners and, in these cases, talking about the various approaches to the problem and comparing the various solutions can be useful.

    The idea of the rot13 is interesting but in the long run it could turn out heavy to converse in this way.
    Perhaps, for every crypto_experiment, we could create two threads where in the second we will only put the solutions; but, I do not know if it is the better thing to make...

    MnvEbA (ernql gb fcrnx va ebg13 )

  7. #7
    Lost in Lala Land peterg70's Avatar
    Join Date
    Oct 2001
    Location
    Down Under
    Posts
    195
    Mike

    Your making me think. (Not sure if this a good thing or a bad thing)
    Keep them coming.

    It certainly makes someone think differently. I think we study the minutie rather than the whole picture.

    Catch ya around
    peterg70

  8. #8
    FoolFox
    Guest

    Talking Ernql, frg, TB!

    Hi,

    Yeah, Zairon, I agree with you that showing various
    responses could help other's to think, and someone may
    very well came up with something anybody else thought
    about...

    Well, dunno, two thread could be nice but how be able
    to know if a message should be posted in the discussion
    or the solution one ?...mmm... this may make thing less
    clearer than we may want at first....

    For me, as long as i'm able to learn something, I'll deal
    with it

    Regards
    FoolFox
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  9. #9
    הבּרוּ נשׂאי כּלי יהוה mike's Avatar
    Join Date
    Mar 2001
    Posts
    491
    Don't know if Rot13 would be sufficient... quite easy to
    sort out....
    The idea of rot13 isn't to make it hard, just to keep from spoiling the fun. If you have an idea that you think might work on part of the problem, it's ok to post it in cleartext. If you know your solution busts the thing wide open, rot13 it. I'll leave it to the posters to decide which one is appropriate.

  10. #10
    Hey all,

    Sorry I posted so quick! I didnt' mean to spoil it for everyone. Just thought I'd answer and let everyone learn a little. Heh, I also didn't realize I had posted only an hour and change after mike.

    I'll keep my mouth shut a bit longer next time

    BTW, for those of you wondering how I knew the answer, it comes from research done on smartcards. I was working on one of the crackmes in the REA reverser course that was simulating a smartcard, so I got curious and looked up a little bit on them. This timing attack is used on some smartcards and other security hardware.

Similar Threads

  1. crypto thought crackme #6
    By mike in forum Mini Project Area
    Replies: 18
    Last Post: May 29th, 2006, 00:40
  2. crypto thought crackme #5
    By mike in forum Mini Project Area
    Replies: 12
    Last Post: January 22nd, 2003, 17:52
  3. crypto thought crackme #4
    By mike in forum Mini Project Area
    Replies: 4
    Last Post: January 18th, 2003, 02:58
  4. crypto thought crackme #3
    By mike in forum Mini Project Area
    Replies: 7
    Last Post: January 15th, 2003, 15:32
  5. crypto crackme thought experiment
    By mike in forum Mini Project Area
    Replies: 12
    Last Post: January 8th, 2003, 22:43

Bookmarks

Posting Permissions

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