• [System] Gadget

    Gadget의 본래의 개념은 프로그램 상에서 코드 조각을 지칭하였으며, 프로그램 내에 존재하는 명령어 조각. 기존 프로그램에 존재하지만 libc파일에도 존재하며, ret로 끝나는 연속된 명령어들을 의미. 하는 함수의 인자가 3개 일 경우 : "pop; pop; pop; ret" 호출 하는 함수의 인자가 2개 일 경우 : "pop; pop; ret" 호출 하는 함수의 인자가 1개 일 경우 : "pop; ret" 호출 하는 함수의 인자가 없을 경우 : "ret" 참고 : https://hg2lee.tistory.com/entry/%EC%8B%9C%EC%8A%A4%ED%85%9C-Gadget-%EA%B0%80%EC%A0%AF Gadget 구하는 방법 1. ROPgadget 활용 설치 방법 $ python3 -..

  • [Dreamhack - System] Stack Canary 정리

    [Dreamhack - System] Stack Canary 정리

    스택 카나리는 함수의 프롤로그에서 스택 버퍼와 반환 주소 사이에 임의의 값을 삽입하고, 함수의 에필로그에서 해당 값의 변조를 확인하는 보호 기법이다. 카나리 값의 변조가 확인되면 프로세스는 강제로 종료된다. 첫바이트가 NULL바이트 8바이트값이 카나리 값이다. + x64 아키텍처에서는 8바이트의 카나리가 생성되며, x86 아키텍처에서는 4바이트의 카나리가 생성된다. 각각의 카나리에는 NULL 바이트가 포함되어 있으므로, 실제로는 7바이트와 3바이트의 랜덤한 값이 포함된다. fs와 TLS fs는 세그먼트 레지스터이다. 특정한 목적이 정해지지 않은 것으로 운영체제에서 임의로 사용할 수 있는 레지스터로, Thread Local Storage(TLS)를 가리키는 포인터로 사용된다. TLS에 카나리를 비롯하여 프..

  • OverTheWire : Bandit Level 10 -> Level 11

    OverTheWire : Bandit Level 10 -> Level 11

    https://overthewire.org/wargames/bandit/bandit11.html OverTheWire: Level Goal We're hackers, and we are good-looking. We are the 1%. Level Goal The password for the next level is stored in the file data.txt, which contains base64 encoded data Commands you may need to solve this level grep, sort, uniq, strings, base64, tr, tar, gzip, overthewire.org Level Goal The password for the next level is s..

  • OverTheWire : Bandit Level 9 -> Level 10

    OverTheWire : Bandit Level 9 -> Level 10

    https://overthewire.org/wargames/bandit/bandit10.html OverTheWire: Level Goal We're hackers, and we are good-looking. We are the 1%. Level Goal The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters. Commands you may need to solve this level gre overthewire.org Level Goal The password for the next level is store..

  • OverTheWire : Bandit Level8  -> Level 9

    OverTheWire : Bandit Level8 -> Level 9

    https://overthewire.org/wargames/bandit/bandit9.html OverTheWire: Level Goal We're hackers, and we are good-looking. We are the 1%. Level Goal The password for the next level is stored in the file data.txt and is the only line of text that occurs only once Commands you may need to solve this level grep, sort, uniq, strings, base64, overthewire.org Level Goal The password for the next level is st..