Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/hp_ucmdb_add_user_csrf/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
7
class Hp_ucmdb_add_user_csrf < BeEF::Core::Command
8
def self.options
9
[
10
{ 'name' => 'protocol', 'type' => 'combobox', 'ui_label' => 'Protocol', 'store_type' => 'arraystore',
11
'store_fields' => ['protocol'], 'store_data' => [['http'], ['https']],
12
'valueField' => 'protocol', 'displayField' => 'protocol', 'mode' => 'local', 'value' => 'http', 'autoWidth' => true },
13
{ 'name' => 'host', 'ui_label' => 'Host', 'value' => '127.0.0.1' },
14
{ 'name' => 'port', 'ui_label' => 'Port', 'value' => '8080' },
15
{ 'name' => 'usertype', 'type' => 'combobox', 'ui_label' => 'Type of user', 'store_type' => 'arraystore',
16
'store_fields' => ['usertype'], 'store_data' => [['createUser'], ['createIntegrationUser']],
17
'valueField' => 'usertype', 'displayField' => 'usertype', 'mode' => 'local', 'value' => 'createUser', 'autoWidth' => true },
18
{ 'name' => 'customerid', 'ui_label' => 'CustomerID', 'value' => '1' },
19
{ 'name' => 'username', 'ui_label' => 'Desired username', 'value' => 'BeEF' },
20
{ 'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__' }
21
]
22
end
23
24
def post_execute
25
save({ 'result' => @datastore['result'] })
26
end
27
end
28
29