0% found this document useful (0 votes)
8 views2 pages

User Account Creation and Password Cracking Guide

Uploaded by

prathamgarg2010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

User Account Creation and Password Cracking Guide

Uploaded by

prathamgarg2010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Instructions

1. Copy-and-paste a list of usernames to work with.


USERNAMES=("sophie" "nathaniel" "lauren" "christopher" "seth" "connor" "beverly" "craig"
"debra" "sandra" "alice" "roberto" "ivan" "gloria" "nicole" "johnny" "juliana" "amanda" "jerry" "joe"
"gilbert" "riley" "stephanie" "troy" "liam" "hector" "nick" "clark" "danna" "perry" "alexis" "stuart"
"daisy" "joey" "ron" "janet" "albert" "ben" "ashley" "dan" "shane" "scott" "sandy" "paul" "terry"
"marion" "isabel" )
Create all the user accounts.
sudo bash -c " \
for user in $USERNAMES; do
useradd \$user;
password=\$(shuf -n 1 /usr/share/wordlists/[Link]);
echo \$user:\$password | chpasswd;
echo Creating user \"\$user\"...;
done ;

echo 'All done!'


"
2. Copy the Linux password file and shadow file into a temporary directory.
sudo bash -c " \
cp /etc/passwd /tmp/passwd
cp /etc/shadow /tmp/shadow
"
3. Unshadow the Linux shadow passwords with John The Ripper to collect password hashes.
sudo bash -c " \
unshadow /tmp/passwd /tmp/shadow | grep '\$y'| tee /tmp/hashes
"
4. Crack the passwords with John The Ripper!
john /tmp/hashes --wordlist /usr/share/wordlists/[Link] --format=crypt
This may take some time, so once you see some passwords come through and you are
satsified, press Ctrl+C to stop John The Ripper.

5. Cleanup
Remove all the created users.
sudo bash -c " \
for user in $USERNAMES; do
userdel \$user;
echo Removing user \"\$user\"...;
done ;

echo 'All done!'


"
6. Remove the setup files from the temporary directory.
sudo bash -c " \
rm /tmp/passwd /tmp/shadow /tmp/hashes

You might also like