[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : linux/x86 normal exit w/ random (so to speak) return value 5 bytes
# Published : 2006-01-21
# Author : izik
# Previous Title : linux/x86 connect-back shellcode 127.0.0.1:31337/tcp 74 bytes
# Next Title : bsd/x86 setuid/execve shellcode 30 bytes


/*
 * (linux/x86) normal exit w/ random (so to speak) return value - 5 bytes
 * - izik <izik@tty64.org>
 */

char shellcode[] = 

	"x31xc0"              // xor %eax,%eax 
	"x40"                  // inc %eax 
	"xcdx80";             // int $0x80 

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

// www.Syue.com [2006-01-21]