Vector35 / Vector35/binaryninja-api

Option for specifying the stack growth direction of an architecture

Aperta
#5,703 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Component: Core Core: LLIL Effort: High Impact: Low
Lingua principale
C++
Stelle
1.3k
Fork
298
Merge medio
5g 5h
PR unite (30g)
19

Descrizione

It'd be nice to be able to specify what direction the stack grows for an architecture. Right now binja assumes the stack always grows down, so LLIL_PUSH will subtract from the stack register and LLIL_POP will add to it.

I'm currently trying to make an architecture plugin for yan85 (custom architecture used in CTF challenges on pwn.college). The stack in this architecture grows upwards, but I can't seem to figure out a way to nicely implement this behavior. I've tried to manually implement the push and pop instead of using the normal LLIL_PUSH and LLIL_POP by modifying the stack pointer properly and loading/storing, but it led to an objectively worse looking decompilation.

I imagine the feature wouldn't be too hard to implement, as it would just change whether push and pop either adds or subtracts to the stack, but that's just my guess so I could be completely wrong.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start by examining the architecture-plugin API and the LLIL_PUSH and LLIL_POP operations mentioned in the issue, including how the stack register is updated. Done means an architecture can declare upward-growing stack behavior and yan85 can use the normal push/pop operations while producing better decompilation; the issue does not name specific files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
compilers, reverse-engineering
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.