Comments (4)
There are methods to check if a memory block is executable and if a block is read/write/volatile if this helps at all.
from ghidra_scripts.
That might be necessary, I'm not sure yet. Currently I'm experimenting with getFirstData
, getLastData
, getFirstFunction
, and getLastFunction
to find the necessary blocks and creating address ranges around those. Worked well for fixing up the code, but fixing up the data requires a little more processing.
from ghidra_scripts.
@astrelsky The getFirstX
route was a dead end because there is no guarantee the functions will be in one contiguous block. I experimented with the permission methods you mentioned in an ARM binary. Single memory blocks contained code and data which means it was marked with execute and read permissions, so not a lot to go on with that. I was able to do something similar by using a memory manager function, getExecuteSet
, it returned a range of what it considered code. This still contained some data, which introduces some false positives, but it is at least working. Going to try and lower the false positive rates a little now.
from ghidra_scripts.
@astrelsky The
getFirstX
route was a dead end because there is no guarantee the functions will be in one contiguous block. I experimented with the permission methods you mentioned in an ARM binary. Single memory blocks contained code and data which means it was marked with execute and read permissions, so not a lot to go on with that. I was able to do something similar by using a memory manager function,getExecuteSet
, it returned a range of what it considered code. This still contained some data, which introduces some false positives, but it is at least working. Going to try and lower the false positive rates a little now.
You could probably filter them further by checking if at least one disassembled instruction already exists in the memory block. If the block isn't writeable then it is more likely to only contain instructions. It can still potentially have data though.
from ghidra_scripts.
Related Issues (16)
- Display double jumps in summary.
- Add 0 base address check to codatify
- Calculate table length for leaf function tables.
- Add processor check to scripts HOT 2
- MIPs ROP - epilogue script
- Stringi HOT 2
- Important bug in rizzo script HOT 2
- Failure when saving signatures with Rizzo HOT 7
- Add PowerPC ROP Scripts if possible HOT 1
- CLI for rizzo.py HOT 1
- Fix crash in Rename Variables
- Fluorescence Indirect Function Call Decompilation. HOT 2
- Fixup pointers in codatify
- Differences in Pointer Size HOT 4
- Add structure parsing to Codatify HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghidra_scripts.