LibAFL icon indicating copy to clipboard operation
LibAFL copied to clipboard

LibAFL Frida asan_rt and hook_rt fixes for frida_windows

Open mineo333 opened this issue 1 year ago • 0 comments

This implements various fixes for libafl_frida including fixing the poison/unpoison routine, fixing the ASAN checks on both x86 and aarch64, and redesigning hook_rt for x86 and aarch64. The new design is checks for hooked addresses dynamically instead of statically.

For indirect branches (i.e., loads from memory/branches to registers), it gets the address and checks if it is hooked. If it is hooked, then run the routine and chaining return. If it is not hooked, then go to the kept next instruction.

For direct branches, the hook is checked at block compilation.

Other fixes include moving away from mmap_rs as its broken on darwin as well as fixing the function hooking macro.

This patch is dependent on: https://github.com/frida/frida-rust/pull/132 and https://github.com/frida/frida-gum/pull/777

mineo333 avatar Apr 23 '24 18:04 mineo333