2

A very strange thing happened:

There is a user that has a HASH:

[root@notebook /home/username/Desktop/b/a] cat passwd-machine 
foo:x:2229:3001:,,,System,fooo,-,userid for bar;foobar:/home/foo:/bin/bash
[root@notebook /home/username/Desktop/b/a]

[root@notebook /home/username/Desktop/b/a] cat shadow-machine 
foo:$1$9TGbA/j3$qxBpCtr2C3VIKcwcvniQi1:16368:1:90:7:::
[root@notebook /home/username/Desktop/b/a]

[root@notebook /home/username/Desktop/b/a] john -show *
foo::16368:1:90:7:::

1 password hash cracked, 0 left
[root@notebook /home/username/Desktop/b/a] 

[root@notebook /home/username/Desktop/b/a] cat ~/.john/john.pot 
$1$9TGbA/j3$qxBpCtr2C3VIKcwcvniQi1:
[root@notebook /home/username/Desktop/b/a]

[root@notebook /home/username/Desktop/b/a] cat -vte ~/.john/john.pot 
$1$9TGbA/j3$qxBpCtr2C3VIKcwcvniQi1:$
[root@notebook /home/username/Desktop/b/a] 

BUT!: It looks like... it has no password assigned to the hash!

If I append the "passwd-machine " file content in my Desktops /etc/passwd and append the "shadow-machine" file in my /etc/shadow.. then I can "su - foo" without any password from a normal user.

How could this happen? The given user "foo" has a hash.

But it looks like... it has no password.. how could there be a hash if I can log into that user without password? Can someone explain this please? It's hard to google for this :\

5

That is actually the md5-based hash for the empty password:

$ mkpasswd -m md5 -S 9TGbA/j3 
Password: 
$1$9TGbA/j3$qxBpCtr2C3VIKcwcvniQi1
$ 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy