Developer knowledge network ยท moderated exchange

Komunitas Kode Tidak Dapat Diandalkan

Riset Pengembang, Rekayasa Terbalik & Komunitas Pengkodean

Knowledge indexHidup
4Categories
919Threads
2.8KPostingan
Guide

Calculating 64-bit RIP-Relative 5-Byte Direct vs 14-Byte Indirect Jumps in x64 [v2.4 Technical Discussion]

hook_doctor
Hooking Specialist
MEMBER
Reputasi: 181
Tanggal Bergabung: Jul 2019
Postingan: 21
Terima kasih: 50
1 bulan yang lalu ยท Jul 7, 2026 3:07 AM
#1

Why 64-bit hooks fail when target functions are > 2GB away in virtual address space:

  1. 5-Byte JMP (E9 [disp32]):
    $$\text{disp32} = \text{TargetAddress} - (\text{HookAddress} + 5)$$
    Limited to $\pm 2\text{GB}$ range from instruction pointer.
  2. 14-Byte Absolute Indirect JMP:
ASM
   FF 25 00 00 00 00       ; jmp qword ptr [rip + 0]
   AA BB CC DD EE FF 00 11 ; 64-bit Target Absolute Pointer

Reaches any 64-bit address anywhere in virtual RAM without register clobbering!

vtable_slayer
Senior Reverser
MEMBER
Reputasi: 215
Tanggal Bergabung: Mar 2018
Postingan: 86
Terima kasih: 61
1 bulan yang lalu ยท Jul 7, 2026 7:43 AM
#2

Using a 14-byte indirect jump eliminates the need to allocate trampolines within 2GB of the target module. Great explanation.

x64_assembler
Assembly Guru
MEMBER
Reputasi: 99
Tanggal Bergabung: Sep 2022
Postingan: 14
Terima kasih: 16
1 bulan yang lalu ยท Jul 7, 2026 9:38 PM
#3

Clean assembly encoding breakdown.