
Unicorn Framework で記述された、Process Dump Emulation Environment を備えたシェルコードエミュレータ
ShellcodeEmulatorは、windbgプロセスメモリダンプを利用してWindowsシェルコードをエミュレートします。任意のWindowsプロセスダンプイメージを使用して、解析するシェルコードを提供できます。このツールは、シェルコードのバイトと提供されたダンプイメージを使用して、ユーザーランドコードを可能な限りエミュレートします。
シェルコードとカーネル層の間で使用されるAPI呼び出しの間に、カスタムシステムコールハンドラや任意のハンドラを追加できます。これにより、ユーザースタックの全体像を把握できます。また、上位のコールスタックレベルで緩いAPIフックをバイパスするシェルコードを調査することができます。
WinDbgをインストール
ShellcodeEmulatorをインストール
pip install git+https://github.com/ohjeongwook/ShellcodeEmulator --upgrade
python -m pykdfix.fix_windbg_files
> python -m shellcode_emulator.run
Usage: run.py [options] args
Options:
-h, --help show this help message and exit
-b IMAGE_BASE, --image_base=IMAGE_BASE
Image base to load the shellcode inside process memory
-d DUMP_FILENAME, --dump_filename=DUMP_FILENAME
A process dump file from normal Windows process
-l LIST_FILENAME, --list_filename=LIST_FILENAME
A list filename generated by IDA (this can be used
instead of shellcode filename)
python -m shellcode_emulator.run wincalc.bin -d notepad.dmp