Paul Hauner
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Eth 2.0 DoS Workshop 29/10/2018 - Ethereum 2.0 workshop in Prague. Attendees: - Paul Hauner - Nishant - Jacek - Mikerah - Medhi - Mike - Mamy ## Objectives 1. Create a list of potential DoS vectors. 2. Explore mitigations for identified vectors. 3. Recommendations ## DoS Overview Denial of Service attacks prevent a service from performing it's duty. Typically they involve the consumation of all available resources so that a service can no longer function. In the context of Ethereum 2.0, some things to consider may involve: * Mechanisms that causes nodes of the P2P network from functioning. * A flaw in implementation could cause a node crashes on a block, or suffer a memory leak. ([e.g.](https://blog.ethereum.org/2016/09/18/security-alert-geth-nodes-crash-due-memory-bug/)) * If attacking a small subset of nodes could prevent messages from being delivered in a timely manner. * An onerous requirement of the specification which is not considered. * Certain operations may require an unexpectedy large amount of resources. ([e.g.](https://blog.ethereum.org/2016/09/22/ethereum-network-currently-undergoing-dos-attack/)) * Promising that a large amount of data would be sent, then proceeding to "drip feed" the data, maintaining a large number of open sessions * A method to leverage traffic in the P2P network for amplification * A small amount of data can trigger a large amount of data. ([e.g.](https://en.wikipedia.org/wiki/Denial-of-service_attack#Amplification)) * Any kind of "broadcast" messages. ## Attack Vectors ### 01: Storing Early Blocks An attacker could create many blocks that from "the future" which a client would need to store, potentially filling up RAM/disk. #### Mitigations 1. Ensure that there is some safe maximum to the amount of blocks that are queued awaiting a future slot. ### 04: Czech Roulette (more formally known as the Non-Deterministic Shuffling Problem (NDSP)) taking the randomness seed from the head block of the chain, means that any short range fork that also triggers that state transition might have a different randomness seed. This would cause multiple valid shufflings for the next cycle which would make it not possible to reject blocks from validators that don’t fit your world view of the shuffling. This is bad because it opens up a serious dos vector. The further back you put the seed into the chain (say you get the seed from N cycles ago, rather than from the current cycle), then the higher likelihood that the seed is coming from a block you see as finalized and thus at least a deterministic seed. This doesn’t actually solve the problem though because of the variability of whether a validator set change happened at the state transition. Say block A comes in and triggers a state transition but does not include enough attestations/crosslinks to trigger a validator set change. Block B (a shortrange fork) comes in, also triggers the state transition, but includes enough attestations/crosslinks to trigger a validator set change. Even if A and B agree on what seed they should use if there is a reshuffling, A would cause the reshuffling while B would so you’d have mismatched expected proposers that’s a quick dump of the range of the problem. (Taken from Danny's answer in Gitter. Will need to clean up and make clearer later) ### 02: Invalid `AttestationRecord` Signatures in Blocks An attacker could create blocks which contain a majority _valid_ `AttestationRecord` signatures, however have a single _invalid_ signature which makes the entire block invalid. This would cause the client to waste CPU cycles in validation BLS signatures. #### Mitigations 1. Ensure the block proposer `AttestationRecord` (the 0'th) is validated before all other `AttestationRecords`. This reduces the space of attackers to only the designated block producer. 2. Do a "coin flip" to determine the order in which `AttestationRecords` are verified, with the exception of the 0'th record. This would mitigate for the scenario where an attacker always knows that the last record in the array will be the last to be verified. Processing records concurrently would also assist making it difficult to predict the last record to be processed. ### 03: Invalid "free" `AttestationRecords` An attacker could produce "free"`AttestationRecords` (ones that are not included in blocks) that have an invalid signature and waste client CPU cycles. #### Mitigations See 02. ### More to come.. -------------- ## Notes ### Specification Vectors _(can someone do the notes here?)_ ### Implementation Vectors ### Network Vectors ### Questions 1. How does libp2p rank peers? 2. In particular, how does it define a "bad" peer? 3. How does it deal with "bad" peers? 2. Does a malicious validator bring down other valiators if they send an invalid block (or any misbehavior)?

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully