Support `.callers` and other `Function` methods for extern functions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
Direzione di ricerca
Start by reviewing issue #2663 and the existing Function APIs around bv.get_functions_by_name, then trace how extern calls are represented by MediumLevelILExternPtr in MediumLevelILCall. Done means extern functions expose the requested Function-style queries, or a documented query for their call sites without manually walking every function's IL.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What is the feature you'd like to have?
I'd like extern (imported) functions to be fully represented as Function objects (or at least to have a wrapper/interface that behaves similarly), so that I can use standard API methods and properties like .callers, .caller_sites, etc. For example, I'd expect bv.get_functions_by_name("strcpy") to return the extern function if it's present in the binary.
Is your feature request related to a problem?
Yes. Currently, extern functions (such as those from standard libraries) are represented differently in the MLIL (e.g., as MediumLevelILExternPtr in the dest field of MediumLevelILCall). Because of this, I cannot interact with them using the same APIs available for regular functions. As a result, methods like .callers and .caller_sites do not work for them. There also seems to be no straightforward way to get call sites to extern functions without iterating through all IL instructions in all functions manually.
Are any alternative solutions acceptable?
If exposing extern functions as regular Function objects is not feasible, I would appreciate an alternative API that allows querying for call sites to extern functions by name or address, without needing to manually walk through every function's IL.
Additional Information:
This feature would improve the developer experience when writing plugins or analyses that rely on detecting uses of unsafe or critical extern functions like strcpy, malloc, or system.
This might be related to or similar to issue #2663.
- Lingua principale
- C++
- Stelle
- 1.3k
- Fork
- 298
- Merge medio
- 5g 5h
- PR unite (30g)
- 19
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Vector35/binaryninja-api
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8540 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8516 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Vector35/binaryninja-api#8503 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8446 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8444 ·
Tutte le issue di Vector35/binaryninja-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gazebosim/gz-sensors#662 · 1 commento ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
comp-datalake
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
LadybirdBrowser/ladybird#12123 ·