-
If I'm working with a dumped binary and want to be able to add different memory dumps to separate regions of a database, how do I do this in Binary Ninja? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Current recommendationThis question, or variations on it comes up a lot so I wanted to try to put together a longer writeup for people that have a need of this. First, this is a bit of a hack and it's necessitated by issue #920. As you can see from that issue, right now, BN wants memory to be backed by file contents because of the way the loader works. So there's two general approaches to this problem. First, you can simply concatenate the extra memory regions to the binary:
Then, when you open BN the usual executable will be parsed but nothing will be done with the additional memory. Next, simply map them where you'd like them to go by adding segments (from the BN console after loading the file):
(the flag enum is documented here) The other approach is to write your own loader from scratch. This is appropriate in some situations where the original executable doesn't have structure (it's a flat shellcode dump and you want to do multiple memory mappings yourself. The process is similar to the above, but you'd register your own loader(such as this example) doing Once #920 is resolved we'll likely add in a better UI for doing memory mappings to make this process smoother, but hopefully that explains the process for now. Updating an existing viewIf you already have an existing Binary VIew with annotations you don't want to lose and want to add some new data, you can use |
Beta Was this translation helpful? Give feedback.
Current recommendation
This question, or variations on it comes up a lot so I wanted to try to put together a longer writeup for people that have a need of this.
First, this is a bit of a hack and it's necessitated by issue #920.
As you can see from that issue, right now, BN wants memory to be backed by file contents because of the way the loader works. So there's two general approaches to this problem. First, you can simply concatenate the extra memory regions to the binary:
Then, when you open BN the usual executable will be parsed but nothing will be done with the additional memory. Next, simply map them where you'd like them to go by adding segm…