Technical Note/Linux Kernel
[KERNEL] Windows Kernel 디버깅 환경구축 (feat. VMWARE)
pwn3r_45
2019. 11. 11. 15:45
환경구축
Step#0. Windbg 설치 (Windows10 기준)
- Windows SDK 설치 시 windbg 사용 가능
https://developer.microsoft.com/ko-kr/windows/downloads/windows-10-sdk
Step#1. VMWARE 에서 시리얼 포트 추가
- Host와 Guest가 디버깅 정보를 주고 받기 위한 시리얼 포트를 설정
Menu > Edit virtual machine settings > Add > Serial Port 선택 > Output to named pipe
\\.\pipe\com_1
입력output to named pipe
Step#2. Guest Windows 에서 디버그 모드 열기
- 관리자 권한 cmd를 열어서 아래 명령 실행
bcdedit /debug on
bcdedit /dbgsettings serial debugport:2 baudrate:115200
STEP#3. Host에서 Windbg로 연결하기
- WinDbg를 실행하여
File -> Kernel Debug
선택 - COM 탭에서
Baud Rate: 115200
,Port: \\.\pipe\com_1
,Pipe 체크
- 확인누르고 Guest를 reboot.
- 제대로 설정됐다면 자동으로 붙음.
부가정보
Tip. pdb 파일 다운로러
- MS에서 특정 DLL / EXE에 대한 pdb 파일을 받을 수 있도록 다운로더를 공개
- 폐쇄망에서 분석하는 경우 추천
- https://blogs.msdn.microsoft.com/webtopics/2016/03/07/pdb-downloader/
- 해당하는 dll 파일은 아래 사이트에서 검색하여 받을 수 있음.
- https://www.pconlife.com/fileinfo/srv.sys-info/