둘둘리둘둘리둘둘리둘둘리둘둘리둘
[dark_eyes@Fedora_1stFloor ~]$ cat ./hell_fire.c/* The Lord of the BOF : The Fellowship of the BOF - hell_fire - Remote BOF on Fedora Core 3 - hint : another fake ebp or got overwriting - port : TCP 7777*/ #include int main(){ char buffer[256]; char saved_sfp[4]; char temp[1024]; printf("hell_fire : What's this smell?\n"); printf("you : "); fflush(stdout); // give me a food fgets(temp, 1024, std..
VM 이미지가 날라가서 .. 풀면서 메모한거라도 남깁니다. 제생각엔 해커스쿨 FTZ 다 푸셨다면 19번문제 제외하고는 다 이정도 힌트로 풀 수 있을거라 생각합니다.혹시라도 이 글을 보고 해커스쿨 레드햇 푸시는분은 궁금한점 물어보세요! 1. gremlin :2. cobolt :3. goblin :4. orc:5. wolfman:6. darkelf :7. orge :8. troll :9. vampire :10. skeleton :11. golem :12. darkknight :13. bugbear :14. giant : 15. assassin :16. zombie_assassin:17. succubus :18. nightmare :19. xavius :20. death_kinght : 19."\xeb\x11..
/* The Lord of the BOF : The Fellowship of the BOF - dark_eyes - Local BOF on Fedora Core 3 - hint : RET sleding*/ int main(int argc, char *argv[]){ char buffer[256]; char saved_sfp[4]; if(argc < 2){ printf("argv error\n"); exit(0); } // save sfp memcpy(saved_sfp, buffer+264, 4); // overflow!! strcpy(buffer, argv[1]); // restore sfp memcpy(buffer+264, saved_sfp, 4); printf("%s\n", buffer);} sfp값..
[gate@Fedora_1stFloor ~]$ cat ./iron_golem.c/* The Lord of the BOF : The Fellowship of the BOF - iron_golem - Local BOF on Fedora Core 3 - hint : fake ebp*/ int main(int argc, char *argv[]){ char buffer[256]; if(argc < 2){ printf("argv error\n"); exit(0); } strcpy(buffer, argv[1]); printf("%s\n", buffer);} Fedora core3부터는 redhat보다 제대로 된 ASLR이 적용되고, 라이브러리 주소가 0x00으로 시작되고, NX-Bit가 존제한다. 이 말은 즉 프로그..
#include int main(){ printf("hello\n"); printf("rekcah\n"); return 0;} 위의 소스를 예로 들어 설명함. 먼저 간략하게 설명하자면 main에서 printf 호출시 printf@plt를 호출하고 plt가 got에서 함수의 주소를 찾고 그 함수가 없으면 _dl_runtime_resolve를 통해서 함수를 찾는다.(_dl_runtime_resolve에서 got에 함수 주소를 입력해 이후로는 함수를 쉽게 찾을 수 있도록 한다) 소스 코드를 보면 과 에서 호출하는 0x080482b0 이 printf임을 짐작할 수 있다. main+36부터 따라가 보자. _init을 disassamble하고 에서 호출한 부터 보면 ds:0x08049590으로 jump한다 그럼 d..