googleprojectzero / googleprojectzero/TinyInst
Improving fuzzing speed ideas
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Description
Hello @ifratric! I really enjoyed an elegant instrumentation idea behind the TinyInst.
However, I was thinking about reducing the slowdown caused by "entries" into the instrumented module and first idea that came to my mind was next.
Why not to put int3s on whole code section, instrument code as usual, and after that, put jump instead of particular int3s?
Several issues with this approach immediately arisen:
- Basicblock size could be less than 5 bytes, this is not enough to place
jmp <rel32>.
This could be tackled in several ways, which seams realistically solvable.
- Code section could have data in it, thus int3s are damaging that data. For example some switch cases causing image relative offsets in code section.
This is major problem to me and this is actually my question. Several solutions came into my mind
2.1) It could be solved by taking information about basicblocks from huge disassemblers like IDA or Ghydra (this is what Mesos does) and placing int3s only at the start of the basicblock. This solution works (at least for my tests on regular Microsoft's dlls), but requires additional dependency.
2.1) Instrument each indirect mov instruction and check if the data is taken from code section and redirect it to proper data (similarly to the indirect branches current instrumentation). This is actually slow and would be a bit complex task to implement.
Am I'm overlooking anything? Maybe there is some fast code flow analysis tactic to distinguish data from code?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or concrete entry points are named. Start by reviewing TinyInst's current instrumentation of basic blocks and indirect branches, then evaluate the proposed int3 and jump approach against code-section data; the issue provides no defined acceptance criteria or clear stopping point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, performance, reverse-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100