Lacking an effective way to handle structure access if the structure is represented as a sum of two registers
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- cpp
- Bereich
- compilers, reverse-engineering
Rechercherichtung
The issue names no source file, test, or entry point. Begin by studying how IL expressions are generated, serialized, and rewritten, using the PE-parsing example as the behavioral case; the work is done only when a structure type can be applied reliably to r15 + arg2 without depending on an unstable IL index.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
In this user shared binary, the function is doing some PE parsing, we can see r15 + arg2 is actually a pointer to the PE header, and at offset 0x88 lies the export directory table. The user wishes to set the type of the expression r15 + arg2 appropriately so that the code can be more readable.
A naive approach would be attempting to offer a way for the user to set the type of an arbitrary expression in the IL. This may solve the problem at first glance, however, due to the way we generate the ILs, there is no guarantee that the index of an IL expression does not change in the future. So there would be no way to reliably serialize the user provided type
Coincidentally, for the next two instructions immediately following, i.e.,
3 @ 000089d4 void* rdi_1 = arg2 + rax
4 @ 000089d8 uint64_t rsi_1 = zx.q(*(rdi_1 + 0x18))
We are not bothered by the same problem, since there is an intermediate variable rdi_1, and we can easily set the type of it to obtain better decompilation output. As such, offering a way to create intermediate variables might be a viable solution, but it will involve a large amount of effort to support.
On the other hand, it is possible to develop a workflow to insert one instruction to create the intermediate variable, and re-write the IL and replace all occurrence of r15 + arg2 with the intermediate variable. The problem is it might be too expensive to scan the code to do such replacement
- Vorherrschende Sprache
- C++
- Sterne
- 1.3k
- Forks
- 298
- Ø Merge
- 5 T. 5 Std.
- Gemergte PRs (30 T.)
- 19
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Vector35/binaryninja-api
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8540 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8516 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Vector35/binaryninja-api#8503 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8446 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8444 ·
Alle Issues in Vector35/binaryninja-api
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
gazebosim/gz-sensors#662 · 1 Kommentar ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
comp-datalake
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
ClickHouse/ClickHouse#121222 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
LadybirdBrowser/ladybird#12123 ·