angr / angr/angrop

Support for rebasing cached gadgets

オープン
#154 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
858
フォーク
85
平均マージ
7時間 40分
マージ済み PR(30日)
1

説明

### 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_

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。