Skip to content

Commit

Permalink
Remove remaining traces of ssh2john
Browse files Browse the repository at this point in the history
  • Loading branch information
kholia committed Jan 26, 2017
1 parent 528fa87 commit f176200
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
4 changes: 2 additions & 2 deletions doc/FAQ
Expand Up @@ -87,13 +87,13 @@ A: John only loads properly formatted text files directly. It can load
can also load text files containing one password hash per line (and
nothing else on that line). Some other file formats are supported via
extra tools (supplied with John): unafs (Kerberos AFS database files),
undrop (Eggdrop IRC bot userfiles), ssh2john (OpenSSH private keys),
undrop (Eggdrop IRC bot userfiles), ssh2sshng.py (OpenSSH private keys),
pdf2john (some password-protected PDF files), rar2john (some
password-protected RAR archives), zip2john (some password-protected
PKZIP and WinZip archives). You need -jumbo for most of these. To use
the proper one of these (for your file format), run it on your file(s)
and redirect the output to a new file (using your shell's output
redirection feature - e.g., "./ssh2john ~/.ssh/id_rsa > sshpasswd").
redirection feature - e.g., "./ssh2sshng.py ~/.ssh/id_rsa > sshpasswd").
Then run John on the resulting file (e.g., "./john sshpasswd").
A: The file you're trying to run John on might in fact not be a password
file at all.
Expand Down
12 changes: 1 addition & 11 deletions doc/README.ssh
@@ -1,18 +1,8 @@
Cracking password protected ssh private keys
============================================

JtR-jumbo has two formats (plug-ins) which support cracking
password protected ssh private keys, "ssh" and "ssh-ng".

ssh-ng is newer, faster but highly experimental format which
can generate false positives. Use it at your own risk.

1. Build JtR-jumbo

2. Run either of the following steps,

a. Run ssh2john on SSH private key file(s) *OR*

b. Run sshng2john.py on SSH private key file(s)
2. Run sshng2john.py on SSH private key file(s)

3. Run john on the output of step 2.
2 changes: 1 addition & 1 deletion run/pem2john.py
Expand Up @@ -95,7 +95,7 @@ def unwrap_pkcs8(blob):
blob = open(filename, "rb").read()
if b'-----BEGIN ENCRYPTED PRIVATE KEY-----' not in blob:
if b'PRIVATE KEY-----' in blob:
sys.stderr.write("[%s] try using sshng2john.py or ssh2john on this file instead!\n" % sys.argv[0])
sys.stderr.write("[%s] try using sshng2john.py on this file instead!\n" % sys.argv[0])
else:
sys.stderr.write("[%s] is this really a private key in PKCS #8 format?\n" % sys.argv[0])

Expand Down

0 comments on commit f176200

Please sign in to comment.