Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have different pieces of code which are going to be inserted at the end of each basic block in CFG (Control Flow Graph). We don't have the source code. An executable file is available. I have readed a lot about code injection. Basically, I have readed about binary instrumentation, there are two types of instrumentations: Static and Dynamic binary instrumentation. Static binary instrumentation is what I need in my work. I have checked seveal tools and api. Finally I found Dyninst api. I installed it but at this time, I failed to inject my code. Is there any full example describes how to use the Dyninst api.
Thanks a lot.

What I have tried:

T have tried to use Dyninst api but I couldn't. After that, I tried to write my own program based on Ptrace system call. It is very complex. I have check PIN inter tool for instrumentation. I think, Pin is not suitable for ststic instrumentation.
Posted
Updated 7-Mar-18 5:01am

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900