RE: Password Cracking Challenge...

From: Michael Wojcik (Michael.Wojcik_at_microfocus.com)
Date: 07/31/03

  • Next message: master of chaos - lord of mean: "Re: Some help With BOF Exploits Writing. - EAX ?!"
    To: vuln-dev@securityfocus.com
    Date: Thu, 31 Jul 2003 11:37:51 -0700
    
    

    > From: Ronish Mehta [mailto:sf_mail_sbm@yahoo.com]
    > Sent: Thursday, July 31, 2003 1:20 AM
    >
    > Application does not allow to put smaller passwords
    >
    > Password0 - D5FBB0C7C20D9CE79D3B837BD6FB3505
    > Password3 - D5FBB0C7C20D9CE7B872B3A0BD587B8D

    These appear to confirm various speculations that the app uses a 64-bit
    block algorithm of some sort, but aside from that they don't help much.
    (Note that they also indicate that the algorithm doesn't use salt, which
    suggests that the author wasn't very knowledgable about security matters,
    which is in your favor.)

    Your original note contained one password of 7 characters ("QUALITY") and
    one of 8 ("Cr@ckM3!"). How short a password will the application allow? If
    I were serious about analyzing this algorithm (which I'm not; it doesn't
    appear to be trivial, and anything harder is definitely not in my job
    description), I'd probably generate several hashes using the shortest
    password the application would accept; first a pair where only the first
    character varied, then a pair where only the second character varied, and so
    forth. I'd also try things like varying the case of one character to make
    sure the algorithm doesn't fold case.

    But that's just to get started. Analyzing an unknown algorithm from
    plaintext / ciphertext pairs is a lot of work. In some cases the analyst
    gets lucky: the algorithm is weak and a bit of poking around combined with a
    guess or two reveals enough that the rest can be figured out without too
    much work. But often even the specifics of weak algorithms are hard to
    deduce from this kind of black-box inspection. It can be done - doing it is
    a major industry, in fact - but in general it's not easy.

    > I posted
    > this because i need to make a password audit for weak
    > passwords, I have full access to the database this is
    > how i get access to the hashes!

    So you're trying to mount an offline dictionary attack. (Whatever its
    motives, authorized or not, from the system's viewpoint it's an attack.)
    The fact that the algorithm apparently isn't salted is useful; it reduces
    your dictionary storage requirement (there's only one possible hash for
    every password).

    > We do not have access to the source code, so i can;t
    > figure out the algorithm

    Since you have the binary, it'd almost certainly be easier to
    reverse-engineer it from that, than deduce it by looking at plaintext and
    hash pairs (even with the advantage of chosen plaintexts). Debug the app
    when it's creating hashes. Figure out where that happens. Disassemble the
    relevant code. Analyze it.

    In fact, once you've disassembled the relevant code, you can probably
    reimplement it in a quick hash generator without understanding exactly what
    it does. So long as it takes plaintext and grinds out the correct hash,
    you're good to go. Filter your dictionary of weak passwords through it and
    you've got a dictionary of weak password hashes.

    -- 
    Michael Wojcik
    Principal Software Systems Developer, Micro Focus
    

  • Next message: master of chaos - lord of mean: "Re: Some help With BOF Exploits Writing. - EAX ?!"

    Relevant Pages

    • Re: SHA-1 vs. triple-DES for password encryption?
      ... be better to use a standard algorithm rather than a home-grown one. ... SHA-1 and 3DES have been reviewed for some time. ... This is where a hash comes in nicely. ... Longer passwords and hashes aid in making the hash much harder to work with. ...
      (SecProg)
    • Re: sort unique
      ... given that a hash table is not ... IMO if the vendor's algorithm does something "obvious", ... function to eliminate keys that hash to the same bucket per some ... strings of random lengths, and two strings are ...
      (comp.lang.lisp)
    • Re: out of memory
      ... read only the smaller file into a hash. ... the smaller file will fit into RAM. ... Depending upon the sorting algorithm this would be Ologor ... put your relevant data into a database and use ...
      (comp.lang.perl.misc)
    • Re: freebsd-updates install_verify routine excessive stating
      ... The algorithm with awk is still the fastest in theory. ... ASSUMING you have a good hash function that yields such result. ... to have enough free inodes on your file system. ...
      (freebsd-hackers)
    • Re: Probabalistic algorithms.
      ... >Hashing is typically just an optimisation. ... all the hash does is guarantee that given some ... >hard to factor the composite into its two prime factors. ... >algorithm that's dfaster than brute force factorisation, ...
      (comp.lang.pascal.delphi.misc)