Vector35 / Vector35/binaryninja-api
Option for specifying the stack growth direction of an architecture
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
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.
Contributor guide
No contributing guide indexed for this repository
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
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers, reverse-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100