- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Checking password entry for common patter
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 05:19 AM
05-16-2006 05:19 AM
I have loaded crack 5.0 and have run it, but I haven't figured out how to add that common string to a dictonary.
Any help on accomplishing my objectives would be appreciated.
Stuart
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 05:36 AM
05-16-2006 05:36 AM
Re: Checking password entry for common patter
crack is a dangerous thing to have on a system, easily abused.
On the other hand,Linux uses exactly that library to check passwords.
Not knowing how the integration is done, I'd suggest looking at a Linux machine to see how its done. Since Linux is open source, it may provide you a solution you can use on HP-UX.
Do share if you figure it out.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 10:26 AM
05-16-2006 10:26 AM
SolutionThe fundamental idea is to use the crypt() function to compare the plaintext password to the hash. If crypt() produces an identical hash then the same plaintext key was used. You actually pass the current passwd hash to the crypt function because the 1st 2 characters of the hash are the "salt" which is used to perturb the hashing algorithm.
#!/usr/bin/perl
my $plaintext = "secret";
my $currentpwhash = "wCNuEoWfzgPJ.";
if (crypt($plaintext,$currentpwhash) eq $currentpwhash)
{
print "$plaintext was used; bad password\n";
}
else
{
print "OK\n";
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 12:02 PM
05-16-2006 12:02 PM
Re: Checking password entry for common patter
As Clay notes, Perl makes life easy. You can use the following script to examine your password database.
#!/usr/bin/perl
#@(#)defpws $ Find default passwords - JRF $
use strict;
use warnings;
use File::Basename;
my $defpass = shift or die "Usage: ".basename($0)." Default_Password\n";
my ($name, $passwd, $uid);
while (($name, $passwd, $uid) = getpwent) {
if (crypt ($defpass, $passwd) eq $passwd) {
print $name, "(id=", $uid, ") is using default password\n";
}
}
1;
...Name the script "defpws" (or anything you want) and do:
# ./defpws sillypw
...This will examine your password database and report any and all users using a password of "sillypw". The output would look like:
dummy(id=1001) is using default password
dummy2(id=1002) is using default password
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2006 11:58 PM
05-16-2006 11:58 PM
Re: Checking password entry for common patter
I appreciate the head start.
Stuart