discv5: attacks mitigation proposal

オープン
#161 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞

調査の方向性

このissueでは、ファイル、テスト、エントリポイントが指定されていません。まずdiscv5仕様と提案されている2つの緩和策を確認してください。完了とするには、仕様に関する推奨事項を決定する必要がありますが、このissueでは実装手順も受け入れ基準も定義されていません。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
1.1k
フォーク
301
平均マージ
12時間 3分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ethereum/devp2p のほかの issue

ethereum/devp2p の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。