binaryninja-api
binaryninja-api copied to clipboard
allow modification of memory for segments not backed by files
Currently, it is not possible to modify memory unless it's backed by a file. It should be possible to arbitrary memory though. Requires a new ability to store arbitrary memory in the bndb among other changes.
Yes please. I can’t believe there isn’t a ticket for this already haha. I’ve wanted this since I started implementing an LLIL emulator!
Related to #1508
Please, let's address this as it is a very important feature that makes BN almost useless when working with packers
This capability is now provided with the new MemoryMap API. The MemoryMap itself is still under development with respect to other features, however the ability to provide persistent storage is functional and supported.
In the UI you can use the command palette action 'Load File at Address...'
In Python you can use the add_memory_region method to pass bytes or a file.
view.memory_map.add_memory_region("rom", rom_base, b'\x90' * 4096)
Added in 4.1.5295-dev.