No se puede ejecutar Shellcode -> (Speicherzugriffsfehler (Speicherabzug geschrieben))
Tengo esta función:
char code[] = "\xeb\x19\x31\xc0\x31\xdb\x31\xd2\x31\xc9\xb0\x04\xb3\x01\x59\xb2\x05\xcd\x80\x31\xc0\xb0\x01\x31\xdb\xcd\x80\xe8\xe2\xff\xff\xff\x68\x65\x6c\x6c\x6f";
int main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) code;
(int)(*func)();
}
(este código es de:tutorial de shellcode)
Así que lo compilé y lo ejecuté, pero solo recibí este mensaje: Speicherzugriffsfehler (Speicherabzug geschrieben).
¿Por qué no recibo algo, solo este mensaje de error?
p.s .: mi sistema es un ubuntu x86 pc. El shellcode debería funcionar con él. Lo compilé con gcc y con gcc-4.5, ambos el mismo error ...