Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

difficult node spoofing #710

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 9, 2024

  1. complicate node spoofing

    DHT allows the impersonation attack because method getNode updates the node's addr in following case:
    node A (IP address 1.1.1.1) has InfoHash 8ffe0d18748cfc04d1bc0a2e8c3a548e06f3f794 and sends a Ping to node B (IP address 2.2.2.2),
    then node B sends neighborhood maintenance to 1.1.1.1.
    Thus, a malicious node (IP Address 3.3.3.3) discovers the InfoHash 8ffe0d18748cfc04d1bc0a2e8c3a548e06f3f794 from Node A
    and sends DHT packets to Node B.
    
    Thus, when node B receives a message, it will update the node A address. Then, it will send the neighborhood maintenance to 3.3.3.3
    instead 1.1.1.1.
    With this change, node A will update the node addr when node B sends a confirmation after 1 minute or it is old.
    When node B is not old, node A updates the node addr with its actual addr.
    
    Signed-off-by: Lucas Dias <lucas_dias@redes.ufsm.br>
    lucassdiass committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    c4c1009 View commit details
    Browse the repository at this point in the history