<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Metasploitable%2FJohn_Shadow_File</id>
	<title>Metasploitable/John Shadow File - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Metasploitable%2FJohn_Shadow_File"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Metasploitable/John_Shadow_File&amp;action=history"/>
	<updated>2026-06-19T12:09:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Metasploitable/John_Shadow_File&amp;diff=9798&amp;oldid=prev</id>
		<title>Admin: /* Flags */</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Metasploitable/John_Shadow_File&amp;diff=9798&amp;oldid=prev"/>
		<updated>2016-03-26T05:50:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Flags&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:50, 26 March 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l123&quot;&gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Flags=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Flags=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MetasploitableFlag&lt;/del&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MSFlag&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{JohnFlag}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{JohnFlag}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Metasploitable/John_Shadow_File&amp;diff=9797&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;This page covers how to use John the Ripper to deal with &lt;code&gt;/etc/shadow&lt;/code&gt; files.  =Shadow File=  Unix stores information about system usernames and passwords in a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Metasploitable/John_Shadow_File&amp;diff=9797&amp;oldid=prev"/>
		<updated>2016-03-26T05:50:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This page covers how to use &lt;a href=&quot;/wiki/John_the_Ripper&quot; title=&quot;John the Ripper&quot;&gt;John the Ripper&lt;/a&gt; to deal with &amp;lt;code&amp;gt;/etc/shadow&amp;lt;/code&amp;gt; files.  =Shadow File=  Unix stores information about system usernames and passwords in a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page covers how to use [[John the Ripper]] to deal with &amp;lt;code&amp;gt;/etc/shadow&amp;lt;/code&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
=Shadow File=&lt;br /&gt;
&lt;br /&gt;
Unix stores information about system usernames and passwords in a file called &amp;lt;code&amp;gt;/etc/shadow&amp;lt;/code&amp;gt;. In this file, there are multiple fields (see [[Metasploitable/SSH/Brute_Force#Reading_.2Fetc.2Fshadow|Reading /etc/shadow]] page on the wiki for help reading the &amp;lt;code&amp;gt;/etc/shadow&amp;lt;/code&amp;gt; file). The most important are the first two: username and password hash.&lt;br /&gt;
&lt;br /&gt;
Example of an &amp;lt;code&amp;gt;/etc/shadow&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root:$1$/avpfBJ1$x0z8w5UF9Iv./DR9E9Lid.:14747:0:99999:7:::&lt;br /&gt;
daemon:*:14684:0:99999:7:::&lt;br /&gt;
bin:*:14684:0:99999:7:::&lt;br /&gt;
sys:$1$fUX6BPOt$Miyc3UpOzQJqz4s5wFD9l0:14742:0:99999:7:::&lt;br /&gt;
sync:*:14684:0:99999:7:::&lt;br /&gt;
games:*:14684:0:99999:7:::&lt;br /&gt;
man:*:14684:0:99999:7:::&lt;br /&gt;
lp:*:14684:0:99999:7:::&lt;br /&gt;
mail:*:14684:0:99999:7:::&lt;br /&gt;
news:*:14684:0:99999:7:::&lt;br /&gt;
uucp:*:14684:0:99999:7:::&lt;br /&gt;
proxy:*:14684:0:99999:7:::&lt;br /&gt;
www-data:*:14684:0:99999:7:::&lt;br /&gt;
backup:*:14684:0:99999:7:::&lt;br /&gt;
list:*:14684:0:99999:7:::&lt;br /&gt;
irc:*:14684:0:99999:7:::&lt;br /&gt;
gnats:*:14684:0:99999:7:::&lt;br /&gt;
nobody:*:14684:0:99999:7:::&lt;br /&gt;
libuuid:!:14684:0:99999:7:::&lt;br /&gt;
dhcp:*:14684:0:99999:7:::&lt;br /&gt;
syslog:*:14684:0:99999:7:::&lt;br /&gt;
klog:$1$f2ZVMS4K$R9XkI.CmLdHhdUE3X9jqP0:14742:0:99999:7:::&lt;br /&gt;
sshd:*:14684:0:99999:7:::&lt;br /&gt;
msfadmin:$1$XN10Zj2c$Rt/zzCW3mLtUWA.ihZjA5/:14684:0:99999:7:::&lt;br /&gt;
bind:*:14685:0:99999:7:::&lt;br /&gt;
postfix:*:14685:0:99999:7:::&lt;br /&gt;
ftp:*:14685:0:99999:7:::&lt;br /&gt;
postgres:$1$Rw35ik.x$MgQgZUuO5pAoUvfJhfcYe/:14685:0:99999:7:::&lt;br /&gt;
mysql:!:14685:0:99999:7:::&lt;br /&gt;
tomcat55:*:14691:0:99999:7:::&lt;br /&gt;
distccd:*:14698:0:99999:7:::&lt;br /&gt;
user:$1$HESu9xrH$k.o3G93DGoXIiQKkPmUgZ0:14699:0:99999:7:::&lt;br /&gt;
service:$1$kR3ue7JZ$7GxELDupr5Ohp6cjZ3Bu//:14715:0:99999:7:::&lt;br /&gt;
telnetd:*:14715:0:99999:7:::&lt;br /&gt;
proftpd:!:14727:0:99999:7:::&lt;br /&gt;
statd:*:15474:0:99999:7:::&lt;br /&gt;
snmp:*:15480:0:99999:7:::&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only users with a password hash can log in (if there is a &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt;, they cannot log in).&lt;br /&gt;
&lt;br /&gt;
=Unshadow the Shadow=&lt;br /&gt;
&lt;br /&gt;
To turn an &amp;lt;code&amp;gt;/etc/shadow&amp;lt;/code&amp;gt; file into a normal unix password file, use the &amp;lt;code&amp;gt;unshadow&amp;lt;/code&amp;gt; utility (from John the Ripper):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
umask 077&lt;br /&gt;
unshadow r00tpasswd r00tshadow &amp;gt; r00t4john&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can run [[John the Ripper]] on the file &amp;lt;code&amp;gt;mypasswd&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Using John to Crack=&lt;br /&gt;
&lt;br /&gt;
==Single Mode==&lt;br /&gt;
&lt;br /&gt;
The procedure for using John is to start in single mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# john --single r00t4john&lt;br /&gt;
&lt;br /&gt;
Warning: detected hash type &amp;quot;md5crypt&amp;quot;, but the string is also recognized as &amp;quot;aix-smd5&amp;quot;&lt;br /&gt;
Use the &amp;quot;--format=aix-smd5&amp;quot; option to force loading these as that type instead&lt;br /&gt;
Using default input encoding: UTF-8&lt;br /&gt;
Loaded 7 password hashes with 7 different salts (md5crypt, crypt(3) $1$ [MD5 128/128 SSE2 4x3])&lt;br /&gt;
Will run 2 OpenMP threads&lt;br /&gt;
Press &amp;#039;q&amp;#039; or Ctrl-C to abort, almost any other key for status&lt;br /&gt;
postgres         (postgres)&lt;br /&gt;
user             (user)&lt;br /&gt;
msfadmin         (msfadmin)&lt;br /&gt;
service          (service)&lt;br /&gt;
4g 0:00:00:00 DONE (2016-03-25 22:32) 4.761g/s 8092p/s 8114c/s 8114C/s root1913..root1900&lt;br /&gt;
Use the &amp;quot;--show&amp;quot; option to display all of the cracked passwords reliably&lt;br /&gt;
Session completed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bingo! We have already compromised 4 accounts. These 4 accounts each have a password that is the same as the username.&lt;br /&gt;
&lt;br /&gt;
==Wordlist Mode==&lt;br /&gt;
&lt;br /&gt;
Now run John with a wordlist and tell it to generate rules from the wordlist &amp;lt;code&amp;gt;500-worst-passwords.txt&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@morpheus:~# john --wordlist=/usr/share/wordlists/500-worst-passwords.txt --rules r00tmypasswd&lt;br /&gt;
Warning: detected hash type &amp;quot;md5crypt&amp;quot;, but the string is also recognized as &amp;quot;aix-smd5&amp;quot;&lt;br /&gt;
Use the &amp;quot;--format=aix-smd5&amp;quot; option to force loading these as that type instead&lt;br /&gt;
Using default input encoding: UTF-8&lt;br /&gt;
Loaded 7 password hashes with 7 different salts (md5crypt, crypt(3) $1$ [MD5 128/128 SSE2 4x3])&lt;br /&gt;
Remaining 3 password hashes with 3 different salts&lt;br /&gt;
Will run 2 OpenMP threads&lt;br /&gt;
Press &amp;#039;q&amp;#039; or Ctrl-C to abort, almost any other key for status&lt;br /&gt;
batman           (sys)&lt;br /&gt;
1g 0:00:00:01 DONE (2016-03-25 22:34) 0.7042g/s 16403p/s 32874c/s 32874C/s Stupiding..Passwording&lt;br /&gt;
Use the &amp;quot;--show&amp;quot; option to display all of the cracked passwords reliably&lt;br /&gt;
Session completed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bingo, another account compromised by using a list of the 500 worst passwords imaginable.&lt;br /&gt;
&lt;br /&gt;
We have two left to compromise. Attacking with the wordlist &amp;lt;code&amp;gt;rockyou.txt&amp;lt;/code&amp;gt; reveals one more:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@morpheus:~# john --wordlist=/usr/share/wordlists/rockyou.txt --rules r00tmypasswd&lt;br /&gt;
Warning: detected hash type &amp;quot;md5crypt&amp;quot;, but the string is also recognized as &amp;quot;aix-smd5&amp;quot;&lt;br /&gt;
Use the &amp;quot;--format=aix-smd5&amp;quot; option to force loading these as that type instead&lt;br /&gt;
Using default input encoding: UTF-8&lt;br /&gt;
Loaded 7 password hashes with 7 different salts (md5crypt, crypt(3) $1$ [MD5 128/128 SSE2 4x3])&lt;br /&gt;
Remaining 2 password hashes with 2 different salts&lt;br /&gt;
Will run 2 OpenMP threads&lt;br /&gt;
Press &amp;#039;q&amp;#039; or Ctrl-C to abort, almost any other key for status&lt;br /&gt;
123456789        (klog)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Flags=&lt;br /&gt;
&lt;br /&gt;
{{MetasploitableFlag}}&lt;br /&gt;
{{JohnFlag}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>