From 67b0d973af7ebd9ae4db6e18445e83c36bec1a64 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Wed, 1 Aug 2018 16:04:06 +0200 Subject: [PATCH] chg: [Keys] detect ssh2 private key --- bin/Keys.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/Keys.py b/bin/Keys.py index 7b1ec7dc..e1f0467a 100755 --- a/bin/Keys.py +++ b/bin/Keys.py @@ -71,6 +71,14 @@ def search_key(paste): p.populate_set_out(msg, 'Tags') find = True + if '---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----' in content: + publisher.warning('{} has an openssh private key message'.format(paste.p_name)) + print('SSH2 private key message found') + + msg = 'infoleak:automatic-detection="private-ssh-key";{}'.format(message) + p.populate_set_out(msg, 'Tags') + find = True + if '-----BEGIN OpenVPN Static key V1-----' in content: publisher.warning('{} has an openssh private key message'.format(paste.p_name)) print('OpenVPN Static key message found')