u/mymonstersprotectme

▲ 2 r/ghidra

"Bulk patching" a file with assembly

I'm working on some reverse engineering crackmes in a class, and I want to try to do something. The exercise has a big chunk of dynamically loaded code at the end of a function. I can view the assembly of the loaded code using gdb, and output it to a file, but I don't have a way to put it through a decompiler.

The binary has a section of memory that is reserved for this block. So in my head, it makes sense that I could simply "copy" that dynamically loaded block and add it to the binary in the correct location. Then I could export my modified file and put it back through Ghidra to get the decompilation of my function.

Is this at all possible, or am I talking nonsense? Sorry if I'm not using the right vocabulary, I'm still kind of at a "reverse engineering 101" level.

reddit.com
u/mymonstersprotectme — 2 days ago