Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update apply_pot to the hashcat generation #14382

Merged
merged 1 commit into from Nov 11, 2020

Conversation

h00die
Copy link
Contributor

@h00die h00die commented Nov 11, 2020

Fixes #14380 .

When the cracker modules got updated to include hashcat functionality, the libs changed. Looks like I forgot to update apply_pot. This updates the module to make it work again.

Verification

@h00die h00die added the bug label Nov 11, 2020
@h00die
Copy link
Contributor Author

h00die commented Nov 11, 2020

@grese can you test this patch to make sure it works for you?

@smcintyre-r7 smcintyre-r7 self-assigned this Nov 11, 2020
Copy link
Contributor

@smcintyre-r7 smcintyre-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully. I was able to reproduce the original issue and verify that this fixes it. I'll land this momentarily.

Before the patch
msf6 auxiliary(analyze/apply_pot) > show options 

Module options (auxiliary/analyze/apply_pot):

   Name          Current Setting                   Required  Description
   ----          ---------------                   --------  -----------
   CONFIG                                          no        The path to a John config file to use instead of the default
   CRACKER_PATH  /opt/john-1.9.0-jumbo-1/run/john  no        The absolute path to the cracker executable
   FORK          1                                 no        Forks for John the Ripper to use
   POT           /home/smcintyre/.msf4/john.pot    no        The path to a John POT file to use instead of the default

msf6 auxiliary(analyze/apply_pot) > run

[-] Auxiliary failed: NameError undefined local variable or method `new_john_cracker' for #<Msf::Modules::Auxiliary__Analyze__Apply_pot::MetasploitModule:0x00007f3d895e0858>
[-] Call stack:
[-]   /home/smcintyre/Repositories/metasploit-framework.pr/modules/auxiliary/analyze/apply_pot.rb:53:in `run'
[*] Auxiliary module execution completed
msf6 auxiliary(analyze/apply_pot) >
After the patch
msf6 auxiliary(analyze/apply_pot) > show options 

Module options (auxiliary/analyze/apply_pot):

   Name          Current Setting                   Required  Description
   ----          ---------------                   --------  -----------
   CONFIG                                          no        The path to a John config file to use instead of the default
   CRACKER_PATH  /opt/john-1.9.0-jumbo-1/run/john  no        The absolute path to the cracker executable
   FORK          1                                 no        Forks for John the Ripper to use
   POT           /home/smcintyre/.msf4/john.pot    no        The path to a John POT file to use instead of the default


Auxiliary action:

   Name  Description
   ----  -----------
   john  Use John the Ripper


msf6 auxiliary(analyze/apply_pot) > run

[+] john Version Detected: 1.9.0-jumbo-1 OMP
[*] Hashes Written out to /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking bcrypt hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=bcrypt --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking bsdicrypt hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=bsdicrypt --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[+] bsdi_password:password
[*] Checking crypt hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=crypt --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
Warning: hash encoding string length 54, type id #0
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 94, type id #0
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 16, type id #0
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 24, type id #0
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 25, type id #0
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 60, type id #0
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 60, type id #0
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 46, type id $d
appears to be unsupported on this system; will not load such hashes.
Warning: hash encoding string length 55, type id #0
appears to be unsupported on this system; will not load such hashes.
[+] des_password:password
[+] md5_password:password
[+] bsdi_password:password
[*] Checking descrypt hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=descrypt --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[+] des_password:password
[*] Checking lm hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=lm --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking nt hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=nt --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking md5crypt hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=md5crypt --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[+] md5_password:password
[*] Checking mysql hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=mysql --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking mysql-sha1 hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=mysql-sha1 --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking mssql hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=mssql --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking mssql05 hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=mssql05 --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking mssql12 hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=mssql12 --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking oracle hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=oracle --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking oracle11 hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=oracle11 --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking oracle12c hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=oracle12c --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking dynamic_1506 hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=dynamic_1506 --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Checking dynamic_1034 hashes against pot file
[*]    Cracking Command: /opt/john-1.9.0-jumbo-1/run/john --show --pot=/home/smcintyre/.msf4/john.pot --format=dynamic_1034 --config=/home/smcintyre/Repositories/metasploit-framework.pr/data/jtr/john.conf /tmp/hashes_tmp20201111-24468-q7tkpc
[*] Auxiliary module execution completed

Thanks alot @h00die !

@smcintyre-r7 smcintyre-r7 merged commit 4f37e65 into rapid7:master Nov 11, 2020
@smcintyre-r7
Copy link
Contributor

smcintyre-r7 commented Nov 11, 2020

Release Notes

Fixed an issue in the auxiliary/analyze/apply_pot module where it was not updated to use the latest version of the supporting library, leading to a crash when the module was run due to an undefined symbol.

@grese
Copy link

grese commented Nov 12, 2020

@grese can you test this patch to make sure it works for you?

Yep, that does it. Thank you 😄!

@h00die h00die deleted the fix_apply_pot branch December 5, 2020 03:01
@pbarry-r7 pbarry-r7 added the rn-fix release notes fix label Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auxiliary/analyze/apply_pot throwing NameError
4 participants