
GhostDebug は、ネイティブデバッギング DLL と .NET Framework コマンドラインクライアントで構成される Windows x64 デバッガのプロトタイプです。デバッガ検出チェックを使用するターゲットのデバッグを目的としています。
設計の背景については、Windows 上で検出されないデバッガの開発 を参照してください。
Visual Studio ですべてのプロジェクトをビルドします。
ターゲットプロセスを起動します。TestTarget が簡単な例として含まれています。
GhostDebug/GhostDebug-CLI/bin/Release/ でターミナルを開き、CLI を起動します:
.\GhostDebug.exe
プロセス ID またはプロセス名でアタッチし、対話式コマンドを使用します:
attach <pid/process name>
Attach to a process.
bp <address>
Set a breakpoint.
bp <address> <command list>
Set a breakpoint with commands that are executed automatically when it hits.
cl <address>
Clear a breakpoint.
g
Resume execution.
t
Step into one instruction.
rw <register> <value>
Queue a value to be written to a register before continuing.
help
Display the command help.
アドレスは、絶対アドレス、メインモジュールからの相対アドレス(+1234)、別のモジュールからの相対アドレス(ntdll+1234)、またはシンボルによる指定(!function や kernel32!ExitProcess)が可能です。ブレークポイントはコマンドを自動実行することもできます。例: bp 1234 rw rax 0;g
CLI は ghostdebug-core.dll を含むディレクトリから実行する必要があります。また、ターゲットと CLI は同じアーキテクチャ(x64)を使用する必要があります。