exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

writehello-core.c

writehello-core.c
Posted Nov 8, 2005
Authored by Charles Stevenson | Site bokeoa.com

write(0,"Hello core!\n",12); shellcode for Linux x86. writehello-core.s is appended.

tags | x86, shellcode
systems | linux
SHA-256 | 41fd3af95203826a26802304166e8c49b0a8f32ba4bc6763401241d7c8b03ebf

writehello-core.c

Change Mirror Download
/* writehello-core.c by Charles Stevenson <core@bokeoa.com> 
*
* I made this as a chunk you can paste in to make modular remote
* exploits. I use it to see if my dup2_loop worked. If you don't
* get "Hello core!\n" back it's a good indicator your shell won't
* be functional the way you'd like.
*/
char hellcode[] = /* write(0,"Hello core!\n",12); linux/x86 by core */
"\x31\xdb" // xor %ecx,%ecx
"\xf7\xe3" // mul %ecx
"\x53" // push %ecx
"\x68\x72\x65\x21\x0a" // push $0xa216572
"\x68\x6f\x20\x63\x6f" // push $0x6f63206f
"\x68\x48\x65\x6c\x6c" // push $0x6c6c6548
"\xb2\x0c" // mov $0xc,%dl
"\x43" // inc %ebx
"\x89\xe1" // mov %esp,%ecx
"\xb0\x04" // mov $0x4,%al
"\xcd\x80" // int $0x80
// not needed.. makes it exit cleanly
// 7 bytes _exit(1) ... 'cause we're nice >:) by core
"\x31\xc0" // xor %eax,%eax
"\x40" // inc %eax
"\x89\xc3" // mov %eax,%ebx
"\xcd\x80" // int $0x80
;

int main(void)
{
void (*shell)() = (void *)&hellcode;
printf("%d byte (w/optional 7 byte exit) write(0,\"Hello core!\\n\",12); linux/x86 by core\n",
strlen(hellcode));
shell();
return 0;
}

# write(1,"Hello core!\n",12); _exit(1);
# by core at bokeoa dot com
.globl main
main:
xor %ebx,%ebx
mul %ebx
push %ebx # NULL
push $0x0a216572
push $0x6f63206f
push $0x6c6c6548
movb $0xc,%dl
inc %ebx
mov %esp,%ecx # char *
movb $0x4,%al # write
int $0x80
# exit(0); not required for multistage
xor %eax,%eax
inc %eax
int $0x80

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