FC3 iron_golem -> dark_eyes

ret sleding에 대해 쓰는 글 아래는 코드 /* 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); // [Read More]

The Lord of the BOF - assassin -> zombie_assassin

코드는 이렇다. /* The Lord of the BOF : The Fellowship of the BOF - zombie_assassin - FEBP */ #include <stdio.h> #include <stdlib.h> main(int argc, char *argv[]) { char buffer[40]; if(argc < 2){ printf("argv error\n"); exit(0); } if(argv[1][47] == '\xbf') { printf("stack retbayed you!\n"); exit(0); } if(argv[1][47] == '\x40') { printf("library retbayed you, too!!\n"); exit(0); } // strncpy instead of strcpy! strncpy(buffer, argv[1], 48); printf("%s\n", [Read More]

The Lord of the BOF - darkknight -> bugbear

return to library 개념 이해하기 아래는 문제의 코드 /* The Lord of the BOF : The Fellowship of the BOF - bugbear - RTL1 */ #include <stdio.h> #include <stdlib.h> main(int argc, char *argv[]) { char buffer[40]; int i; if(argc < 2){ printf("argv error\n"); exit(0); } if(argv[1][47] == '\xbf') { printf("stack betrayed you!!\n"); exit(0); } strcpy(buffer, argv[1]); printf("%s\n", buffer); } 이전 [Read More]

Pwnable KR - simple login

문제 50점 문제 풀이 아이다로 열어서 main 함수를 보면 Base64Decode 함수를 거쳐서 그 글자가 12글자를 넘지 않았을 때, memcpy 함수와 auth 함수를 실행할 수 있다. auth 함수를 보면 위에 calc_md5 함 [Read More]

TU CTF 2016 - WoO2

TU CTF 2016에서 못푼 문제 $ ./WoO2 Welcome! I don't think we're in Kansas anymore. We're about to head off on an adventure! Select some animals you want to bring along. Menu Options: 1: Bring a lion 2: Bring a tiger 3: Bring a bear 4: Delete Animal 5: Exit Enter your choice: 5 $ 실행하면 이렇게 뜬 [Read More]