Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Name that hash

Posted on 2004-10-12
9
Medium Priority
?
313 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 
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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article covers the basics of data encryption, what it is, how it works, and why it's important. If you've ever wondered what goes on when you "encrypt" data, you can look here to build a good foundation for your personal learning.
Ransomware - Defeated! Client opened the wrong email and was attacked by Ransomware. I was able to use file recovery utilities to find shadow copies of the encrypted files and make a complete recovery.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

877 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