Support for rebasing cached gadgets
- Ngôn ngữ chính
- Python
- Star
- 858
- Fork
- 85
- Merge trung bình
- 7 giờ 40 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
### Description
When attempting to load gadgets from a saved gadget file from an ASLR enabled binary such as libc.so.6, angrop seems not adjust the loaded gadgets to the provided `base_addr`.
```py
proj = angr.Project(LIBC_PATH, main_opts={'base_addr': libc_base}, auto_load_libs=False)
rop = proj.analyses.ROP()
if os.path.exists(LIBC_GADGETS):
print("Loading libc gadgets from:", LIBC_GADGETS)
rop.load_gadgets(LIBC_GADGETS)
else:
rop.find_gadgets()
rop.save_gadgets(LIBC_GADGETS)
print("Gadgets saved to:", LIBC_GADGETS)
chain = rop.func_call(system_addr, [binsh_addr])
rop = chain.payload_str()
```
```sh
File "/home/chase/venv/lib/python3.12/site-packages/angr/engines/vex/lifter.py", line 245, in lift_vex
raise SimEngineError(f"No bytes in memory for block starting at {addr:#x}.")
angr.errors.SimEngineError: No bytes in memory for block starting at 0x7bbd264ec973.
```
Then, when checking what my previous run leaked for the libc base, I had:
Libc: `0x7bbd26400000`
### Alternatives
_No response_
### Additional context
_No response_
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.