Dissecting House of Apple 2 on modern glibc

Author: jazho76
Source: jazho76.github.io
Lab: github.com/jazho76/house_of_apple_2

An interactive GDB walkthrough of House of Apple 2, from FSOP to stack pivot and ROP on glibc 2.43 (Ubuntu 26.04 / Fedora 44 packaging at time of writing).

File Stream Oriented Programming (FSOP) manipulates glibc file stream structures to hijack control flow. Modern glibc validates _IO_FILE_plus vtables, so replacing the vtable with an arbitrary address aborts via _IO_vtable_check / IO_validate_vtable (vtable must fall in [__io_vtables, __io_vtables + IO_VTABLES_LEN)).

House of Apple 2

Originally introduced by Roderick, House of Apple 2 works around this by using a valid _IO_FILE_plus vtable to reach the wide-character stream machinery, where a secondary _wide_vtable is dispatched without range validation — yielding an arbitrary-call primitive that escalates into a stack pivot and ROP.