Solved

Name that hash

Posted on 2004-10-12
9
302 Views
Last Modified: 2010-04-11
I've got a hash here that is being generated by vpopmail, and I can't figure out what it is.. any ideas?

$1$E7Cjw3O9$U./qIyj3rWueCgTLGrx/3.
that is the hashed version of "password"

Once it's identified, I will use it to script password changes, so I also need to know of a unix/linux program that can be used to hash text like that.  A quick check says it's not MD5 or SHA-1..  
0
Comment
Question by:Chireru
  • 4
  • 3
  • 2
9 Comments
 
LVL 2

Expert Comment

by:ThePCNerd
ID: 12292703
No, that is neither MD5 nor SHA-1 of "password" it looks like a code obfuscator which means that is just replaced with random text.

And if that is obfuscated they are sending a message that they dont want people editing or using thier code.

Your best bet is printing the variable to see what's in it.
0
 
LVL 2

Expert Comment

by:ThePCNerd
ID: 12292711
I have seen that type of hash before, i forgot where I beleive it was a windows xp user password hash (actually encryption not hash cuz it can be reversed)
0
 
LVL 5

Author Comment

by:Chireru
ID: 12294468
It could be encryption...  it's vpopmail storing it.. as far as I know, that is only used by qmail upon smtp authentication.. all other pop/etc communications use a cleartext password..

It reminds me of the passwords cisco IOS uses when automatic password encryption (level 7) is on.
0
 
LVL 3

Expert Comment

by:_anom_
ID: 12294622
It is definitely MD5, JTR confirms it
---JTR---
Loaded 1 password (FreeBSD MD5 [32/32])
password             (blah)
guesses:1   time: 0:00:00:00 100% (2)  c/s: 806  trying: password
---/JTR---

you can tell it's MD5 cuz it has the $1$ followed by an 8 char salt followed by the 22 char hash.

Cheers
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 5

Author Comment

by:Chireru
ID: 12294667
anom:  How would I go about creating that hash..  how would I go about taking "password" and converting it to that?
0
 
LVL 3

Accepted Solution

by:
_anom_ earned 250 total points
ID: 12294796
After a bit of looking, I found a some perl code that will work nicely.  Create a file that contains the following:
----Begin file----
#!/usr/bin/perl

use Crypt::PasswdMD5

chomp(my $password = <STDIN>);
chomp(my $salt = <STDIN>);

$crypted = unix_md5_crypt($password, $salt);

print "$crypted\n";
----End File----

that program will read in two lines from the keyboard -- the first of which is the password (in this case "password") and second
it will read in the salt (in this case "$1$E7Cjw3O9").  I don't know how you are applying this, so you may or may not wish to use the same salt every time.
Note, you will need the crypt-passwdmd5 module to make this work.
0
 
LVL 5

Author Comment

by:Chireru
ID: 12298462
That did it, thanks a lot :)
Your program is a little bit broken, but I got the idea, and a working version.

For changing the salt, it's just generating a random 8-byte string, right?
0
 
LVL 3

Expert Comment

by:_anom_
ID: 12298565
Yep, just make sure you still pass $1$ + the salt because I think the unix crypt function requires it.

Cheers
0
 
LVL 5

Author Comment

by:Chireru
ID: 12298777
Just tested it, it works without the $1$, at least on FreeBSD, but I'll put it in anyway.

Thanks again.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now