Vector35 / Vector35/binaryninja-api

Define `tcbhead_t` struct for GNU Linux programs and set `$fs` to be a pointer to it

Aperta
#4,747 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

What is the feature you'd like to have?
I would like the struct tcbhead_t structure to be added to the system types for binaries that can be identifiedd as GNU Linux binaries, and for $fs to point to it.

This makes

void* fsbase
int64_t rax = *(fsbase + 0x28)
...
if (rax == *(fsbase + 0x28)) {
    return 0
}
...
__stack_chk_fail()

Into a slightly more readable

struct tcbhead_t* fsbase
int64_t stack_guard = fsbase->stack_guard
...
if (stack_guard == fsbase->stack_guard) {
    return 0
}
...
__stack_chk_fail()

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 with the linked glibc sysdeps/x86_64/nptl/tls.h definition of tcbhead_t, then locate how GNU Linux system types and the $fs register are represented in Binary Ninja. Confirm how GNU Linux binaries are identified and how existing architecture-specific types are added. Done means $fs has the named structure type and stack_guard access decompiles readably for the shown pattern.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.