본문 바로가기

system

[protostar]stack4.c 문제 Stack4 takes a look at overwriting saved EIP and standard buffer overflows. This level is at /opt/protostar/bin/stack4 Hints: A variety of introductory papers into buffer overflows may help. gdb lets you do "run < input" EIP is not directly after the end of buffer, compiler padding can also increase the size. stack4는 표준의 버퍼 오버플로우와 저장된 EIP의 오버라이팅에 주목한다 코드 #include #include #include #include vo.. 더보기
[protostar]stack3.c 문제 Stack3 looks at environment variables, and how they can be set, and overwriting function pointers stored on the stack (as a prelude to overwriting the saved EIP) Hints: both gdb and objdump is your friend you determining where the win() function lies in memory. This level is at /opt/protostar/bin/stack3 stack3는 환경변수와 그들이 어떻게 set되는지 본다. 그리고 스택에 저장된 함수 포인터를 오버라이팅하는 것을 본다. 힌트: 메모리에 win()가 있을 때 g.. 더보기
[protostar]stack0 설명 This level introduces the concept that memory can be accessed outside of its allocated region, how the stack variables are laid out, and that modifying outside of the allocated memory can modify program execution. 할당된 부분 밖에서에 대한 이야기를 하는 듯 하다. stack0.c #include #include #include int main(int argc, char **argv) { volatile int modified; char buffer[64]; modified = 0; gets(buffer); if(modified !=.. 더보기
[protostar]stack1.c This level looks at the concept of modifying variables to specific values in the program, and how the variables are laid out in memory. 이 레벨은 프로그램에서 특정 변수로 변경하는 개념으로 보인다. 그리고 어떻게 변수들이 메모리에 배치되는지를 살펴본다. This level is at /opt/protostar/bin/stack1 이 위치에서 문제를 풀면 된다. 이제 코드를 살펴본다. #include #include #include #include int main(int argc, char **argv) { volatile int modified; char buffer[64]; if(argc == 1.. 더보기
[protostar]stack2 Stack2 looks at environment variables, and how they can be set. This level is at /opt/protostar/bin/stack2 Stack2에선 환경변수를 보고 그 변수들이 어떻게 세팅되는지 확인한다고 한다. 아래의 경로에서 작업하면 된다. -stack2.c #include #include #include #include int main(int argc, char **argv) { volatile int modified; char buffer[64]; char *variable; variable = getenv("GREENIE"); if(variable == NULL) { errx(1, "please set the GREENIE environ.. 더보기

반응형
LIST