목록2017/05 (2)
#dokydoky
ghostparty.cpp 소스를 보면서 실제 문제가 될만한 곳들을 먼 훑어본 후, 익스플로잇 해봅니다.전체 소스코드는 여기서 확인.https://github.com/dokydoky/writeup/blob/master/pwnerable.tw/ghostparty/ghostparty.cppVulerability case 1Uninitialized variable, UAF, memory leakclass Alan : public Ghost { public : Alan():lightsaber(NULL){ type = "Alan" ; }; Alan(int ghostage,string ghostname,string ghostmsg){ type = "Alan"; age = ghostage ; name = new ch..
0. Introghostparty binary기준으로 C++ string, vector 분석 내용을 정리합니다. c++ reversing에 익숙하지 않으신 분은 Reversing C++ programs with IDA pro and Hex-rays 을 먼저 읽어보시는걸 추천합니다. reversing하면서 정의한 구조체는 맨 아래에 적어두겠습니다.c++코드와 IDA에서 decompile된 코드를 비교하면서 정리하겠습니다. (테스트 환경은 64bit Ubuntu 16.04)1. stringstring은 dynamic char 배열입니다. 표현되는 방식이 여러개 있지만, 여기서는 ghostparty 바이너리에서 사용된 방법을 기준으로 설명합니다. string의 member는 아래와 같습니다. 주의해야 할 것은..