-
Notifications
You must be signed in to change notification settings - Fork 37
Help: wondering some code snippets' implement. #8
Copy link
Copy link
Open
Description
Line 129 in 30ed509
| if (shtable[j+1].sh_addr - shtable[j].sh_addr+shtable[j].sh_size >= patch_size+stager_size) { |
I plot a layout like the following:
|------------------| <-- shtable[j].sh_addr
| | ↑
| | |
| content of | shtable[j].sh_size
| section | |
| | ↓
|------------------| <-------------------|
| vacuum |
| for payload |
| inject |
|------------------| <-- shtable[j+1].sh_addr
patch_size and stager_size together represent the total size of the payload. Therefore, I believe that the correct condition would be shtable[j+1].sh_addr - shtable[j].sh_addr - shtable[j].sh_size >= patch_size + stager_size. However, please let me know if I have misunderstood the implementation or if there are any errors in my statement."
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels