Re: get MD5-Hash from /etc/shadow file



On Fri, Apr 11, 2008 at 7:53 AM, markus sesser <security@xxxxxxxxx> wrote:
is it possible to get the md5 hash of shadow password?

root:$1$GXJzVR5J$vS4wC7AW6hV8TvLu6Dtxt.:13979:0:::::

i'm looking not for a tool like john, crack, ...
i want to have a step by step instruction to get the md5 hash.

That is the MD5 hash;
$1 - denotes MD5
$GXJzVR5J - 8 character salt
$vS4wC7AW6hV8TvLu6Dtxt. - actual hash

The $ symbols are field delimiters.

The hash would have been generated by something similar to
crypt("test", "$1$GXJzVR5J") look at 'man 3 crypt' for further
details.

I assume you want to learn how to crack the password?

The only ways you can find the password from the hash are by rainbow
tables or direct brute force, in this case given the 8 character salt
the only real option is brute force, i.e. hash every possibility and
compare the hash to this one;

e.g. Pseudo code

hash("a", "$1$GXJzVR5J")
compare hash
hash("b", "$1$GXJzVR5J")
compare hash
...
hash("aa", "$1$GXJzVR5J")
compare hash
hash("ab", "$1$GXJzVR5J")
compare hash
...

And so on.

------------------------------------------------------------------------
This list is sponsored by: Cenzic

Need to secure your web apps NOW?
Cenzic finds more, "real" vulnerabilities fast.
Click to try it, buy it or download a solution FREE today!

http://www.cenzic.com/downloads
------------------------------------------------------------------------



Relevant Pages

  • Re: [PHP] Converting C# Hashing Routines to PHP
    ... thanks for the heads up on how that translates in PHP. ... The login algorithm hashes the ... I'm afraid this is one way hash, ... one for the md5 hash and one for the new hash. ...
    (php.general)
  • Re: [PHP] Converting C# Hashing Routines to PHP
    ... The login algorithm hashes the ... I'm afraid this is one way hash, ... one for the md5 hash and one for the new hash. ...
    (php.general)
  • Re: md5 collisions and speeding tickets
    ... knowing next-to-nothing about hash funcitons or PostScript would then ... forge, according to the "experts" in sci.crypt. ... The MD5 hash for the above challenge is: ... My bet is on scenario 3, followed by scenario 1, followed by scenario ...
    (sci.crypt)
  • Re: MD5 hashes always unique?
    ... If an MD5 hash could uniquely identify a stream of bytes, then it would be an effective mechanism for compressing that stream of bytes. ... Even a 32-bit hash has, however, a very tiny chance of being the same as that for a different stream of bytes, and longer hashes are even more reliable. ...
    (microsoft.public.dotnet.languages.csharp)
  • MD5 Crypto and hashing
    ... I'm trying to convert some code from VB6 API calls to VB.NET. ... computes an MD5 hash that is used elsewhere. ... do to get a 'Session Key' from the MD5 hash that I create? ...
    (microsoft.public.dotnet.languages.vb)

Loading