lldb 패널 커스텀

Tags
동적분석
tools
요약
Voltron + tmuxinatorlldb 패널을 보기좋게 구성하자

lldb 패널 커스텀

  • 무설정 : Peda, pwndbg, gef 없이 순수 Gdb로 디버깅 하는 격 ( 사서 고생한다는 뜻 )
  • 아래 그림과 같이 구성해보자 (Voltron + tmuxinator)
notion image
 

voltron 설치

1) 소스코드 수정 (트러블슈팅)

  • xcode, lldb 기본 파이썬은 python3.
  • Python2의 ‘xrange’가 Python3에서 ‘range’로 바껴서 소스 변경 필요함.
notion image

2) voltron 설치

  • Dbg_lldb.py의 xrangerange로 변경했다면
# voltron 설치 # lldb init파일 수정까지 알아서 진행됨~! $ ./install.sh
notion image

3) core.py import 변경 ( 트러블슈팅 )

notion image
notion image

4) Voltron 설치완료

notion image
notion image

5) Voltron 바이너리 경로 환경변수에 추가

어떤 경로에서든 편하게 실행할 수 있도록 환경변수에 등록하자
notion image

6) lldb 패널 구성

# 스택창 $ voltron view stack # 디스어셈창 $ voltron view dis # 백트레이스창 $ voltron view bt # 레지스터창 $ voltron view reg
  • Voltron view stack/dis/bt/reg로 화면 구성 가능!
  • (각각 별도의 터미널을 열어서 수행)
notion image

7) tmuxinator 활용하기

매번 저렇게 여러개의 창을 띄우는 명령어를 별도로 치는 것은 다소 불편함.
tmuxinator로 불편함을 해소시켜 보자.
  1. brew install tmux
  1. brew install ruby
  1. gem install tmuxinator
  1. export EDITOR=‘vim’
  1. tmuxinator new ‘이름’
  1. 패널 구성 셋팅
  1. tmuxinator start ‘이름’
  1. 끝!
notion image
notion image

8) tmux에서 현재 포커스된 lldb 윈도우 변경

notion image