refactor linux hashdump post module

linux hashdump now saves hashes as nonreplayable hash
credential objects
bug/bundler_fix
David Maloney 2014-06-06 15:21:47 -05:00
parent 4d53c18ac4
commit 534c20d5e6
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 13 additions and 0 deletions

View File

@ -38,6 +38,19 @@ class Metasploit3 < Msf::Post
# Unshadow the files
john_file = unshadow(passwd_file, shadow_file)
john_file.each_line do |l|
hash_parts = l.split(':')
credential_data = {
jtr_format: 'md5,des,bsdi,crypt',
origin_type: :session,
post_reference_name: self.refname,
private_type: :nonreplayable_hash,
private_data: hash_parts[1],
session_id: session_db_id,
username: hash_parts[0],
workspace_id: myworkspace_id
}
create_credential(credential_data)
print_good(l.chomp)
end
# Save pwd file