
[lob] gremlin -> cobolt
·
Wargame/Hackerchool
1. intro 2. code 및 분석 2.1 C code /* The Lord of the BOF : The Fellowship of the BOF - cobolt - small buffer */ int main(int argc, char *argv[]) { char buffer[16]; if(argc < 2){ printf("argv error\n"); exit(0); } strcpy(buffer, argv[1]); printf("%s\n", buffer); } 2.3. 분석 2.3.1. assembler code (중요 부분) ... 0x8048453 :mov 0xc(%ebp),%eax #ebp+0xc의 값을 eax에 넣고 0x8048456 :add $0x4,%eax #eax + 0x4 주소를 ea..