Path: blob/master/modules/host/get_registry_keys/module.rb
1154 views
#1# Copyright (c) 2006-2025 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4#5class Get_registry_keys < BeEF::Core::Command6def self.options7[8{ 'name' => 'key_paths', 'ui_label' => 'Key(s)', 'description' => 'Enter registry keys. Note: each key requires its own line', 'type' => 'textarea', 'width' => '500px', 'height' => '350px', 'value' => 'HKLM\\SYSTEM\\CurrentControlSet\\Control\\SystemInformation\\SystemProductName9HKLM\\SYSTEM\\CurrentControlSet\\Control\\SystemInformation\\SystemManufacturer10HKLM\\SYSTEM\\CurrentControlSet\\Control\\SystemInformation\\BIOSVersion11HKLM\\SYSTEM\\CurrentControlSet\\Control\\SystemInformation\\BIOSReleaseDate12HKLM\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ComputerName\\ComputerName13HKLM\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\ComputerName14HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\RegisteredOwner15HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\RegisteredOrganization16HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName17HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\ProcessorNameString18HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\Identifier' }19]20end2122def post_execute23content = {}24content['result'] = @datastore['key_values'] unless @datastore['key_values'].nil?25content['fail'] = 'No data was returned.' if content.empty?26save content27end28end293031