본문 바로가기

iOS 앱 점검(ObjC)

gdb-peda 설치

반응형

gdb-peda 설치

 

git이 설치되어 있지 않다면

sudo apt install git 으로 깃 먼저 설치

 

현재 경로 아래에 깃 복사

git clone https://github.com/longld/peda.git ~/peda

 

echo로 gdbinit에 바로 쓰는 경우가 대부분인데, 명령어만 따라했다가 어떻게 되돌리냐고 묻는 경우도 있어 직접 gedit으로 해보자.

sudo gedit /etc/gdb/gdbinit 파일을 열고

 

기본 gdb

그냥 gdb인 상태에서는 위 그림처럼 아무것도 없다.

 

gdg-peda 변환

gdbinit 파일에 git clone으로 다운받은 source peda경로/peda.py를 적어주고 저장하면, gdb-peda로 변환된다.

 

aslr -- Show/set ASLR setting of GDB
checksec -- Check for various security options of binary
dumpargs -- Display arguments passed to a function when stopped at a call instruction
dumprop -- Dump all ROP gadgets in specific memory range
elfheader -- Get headers information from debugged ELF file
elfsymbol -- Get non-debugging symbol information from an ELF file
lookup -- Search for all addresses/references to addresses which belong to a memory range
patch -- Patch memory start at an address with string/hexstring/int
pattern -- Generate, search, or write a cyclic pattern to memory
procinfo -- Display various info from /proc/pid/
pshow -- Show various PEDA options and other settings
pset -- Set various PEDA options and other settings
readelf -- Get headers information from an ELF file
ropgadget -- Get common ROP gadgets of binary or library
ropsearch -- Search for ROP gadgets in memory
searchmem|find -- Search for a pattern in memory; support regex search
shellcode -- Generate or download common shellcodes.
skeleton -- Generate python exploit code template
vmmap -- Get virtual mapping address ranges of section(s) in debugged process
xormem -- XOR a memory region with a key

peda에서는 exploit을 위한 다양한 기능을 추가로 지원한다.

 

반응형