
Binary Ninjaプラグイン。制御フローとスタックポインタをハイジャックできるFSOPコードパスを求めてglibc libioをスキャンし、ヒープエクスプロイト研究を支援する。
GLIBC Libio において制御フローとスタックポインタをハイジャックできる FSOP コードパスを見つけます。
libc.so.6 を開き、Tools -> Plugins -> Find FSOP code path をクリックするLog ウィンドウに結果が表示されます// GLIBC 2.34-0ubuntu3.2
3. _IO_wfile_underflow_mmap@0x86030 -> _IO_wdoallocbuf@0x83be0
0x8614d: call(0x83be0)
RIP/RDI DATAFLOW:
rbx = rdi -> rdi = rbx -> call(0x83be0)
RBP DATAFLOW:
rbp = [rdi + 0x98].q
CODE PATH:
eax = [rdi].d
=> [condition] (al & 4) == 0
rax = [rdi + 0xa0].q
rdx = [rax].q
=> [condition] rdx u>= [rax + 8].q
rdx = [rdi + 8].q
=> [condition] rdx u< [rdi + 0x10].q
rdi = [rax + 0x40].q
=> [condition] rdi == 0
0x83c0b: call([rax + 0x68].q)
RIP/RDI DATAFLOW:
rax = [rdi + 0xa0].q -> rax = [rax + 0xe0].q -> call([rax + 0x68].q)
RBP DATAFLOW:
(N/A)
CODE PATH:
rax = [rdi + 0xa0].q
=> [condition] [rax + 0x30].q == 0
=> [condition] ([rdi].b & 2) == 0
([0x216020] is the location of _IO_wfile_underflow_mmap in __libc_IO_vtables)
単一の FSOP 攻撃で スタックマイグレーションを実行するために使用できる FSOP コードパスで、GLIBC 2.24+ で利用可能です。これは house of apple2 としても知られ、roderick01 によって独自に発見されました。
実はこのコードパスは数週間前に発見していたのですが、ここ数日は他の作業に追われていて、誰かがすでにこのコードパスを公開していることに気づきませんでした X(
このプラグインは MIT ライセンス の下でリリースされています。