Comments (2)
Based on the above comment, I've write an example for x86_64:
extern "C" bool is_indirect_branch_default_impl(uint8_t *insn_data, size_t insn_size) {
size_t ttCount;
BNInstructionTextToken* ttResult = NULL;
BNGetInstructionText(arch, (const uint8_t*) insn_data, 0 /*addr*/, &insn_size, &ttResult, &ttCount);
std::string call_op = "call";
auto opcode = ttResult[0];
// auto padding = ttResult[1];
auto first_operand = ttResult[2];
if ((call_op.compare(opcode.text) == 0) && (first_operand.type != BNInstructionTextTokenType::CodeRelativeAddressToken)){
return true;
}
//BNInstructionInfo info;
//BNGetInstructionInfo(arch, insn_data, 0, insn_size, &info);
//for (int i = 0; i < info.branchCount; i++) {
// BNBranchType br = info.branchType[i];
// if ((br == BNBranchType::IndirectBranch) || (br == BNBranchType::UnresolvedBranch)) {
// return true;
// }
//}
return false;
}
from ibresolver.
I've tested arm32 blx reg
instructions, and the results are similar: BN does not recognize these instructions as branches.
from ibresolver.
Related Issues (10)
- Handle branches that occur in the middle of a block HOT 1
- Support Vivisect as a frontend HOT 1
- Make resolving jumps to dynamically linked shared objects less arch-specific
- Remove need to pass in indirect callsites HOT 2
- Check if branches on ARM32 switch between THUMB/ARM mode HOT 2
- Fix support for non-native binaries
- The Binaryninja backend doesn't mark indirect calls correctly HOT 1
- Consecutive indirect branches are not handled properly
- Add trace output for DARPA AMP challenges
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 ibresolver.