Vector35 / Vector35/binaryninja-api

Automatically type all block arguments in function definitions with Block_literal *

Aperta
#7,342 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Component: Objective-C Workflow Effort: Medium Impact: Medium
Lingua principale
C++
Stelle
1.3k
Fork
298
Merge medio
5g 5h
PR unite (30g)
19

Descrizione

When parsing Objective-C and Swift function metadata, you often encounter blocks which are stack or global closures.

When you encounter these, apply a copy of the type Block_literal * to them.

struct Block_literal {
    void *isa;                    // Pointer to block's class ("isa" pointer)
    int flags;                    // Block flags
    int reserved;                 // Reserved for future use
    void (*invoke)(void *, ...);  // Function pointer to the block's code
    struct Block_descriptor *descriptor;  // Pointer to block's descriptor
    // ... captured variables (optional, not part of base header)
};

This type is the base type of all blocks in Objective-C and Swift. It will enable proper type propagation at all the call sites. The type is just the base type -- it can be further refined by parsing the Block_descriptor. I would prefer you make a copy of the block literal, because each call site will be different and we can fine the type in a second pass.

It goes a long way towards making ObjC and Swift easier to reverse

Image

vs

Image

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

The issue names no source file, test, or entry point. Start by locating the parsing of Objective-C and Swift function metadata and block literals; done means block arguments receive copied Block_literal * types and that type propagation reaches their call sites.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.