1	John the Ripper FAQ.
2
3The latest version of this FAQ may be viewed online at:
4
5	http://www.openwall.com/john/doc/FAQ.shtml
6
7
8	Help!  I can't run John.
9
10If you're not familiar with your OS, you should probably not be using
11John in the first place since John is primarily a tool for system
12administrators.  This is starting to change with the "community
13enhanced" -jumbo versions' support for things such as password-protected
14archives, though.
15
16Here are the answers to a few (not very) common questions to avoid
17having them asked over and over and for amusement.  For more serious
18matters, please skip over to the next section.
19
20Q: When I type "john" (or "john passwd", etc.), it says "command not
21found" (or equivalent)?!
22A: The examples given in John the Ripper documentation assume that you
23know how to invoke newly-built programs from your shell.  On Unix-like
24systems, it is typical to not have "." (the current directory) in your
25$PATH (the list of directories to search for programs).  In that case,
26you need to type "./john" (dot, slash, and "john", without the quotes)
27to invoke the John binary executable located in the current directory.
28
29Q: ...but I am on a Unix-like system and I don't seem to readily have a
30John binary executable.
31A: Please follow the instructions in INSTALL.
32
33Q: When I double-click on "john.exe", a window flashes and disappears?!
34A: You're not supposed to click.  You're supposed to run John from a
35command-line shell.  On Windows, some of those shells would be cmd.exe,
36command.com, or bash (the latter is available with Cygwin).
37
38
39	Other typical new user questions.
40
41Q: How do I start John on my password file, use a specific cracking
42mode, see the passwords it cracked, etc?
43A: See README and EXAMPLES. :-)
44
45Q: Why doesn't John load my password file?  It says "No password hashes
46loaded", "No password hashes loaded (see FAQ)", or "No password hashes
47left to crack (see FAQ)".
48A: Your password file taken from a Unix-like system might be shadowed.
49You need to get both /etc/passwd and the shadow file (typically
50/etc/shadow or /etc/master.passwd), and combine them into one file using
51"unshadow" (which is supplied with John).  Please refer to EXAMPLES.
52A: All of the password hashes found in the file (that are of the same
53type as the very first recognized hash in the file unless you're using
54the "--format=..." option) might be already cracked by previous
55invocations of John.  (The message printed in that case has been changed
56to "No password hashes left to crack (see FAQ)" starting with version
571.7.7.)  To display cracked passwords, use "john --show" on your
58password hash file(s).  To force John to crack those same hashes again,
59remove the john.pot file.
60A: With PWDUMP-format files, John focuses on LM rather than NTLM hashes
61by default, and it might not load any hashes at all if there are no LM
62hashes to crack.  To have JtR Pro or a -jumbo version focus on NTLM
63hashes instead, you need to pass the "--format=nt" option.  You'll also
64need to use this option along with "--show".
65A: If you're using the "--format" option, try dropping it.  Except for
66the special case mentioned in the answer above, "--format" is normally a
67way to choose one of multiple hash/cipher types found in the same file
68or to clarify the hash/cipher type if it would otherwise be ambiguous
69(e.g., a 32 hexadecimal character string may correspond to one of many
70distinct hash types).  That is, you normally only need to use "--format"
71when John would otherwise misdetect your hash/cipher type (e.g., when it
72says LM and you know that your hashes are in fact raw MD5, you'd use
73"--format=raw-md5" with -jumbo) or if it would load undesired entries
74from the file.  If John does not load anything, then your use of
75"--format" is probably unreasonable (or you should be using a different
76version/build of John - see the answer below).
77A: Your password hash or cipher type(s) might not be supported by John,
78or at least by the version and build of John that you're using.  If
79you're using a non-jumbo version, you will likely want to try -jumbo
80instead, which supports a lot of additional hash and cipher types (e.g.,
81you currently need -jumbo for raw MD5).  If unsuccessful with that and
82if other answers (above and below this one) don't apply, please post a
83note to the mailing list (see CONTACT) including a sample password file
84line that John does not load (please make sure that the password is
85already changed by the time you post).
86A: John only loads properly formatted text files directly.  It can load
87/etc/passwd and PWDUMP format files.  Starting with version 1.7.6, it
88can also load text files containing one password hash per line (and
89nothing else on that line).  Some other file formats are supported via
90extra tools (supplied with John): unafs (Kerberos AFS database files),
91undrop (Eggdrop IRC bot userfiles), ssh2sshng.py (OpenSSH private keys),
92pdf2john (some password-protected PDF files), rar2john (some
93password-protected RAR archives), zip2john (some password-protected
94PKZIP and WinZip archives).  You need -jumbo for most of these.  To use
95the proper one of these (for your file format), run it on your file(s)
96and redirect the output to a new file (using your shell's output
97redirection feature - e.g., "./ssh2sshng.py ~/.ssh/id_rsa > sshpasswd").
98Then run John on the resulting file (e.g., "./john sshpasswd").
99A: The file you're trying to run John on might in fact not be a password
100file at all.
101A: Your command line syntax might be wrong, resulting in John trying to
102load a wrong file.
103
104Q: John appears to misdetect my hash type.  I have raw MD5 hashes from a
105web application, but John wrongly says they're LM hashes.  How do I get
106them detected correctly?
107A: Some hash and cipher types use ambiguous encodings - e.g., a 32
108hexadecimal character string may correspond to one of many hash types,
109including raw MD5, LM, NTLM, and many others supported in -jumbo.  First
110of all, you need a version and build of John that supports your hash and
111cipher type.  Starting with version 1.7.7 (and 1.7.7-jumbo*) John will
112suggest alternate hash and cipher types for encodings that it finds
113ambiguous (that is, those corresponding to more than one of its
114supported hash and cipher types).  When doing so, it will suggest
115specific "--format=..." options to use.  For example, when you run a
116recent enough -jumbo version on raw MD5 hashes, it loads those as LM
117(because they could in fact be LM, as well as for compatibility with
118non-jumbo), but it suggests that you use "--format=raw-md5", which is
119what you should in fact use in this case.  It makes other suggestions as
120well because it does not know whether your hashes are raw MD5 or
121something else.  You're supposed to know this and choose the right one
122of the suggested "--format=..." options.  If you're not getting a
123suggestion like this from John 1.7.7 or newer even though you're not yet
124using the "--format" option, this means that your version and build of
125John does not recognize the encodings as ambiguous, which may mean that
126it does not support the actual hash or cipher type that you have in
127mind.  If you're already using the "--format" option, try dropping the
128option to receive the suggestions.  If you're using a non-jumbo version
129of John, the first step is for you to try -jumbo instead.  As of this
130writing, you do need -jumbo for some popular hash types such as raw MD5
131and NTLM.
132
133Q: What do the various numbers printed on the status line mean?
134A: As of version 1.8.0, the status line may include: successful guess
135count ("g"), session duration (in the D:HH:MM:SS format for days, hours,
136minutes, and seconds), progress indicator (percent done and optionally
137pass number out of the total number of passes), up to four speed metrics
138("g/s", "p/s", "c/s", and "C/s"), and the current (range of) candidate
139password(s) being tested (John is often able to test multiple candidate
140passwords in parallel for better performance, hence a range).  The four
141speed metrics are as follows: g/s is successful guesses per second (so
142it'll stay at 0 until at least one password is cracked), p/s is
143candidate passwords tested per second, c/s is "crypts" (password hash or
144cipher computations) per second, and C/s is combinations of candidate
145password and target hash per second.  Versions of John prior to 1.8.0
146displayed only the C/s rate (calling it c/s).  When you restore a
147pre-1.8.0 session with version 1.8.0 or newer, only the g/s and C/s
148rates will be displayed, because the older .rec file format lacked
149information needed to compute p/s and c/s.
150
151Q: I am running John for 10 days and it is still not finished?!
152Q: How long should I expect John to run?
153A: It primarily depends on the cracking mode(s) and on your password
154files (in particular, the type of hashes and the number of different
155salts, if applicable).  Most importantly, you should note that the
156"incremental" mode, which a default John run (with no command line
157options) proceeds with after being done with the quicker checks, is not
158supposed to terminate in a reasonable time.  It is up to you to decide
159how long you're going to let it run, then consider any uncracked
160passwords strong enough.  "Single crack" mode runs typically take from
161under a second to one day (depending on the type and number of password
162hashes).  Wordlist mode runs may also be quick (under a second) for
163tiny wordlists and fast hashes or they may take multiple days with large
164wordlists, with word mangling rules, and with slow hash types and
165substantial numbers of different salts.  The status line John reports
166whenever you hit a key includes a progress indicator (percent complete)
167for "single crack" and wordlist modes.  With no cracking mode requested
168explicitly, John will start with "single crack" mode (pass 1), then
169proceed with wordlist mode (pass 2), and finally with "incremental" mode
170(pass 3).  The pass numbers are reported on the status line, too.  It is
171reasonable to let John reach "incremental" mode (pass 3) and run that
172for a while (some days).  You will notice that John's success rate (the
173number of passwords cracked per hour or per day) will be dropping
174rapidly.  When you determine that the success rate is low enough, you
175interrupt John.
176
177Q: Does John support multi-processing or distributed processing?
178A: Yes, but you need to explicitly enable this if desired.  Starting
179with version 1.8.0, there's the "--fork" option on Unix-like systems (to
180make use of multiple CPUs and/or CPU cores in a single system) and the
181"--node" option on all systems (this one allows for a trivial form of
182distributed processing).  The "--fork" and "--node" options may also be
183used together.  Please refer to OPTIONS for a description of these
184options.  Additionally, there's built-in parallel processing support
185using OpenMP for all crypt(3) hash flavors (DES-, MD5-, and
186Blowfish-based) supported by John natively, and when running on Linux or
187Solaris also for the underlying system's thread-safe password hashing
188function.  The latter is only reasonable to use for crypt(3) hash types
189not yet supported by John natively (such as for glibc 2.7+ SHA-crypt
190hashes as used by recent versions of Fedora and Ubuntu, and for SunMD5
191hashes, which may optionally be enabled on Solaris).  In "community
192enhanced" -jumbo versions, parallelization with OpenMP is also supported
193for many (but not all) of the hash and cipher types added in those
194versions (including for their built-in implementation of SHA-crypt).
195To use John's OpenMP support, you need to either use an existing
196OpenMP-enabled build (e.g., "john-omp.exe" on Windows) or make an
197OpenMP-enabled build by uncommenting one of the OMPFLAGS lines near the
198beginning of Makefile.  This requires GCC 4.2 or newer, or another
199OpenMP-capable C compiler.  For other hash or cipher types and/or to
200distribute the workload between multiple machines, other approaches need
201to be used.  One of those approaches is to use the "--fork" and "--node"
202options.  For a very small number of nodes (CPUs, CPU cores, and/or
203machines), it is also reasonable to use a manual approach, such as to
204have your nodes try different password lengths.  This is easily
205accomplished with "incremental" mode's "MinLen" and "MaxLen" settings
206(see CONFIG).  You might not need to split the workload for "single
207crack" and wordlist modes since these are typically relatively quick,
208although "--fork" and "--node" are supported for these modes too.  You
209may safely run multiple instances of John in the same working directory,
210all writing to the same "pot file" (this is a feature).  You do,
211however, need to assign each of them a unique session name, with
212"--session" (please note that doing so does not eliminate the need to
213also distribute the workload with "--node" or otherwise, as discussed
214above).  Other approaches, such as splitting password files naively
215(without regard to salts), are typically less efficient (in some cases
216to the extent where there's no speedup from using multiple nodes at
217all).  Some other approaches, such as using MPI, are listed on the wiki
218at: http://openwall.info/wiki/john/parallelization
219
220Q: Where do I get wordlists for use with John?
221A: http://www.openwall.com/wordlists/
222
223Q: Where do I get new versions of John the Ripper?
224Q: Where do I get the source code for John?
225Q: I only have the source code for John the Ripper, where do I get it
226pre-compiled for my OS (if supported)?
227Q: What is the primary website for John the Ripper?
228A: http://www.openwall.com/john/
229
230Q: How can I contact you (the author)?
231A: See CONTACT.
232
233
234	Questions sometimes asked by existing users.
235
236Q: I've recently switched my system to Blowfish-based password hashes,
237but there are still some DES-based and MD5-based hashes in the password
238file.  How do I handle multiple hash types in one file?
239A: Use the "--format=..." option to tell John which hashes you would
240like it to load.  Unfortunately, you will have to run John for each hash
241type separately.  This requirement may sometimes be avoided with the use
242of "--format=crypt", but this is not recommended.  Please see the
243description of the "--format" option in OPTIONS for more detail.
244
245Q: I have 10 users, but John said it loaded 15 password hashes.  What's
246going on?
247A: Some extremely poorly designed hash types (Windows LM hashes and
248DES-based crypt(3) hashes known as "bigcrypt") have a property that
249allows John to split their encodings into two separate hashes
250(corresponding to "halves" of plaintext passwords) on load.  John then
251proceeds to crack those hashes separately, so at a given time it might
252have only one of two halves of some passwords cracked.  If interrupted
253and restarted, it would need to only load the hashes that correspond to
254uncracked password halves, so the number of such hashes is what John
255reports (in all cases, for consistency).
256
257Q: Are the strings tried with "-i" ("incremental" mode) random?  They
258certainly look like they are almost random.
259A: No, they are not.  No single candidate password will be tried for a
260second time and the order in which they are tried is in fact very smart:
261it is based on frequencies of different trigraphs, stored and processed
262separately for each character position and for each password length.
263
264Q: Why doesn't John display a progress indicator for the "incremental"
265mode?
266A: Do you really want to see a 0% all the time?  As explained in MODES,
267"incremental" mode is not supposed to terminate in a reasonable time.
268(There are a few exceptions to this, so a progress indicator has been
269added in -jumbo and it might be added in official versions later.)
270
271Q: I just noticed that the p/s, c/s, and C/s rates reported while using
272"incremental" mode are a lot lower than they are with other cracking
273modes.  Why is that?
274A: You're probably running John for a few seconds only.  The current
275"incremental" mode implementation uses large character sets, which need
276to be expanded into even larger data structures in memory each time John
277switches to a different password length.  Fortunately, this is only
278noticeable when John has just started since the length switches become
279rare after a few minutes.  For long-living sessions, which is where we
280care about performance the most, this overhead is negligible.  This is a
281very low price for the better order of candidate passwords tried.
282
283Q: What are the "real" and "virtual" c/s rates as reported by "--test"?
284A: These correspond to real and virtual (processor) time, respectively.
285When running single-threaded, the two results are normally almost the
286same, but the "real" c/s rate becomes smaller when the system is under
287other load, with the "virtual" c/s rate indicating roughly what you
288could expect to get from the same system if it were not loaded.  When
289running multi-threaded, the "real" c/s rate is normally much higher than
290the "virtual" c/s rate, with the latter roughly indicating performance
291of one thread on an otherwise idle system.
292
293Q: How can I test John's password hashing routines for proper operation?
294A: John always performs a self-test when you run it on a password file
295and refuses to work if an error occurs.  If you need to test all of the
296low-level routines at once, use "--test".
297
298Q: What is the format of the crash recovery files ("john.rec", other
299.rec's)?  What do the numbers mean?
300A: The format of these files is deliberately undocumented and is subject
301to change without notice.  (However, each release of John the Ripper is
302likely to be able to read .rec files produced by at least the
303immediately preceding release.  Whenever compatibility is broken, John
304will refuse to recover the session, leaving the .rec file intact.)
305Although the meaning of some of the numbers that get into .rec files is
306trivial to explain, it is not possible to reasonably describe some
307others without going into great detail on John internals.  If you really
308need to know, read the source code.
309
310$Owl$
311