Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully handle PIE binary with Symbion #3346

Open
degrigis opened this issue May 14, 2022 · 0 comments
Open

Gracefully handle PIE binary with Symbion #3346

degrigis opened this issue May 14, 2022 · 0 comments
Assignees
Labels
feature Adding a new control knob to something help wanted Good issue for community involvement

Comments

@degrigis
Copy link
Member

degrigis commented May 14, 2022

The new ConcreteBackerMixin for Symbion introduced a sneaky bug for PIE binaries.
When a base_addr is not specified in the main_opts for PIE binaries, the concrete_target will redirect reads to the concrete process using as base the 0x400000 address. This is of course failing.
The current workaround is to simply specify the base address of the binary from the beginning:

BASE_ADDRESS = 0x0000555555554000
self.avatar_gdb = AvatarGDBConcreteTarget(avatar2.archs.x86.X86_64, GDB_SERVER_IP, GDB_SERVER_PORT)
p = angr.Project(binary_x64, concrete_target=self.avatar_gdb, use_sim_procedures=True,
                           page_size=0x1000, main_opts={'base_addr': BASE_ADDRESS})

However, a cleaner solution would try to force the memory mapping synchronization before doing any read.

@degrigis degrigis added the help wanted Good issue for community involvement label May 14, 2022
@degrigis degrigis self-assigned this May 14, 2022
@degrigis degrigis added the feature Adding a new control knob to something label May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding a new control knob to something help wanted Good issue for community involvement
Projects
None yet
Development

No branches or pull requests

1 participant