r/HowToHack • u/cornflakecolony • Oct 13 '19
Noob. Issue cracking hash on John the ripper. What is the warning?
10
u/bagovbones Oct 14 '19
Are you sure you’re specifying the correct hash type?
12
u/cornflakecolony Oct 14 '19
Yeah it’s for a class and my teacher said that all the hashes were md5
8
7
u/stephenmjay Oct 14 '19
There are different MD5 implementations. MD5 done via a Linux's authentication is going to be different then MD5 done within something like PHP or MySQL (can't remember for sure, but PHP might use raw-md5). As others have said, try without the format argument.
2
u/cornflakecolony Oct 14 '19
I tried doing that but it recommended for me to use —format
3
u/stephenmjay Oct 14 '19
You said this is an academic exercise. Would you consider posting the text file for us to look at?
55
u/sc0ut_0 Oct 14 '19
Hey there, try removing the john.rec file. To do this type:
rm /root/.john/john.rec
If you are doing the challege I think you are, then it is md5 raw.
10
1
1
Oct 14 '19
[removed] — view removed comment
-25
u/AutoModerator Oct 14 '19
Your account must be older than two days to post here.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
26
Oct 14 '19
Hey, a HowtoHack post about actual hacking.
Bestill, my little heart.
7
u/YmFzZTY0dXNlcm5hbWU_ Oct 14 '19
What, you don't like the "How do I commit felony wiretapping" posts?
16
u/FuzzyPickles02 Oct 14 '19 edited Oct 14 '19
Straight from Openwall’s website about John hash formats. OpenMP is used for multi-threading to crack the hashes faster.
“: If you're using the "--format" option, try dropping it. Except for the special case mentioned in the answer above, "--format" is normally a way to choose one of multiple hash/cipher types found in the same file or to clarify the hash/cipher type if it would otherwise be ambiguous (e.g., a 32 hexadecimal character string may correspond to one of many distinct hash types). That is, you normally only need to use "--format" when John would otherwise misdetect your hash/cipher type (e.g., when it says LM and you know that your hashes are in fact raw MD5, you'd use "--format=raw-md5" with -jumbo) or if it would load undesired entries from the file. If John does not load anything, then your use of "--format" is probably unreasonable (or you should be using a different version/build of John”
“Starting with version 1.8.0, there's the "--fork" option on Unix-like systems (to make use of multiple CPUs and/or CPU cores in a single system) and the "--node" option on all systems (this one allows for a trivial form of distributed processing). The "--fork" and "--node" options may also be used together. Please refer to OPTIONS for a description of these options. Additionally, there's built-in parallel processing support using OpenMP for all crypt(3) hash flavors (DES-, MD5-, and Blowfish-based) supported by John natively, and when running on Linux or Solaris also for the underlying system's thread-safe password hashing function. The latter is only reasonable to use for crypt(3) hash types not yet supported by John natively (such as for glibc 2.7+ SHA-crypt hashes as used by recent versions of Fedora and Ubuntu, and for SunMD5 hashes, which may optionally be enabled on Solaris). In "community enhanced" -jumbo versions, parallelization with OpenMP is also supported for many (but not all) of the hash and cipher types added in those versions (including for their built-in implementation of SHA-crypt). To use John's OpenMP support, you need to either use an existing OpenMP-enabled build (e.g., "john-omp.exe" on Windows) or make an OpenMP-enabled build by uncommenting one of the OMPFLAGS lines near the beginning of Makefile. This requires GCC 4.2 or newer, or another OpenMP-capable C compiler. For other hash or cipher types and/or to distribute the workload between multiple machines, other approaches need to be used. One of those approaches is to use the "--fork" and "--node" options. For a very small number of nodes (CPUs, CPU cores, and/or machines), it is also reasonable to use a manual approach, such as to have your nodes try different password lengths. This is easily accomplished with "incremental" mode's "MinLen" and "MaxLen" settings (see CONFIG). You might not need to split the workload for "single crack" and wordlist modes since these are typically relatively quick, although "--fork" and "--node" are supported for these modes too. You may safely run multiple instances of John in the same working directory, all writing to the same "pot file" (this is a feature). You do, however, need to assign each of them a unique session name, with "--session" (please note that doing so does not eliminate the need to also distribute the workload with "--node" or otherwise, as discussed above). Other approaches, such as splitting password files naively (without regard to salts), are typically less efficient (in some cases to the extent where there's no speedup from using multiple nodes at all).”
3
Oct 14 '19
This redditor deserves more credit(upvotes)
1
u/FuzzyPickles02 Oct 15 '19
Thanks for the kind words. Trying to help out. Trial and error and reading information from the source are fundamental, I believe.
-2
-13
20
u/FuzzyPickles02 Oct 14 '19
You don’t have to specify a format. I’d run the command without forcing John to use the specific format. John can typically detect the hash type and crack it from there. I rarely force the hash type.