Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29

Thread: stream cipher???

  1. #16
    I was working on AudioSphere(tut on tsehp's site) and coded one MD5 bruteforcer.Its MD5 function is well optimized for pentium cpus.If you knw some bytes from what it except maybe you can find.
    You can download md5bruteforcer source code from
    http//mrstop.host.sk/files/md5brute.zip

    My source code is very messy and it contains more than one MD5 mplementation to test their speed.Anyway hope it helps.
    "There is only one road to human greatness: through the school of hard knocks." Albert Einstein

  2. #17
    Hi Dakien,

    Hee.. think we have the greatest communication skill.. (ok enuff sarcasm) .. just kidding.... nah ah well.. just that i probably neva make efforts to make myself clear... I meant make patches to reinstall the program functionalities, not patching the TEA bits :>

    Yep.. THANK YOU for your insight... I was probably too scared of MD5 reputation to poke aroudn with it... but i think i have decrypted everything.. the decrypted results looks fairly promising as it is almost identical with my conjectured resutls (aka : flag, offset, size).
    i actually spent 1 hr going through IDA disassemly and locate the invalid code section :>

    Cheers...
    Shall test the decrypted program now... :>

  3. #18
    Thanx Laptonic, downloaded your source code and took a look at it, man you really should at least put some comments in there :>.. guess i am really a newbie at coding in asm... well i'll try to put the comment in myself :>...

    Just wanna check with you how fast is this algorithm? can it really break MD5? (I thought it is unbreakable?) guess i will have to try Audio Sphere to figure this one out... i cant make sense of the text file as it is in some unknown language...

    Dakien : yeah, thanx for pointing me to the right direction... i have got it all done now.. thanx for your prompt response, fly down to UK and i will buy u a beer :>... (or even TWO if you wish :>)

    Regards,

  4. #19
    I have added some comments to code and updated zip file.I am not good commenter but it is better than nothing
    "There is only one road to human greatness: through the school of hard knocks." Albert Einstein

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

    decryption

    Hi Mike,

    Its main purpose is to decrypt code i suspect but here is how it works, it decrypts a table of 9C size with the following format

    Flag VA, Code to be decrypted offset, length (3 qwords)
    (repeat D times)

    Then it use the same routine above to decrypt each section of the code in similiar fashion...

    That means that the first byte of each qword is always 00, also the length should not be too big so first dword of length should be also 0000... however this doesnt help much yet as i dont have the exact decrypted table... i am looking for encrypted area in the code to kind of guess the teh decrypted table but again, not sure if it helps at all cos we still need to bruteforce to find the key...

    That is all for now
    Lemme see if I've got this straight:

    The program takes a password, MD5 hashes it to get a key, uses TEA to decrypt some code which is later executed. 'zat right?

    Do you have a working password? If you do, then it's the same as unpacking, essentially.

    If not, then there's probably a password check in there somewhere that you can use with a dictionary. What does the program do when you type in a wrong password?

    MD5 is used sometimes on unix & linux I think, so there is probably md5 hashing built into the better cracking programs, but it won't help you much: if you knew the hash, you'd know the key to use! So I only mention it because you could get one w/ source and use that as a basis for coding your own attack. Laptonic's code works just as well for this, I bet.

    The password check is either going to be some kind of checksum of the hash or it'll try to use that key to decrypt known plaintext. Follow the code to the pointe where it branches to pop up the error box & you'll have everything you need for a dictionary attack.

    You can't bruteforce MD5, but if you know something about the passwords (like, are they single english words? a big honkin' serial string? what?) you might be able to brute force the space from which the passwords were selected.

    Good luck. I'm glad the quality of the threads in this group has improved so much lately!

    --mike

  6. #21
    ***************************************
    Lemme see if I've got this straight:

    The program takes a password, MD5 hashes it to get a key, uses TEA to decrypt some code which is later executed. 'zat right?
    ****************************************

    Yep :>


    ****************************************
    Do you have a working password? If you do, then it's the same as unpacking, essentially.
    ****************************************
    Erm no... :>.. i dont have any stolen credit card :>


    ****************************************
    If not, then there's probably a password check in there somewhere that you can use with a dictionary. What does the program do when you type in a wrong password?
    ****************************************

    The program crashed with a nice crashed log and a messagebox saying that i should automatically send a message to Elcomsoft :>...


    *****************************************
    Good luck. I'm glad the quality of the threads in this group has improved so much lately!
    *****************************************

    Thanx for your replay, albeit a bit late, as Dakien has pointed me to the right direction to find the TEA key hardcoded!!!!!... Hee, you will see more questions from me soon now that i am touching my hand on all this crypto stuff.... kinda exciting...

    Regards,

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

    hardcoded key

    Yeah, I kind of expected that. Most often, crypto is used for obscuring data in copy protection schemes, and doesn't actually depend on data that the user enters. So it's more like unpacking than anything else.

    Would you be willing to tell how you figured out that the stuff was MD5 and TEA as a postscript to the "finding encryption code" essay I posted?
    Last edited by mike; March 26th, 2002 at 17:05.

  8. #23
    DakienDX
    Guest
    Hello binh81 !

    What a great use of cryptography.
    Code:
    Ouput("Enter password");
    Input(PW);
    Hash=MD5(PW);
    If (Hash = EC5C65FE1C9DCF80EABAA7516BCC79Ah) then
      Decrypt(Offset Data, "HardCodedPW")
    Else
      Output("Wrong password");
    I wouldn't call this cryptography.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  9. #24
    foxthree
    Guest

    Unhappy Err.. pretty lame...

    Hi DakienDX/binh81:

    First off, I'm following this thread with avid interest. There is a lot of good posting here.

    One small question here:

    Isn't the method of serial check rather lame? 'cos I've to store the the correct hash values (for later comparison) for all possible "correct" serial nos. (I'm referring to this line here
    "If (Hash = EC5C65FE1C9DCF80EABAA7516BCC79Ah) then")

    Note that no two serial nos can hash to the same MD5 as MD5 byitself is collision-resistant.

    How can this be a practically implementable approach?

    Signed,
    -- FoxThree

    PS: BTW, If you were talking w.r.t. traditinal correct-password-decrypting-file-else-error kind of proggie, then just ignore my post
    Last edited by foxthree; March 26th, 2002 at 20:51.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

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

    practical approach

    Isn't the method of serial check rather lame?
    Yes. The right way to do it is to take the hash, use it as a key, and decrypt some known plaintext. If you want it to be hard to break, use salt to prevent building dictionaries of hashes, and have the hash function repeat like 64000 times so it takes forever to brute force.

    Of course, none of this prevents someone from getting a valid serial number, decrypting it, and patching the app. That's where stuff like checksumming comes in handy.

    No two serial nos can hash to the same
    If the serial numbers are long enough, then they can. Finding two that do, however, will take about 2^64 work!

  11. #26
    DakienDX
    Guest
    Hello foxthree !

    It might be a bit difficult to detect, but EC5C65FE1C9DCF80EABAA7516BCC79Ah is the MD5 hash value of the string "HardCodedPW".
    I wanted to use this example to show that even with strong cryptographic algorithms you can protect nothing if you don't know how to use them.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  12. #27
    Hi Mike,

    Well.... sure if you want me to write about it :>.... actually i only identified one MD5 algorithm... i worked out the rest of the crypto algo and our dear trustful Dakien just sat there, shakes his leg and tell me what algorithm was used :>....

    As Dakien pointed out in his post, though it used cryptography, the method it ised is overly paranoid thus make it unsecure... However it was not that easy for me, as i was disturbed by the slightly different style of MD5 used in the first serial check, and when i compared the first MD5 hash of my second-half serial with the second MD5 hash of my second hash serial ( there are 3 MD5 hash, but forget about the middle hash which take the whole serials)... so i was not thinking that the first correct hash could be used to decrypt TEA... ah well... was really a worthwhile lesson...

    Hi Dakien :>.... well not really cryptography make it interesting dont you think, i personnally believe in finding back door rather than bruteforcing, which is real cryptography :>... somehow i find it monotonous and unrewarding, the main objective becomes optimising ur bruteforcer :>... but yeah, i will try to figure out the serial format for this one and attempt a bruteforcer :>..

    Thanx guys for the help, Mike, do tell me if u still want me to post my findings of the encryption algo, or u might want an input from Dakien instead since he might have a more developed approach...

    Cheers,

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

    additions to essay

    Well, if you want to, go post on that thread. I'm just trying to create resources by having people contribute information as they get it.

  14. #29

    Okie

    Ok, Mike...

    Give me sometimes cos i am still working on the bruteforcer... when i am done i shall append my notes on this at the end of your thread..

    Cheers,

Similar Threads

  1. a simple substitution cipher or not?
    By dion in forum RCE Cryptographics
    Replies: 3
    Last Post: February 27th, 2010, 10:11
  2. WinZip cipher
    By naides in forum RCE Cryptographics
    Replies: 43
    Last Post: November 1st, 2006, 16:21
  3. 8 bit CPU cipher
    By dion in forum RCE Cryptographics
    Replies: 16
    Last Post: June 20th, 2002, 03:24

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
  •