완료됨
Why did we used the 8n

Im kind of stuck in thinking like why we used 8n (8th argument) was there any reason behind that?

#pwnable
작성자 정보
더 깊이 있는 답변이 필요할 때
드림핵 팀과 멘토에게 직접 문의해 보세요!
답변 1
kimht
공부벌레
kimht
공부벌레

Starting from the 6th argument (%6$), values are taken from [rsp]. The 7th argument (%7$) comes from [rsp+8], and the 8th argument (%8$) comes from [rsp+0x10].

When printf() is called, the user’s input is stored starting at the rsp location. By crafting the payload so that the address of changeme is placed at [rsp+0x10], the %8$n format specifier can then be used to write a value into the changeme variable.

2025.09.08. 17:57