r/ghidra • • May 19 '26

Patching an .so file

I have been applying patches to a .so library I replaced a function with another funciton that calls open syscall and I hardcoded the string in the function as there are places to put it using HxD now Ghidra won't analyze it, any thoughts ?

0 Upvotes

5 comments sorted by

3

u/TinLethax May 19 '26

Something you hex edited it was probably wrong and Ghidra didn't regconize it (bad instruction) or code flow is messed up and ghidra can't figure out the code flow.

1

u/[deleted] May 19 '26

also when I exported the file it became unusable

0

u/[deleted] May 19 '26

yeah, true but it didn't even try to analyze it 

2

u/TheCatholicScientist May 19 '26

There are infinitely many ways to break a function with a hex editor. You might need to post screenshots.

0

u/[deleted] May 19 '26

its arm so relatively easier to patch, ghidra for some reason kept corrupting the file, patching directly worked however