discv5: attacks mitigation proposal

Aperta
#161 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma

Direzione di ricerca

L’issue non indica file, test o punti di ingresso. Inizia esaminando la specifica discv5 e le due mitigazioni proposte; per considerarlo completato sarebbe necessaria una raccomandazione sulla specifica su cui è stata presa una decisione, ma l’issue non definisce passaggi di implementazione né criteri di accettazione.

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

Descrizione

cc @jrhea

This issue is a proposal of including the following counter-measures as recommendations into discv5 spec. Clients should make their own decision on whether to implement them or not.

Rate limit processing of unsolicited messages

  • Only N unsolicited messages per unit of time should be processed. Once that limit is reached, implementations should drop requests.
  • The other potential approach to rate limiting is to limit a number of threads that processes discovery requests to e.g. a single thread.
Rationale

In a permissionless discovery network rate limiting seems the only proven counter-measure against DoS attacks. It's been figured out by @jrhea with his attacks on Prysm, Teku and Lighthouse where Lighthouse was pretty successful in resisting those attacks because of implemented rate limiting mechanism.

New nodes should temporarily ignore unsolicited messages from unknown peers

For some period of time, depending on the implementation, new nodes should not respond to:

  • unsolicited messages from unknown peers
  • unsolicited messages from ANY peers

I.e. there is a trial period with only egress sessions allowed. The second option could lead to the liveness check failure in rare case, while the former requires to store any peer that the node had an egress session with.

Rationale

This should give the node a chance to explore the network before an attacker can actively attempt to eclipse it.

An example of this kind of eclipse attack goes beyond discovery and involves application layer. For instance, in Eth1 and Eth2 attacker may quickly find a young node and offer it malicious information about the state of the chain causing the node to make a wrong decision about the sync with any potential output.

This proposal is akin to a counter-measure implemented in go-ethereum where young nodes are started to get advertised after a short period of time.

Lingua principale
JavaScript
Stelle
1.1k
Fork
301
Merge medio
12h 3m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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.

Altre issue di ethereum/devp2p

Tutte le issue di ethereum/devp2p

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.