728x90
반응형
서론
gef가 익숙하고 편해서 사용하고 있었으나, 무슨 이유인지 모르겠지만 kernel debuging 시 register, stack, code 모든 영역의 값이 제대로 나오지 않는 문제가 발생했다.
지원은 하긴 할텐데 정확히 이유를 알 수 없어 어쩔 수 없이 pwndbg를 설치하였다.
설치 방법
아래를 차례로 실행하면 끝.
git clone https://github.com/pwndbg/pwndbg
cd pwndbg
./setup.sh
kernel debuging 기본 셋팅
아래 스크립트를 기준으로 실행하면 된다.
#! /bin/sh
gdb \
-ex "add-auto-load-safe-path $(pwd)" \
-ex "file vmlinux" \
-ex 'set arch i386:x86-64' \
-ex 'target remote localhost:1234' \
-ex 'gef config gef.debug 1' \
-ex 'break start_kernel' \
-ex 'continue' \
-ex 'disconnect' \
-ex 'set arch i386:x86-64' \
-ex 'target remote localhost:1234' \
728x90
반응형
'Kernel Exploit' 카테고리의 다른 글
Kernel - SMEP 우회, krop (0) | 2023.09.07 |
---|---|
kernel - ret2usr (0) | 2023.08.27 |
rootfs.cpio 파일 추가 shell script (0) | 2023.08.21 |
Kernel 보호기법 및 우회법 (0) | 2023.08.20 |
exploit binary를 커널 이미지에 삽입하기. (0) | 2023.08.20 |