리버싱CTF/Protostar 7

Stack5 (Success)

About Stack5 is a standard buffer overflow, this time introducing shellcode. This level is at /opt/protostar/bin/stack5 Hints At this point in time, it might be easier to use someone elses shellcode If debugging the shellcode, use \xcc (int3) to stop the program executing and return to the debugger remove the int3s once your shellcode is done. Key point 1. 버퍼오버플로우 취약점을 이용해 실제로 쉘코드를 실행해보는 문제다. 2...

Stack5(Fail)

About Stack5 is a standard buffer overflow, this time introducing shellcode. This level is at /opt/protostar/bin/stack5 Hints At this point in time, it might be easier to use someone elses shellcode If debugging the shellcode, use \xcc (int3) to stop the program executing and return to the debugger remove the int3s once your shellcode is done. 버퍼오버플로우 취약점을 이용해 실제로 쉘코드를 실행해보는 문제다. 쉘코드를 만드는 과정은 쉽지..

Stack3

About 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 Point - 이전 문제와 비슷하다. - 다른점은 환경변수가 아닌 사용자 입력 값을 버퍼에 덮어 씌울때를 악용하여 다음에 실행될 명령어(PC)의 값을 수정하는..

Stack2

AboutStack2 looks at environment variables, and how they can be set. This level is at /opt/protostar/bin/stack2 Key Point- 소스코드를 참고하자.- GREENIE 환경변수에 입력된 값을 이용해서 풀어야한다. 1.패턴생성pattern create 환경변수에 패턴입력export GREEIE=패턴 입력 2.확인echo $GREENIE 3.GDB 실행 후 코드 확인0x1053c cmp r3, r2bne 0x10550 4.레지스터 상태 확인r2= 0x0d0a0d0ar3=qaaa(나의 패턴 값) 5.qaaa 패턴 위치 확인gef> pattern search qaaa[+] Searching 'qaaa'[+] Found at..

Stack1

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 Hints If you are unfamiliar with the hexadecimal being displayed, “man ascii” is your friend. Protostar is little endian Key Point 1. 문제를 푸는 것 보다. 변수에 저장되어있는 위치를 알아내는것이 키포인트 2. 파이썬 백트릭 사용하여 매개변수 넣는법을 알아야함. 3. 패턴으로 파악시 패..