'gef 사용법'에 해당되는 글 1건

  1. 2017.01.17 [Tip] gdb heap command(gef) 4
2017. 1. 17. 19:25

## gdb heap command(gef)


1. gef란?

=> gdb Enhanced Features의 약자로 peda와 같이 gdb에 추가적인 기능들을 실행할 수 있고 보기 좋게 

    사용할 수 있도록 만들어주는 아주 좋은 툴이다.


2. gef 다운로드 & 사용 방법

1
2
3
4
5
6
7
holinder4s@ubuntu:~$ git clone https://github.com/hugsy/gef.git
holinder4s@ubuntu:~$ gdb -q
(gdb) source ~/Desktop/plugin/gef/gef.py 
GEF for linux ready, type `gef' to start, `gef config' to configure
46 commands loaded for GDB 7.7.1 using Python engine 3.4
[*7 commands could not be loaded, run `gef missing` to know why.
gef➤ 
cs

=> 위와 같이 git clone을 한 후 gdb 실행하고 나서 gdb console에서 source명령을 실행하면 된다.


3. gef heap command(1) - (heap chunk에 대한 정보 출력)

=> gef➤ heap chunk <LOCATION>

[그림 1] heap chunk 정보 출력


4. gef heap command(2) - (heap arenas 정보 출력)

=> gef➤ heap arenas

[그림 2] heap arenas 정보 출력


5. gef heap command(3) - (bin list 정보 출력)

=> gef➤ heap bins <bin종류>

=> ex) heap bins [fast / unsorted / small / large]

[그림 3] fastbins 정보 출력


6. peda도 마찬가지~



Posted by holinder4S