# Traffic amplification attack via discovery protocol

RSKJ UDP discovery ping-pong check doesn't bind pong to source IP, letting a spoofer register arbitrary IPs and amplify FindNode requests into large NeighborsPeerMessage floods.

- Payout: $2,000
- Severity: medium
- Program: Rootstock Labs
- Found by: luk-matczak
- Disclosed: 2023-03-13
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/502207
- Library page: https://bugbountylibrary.com/r/h1%3A502207
- Tags: area:devices domain:network impact:dos kind:bounty platform:hackerone sev:medium technique:source-review vuln:dos vuln:misconfiguration

**Target:** RSKJ node UDP peer discovery protocol (PingPeerMessage/PongPeerMessage/FindNodePeerMessage)
**Root cause:** The pong handler validates the random 'check' value but not that the pong's source IP matches the IP the ping was sent to, so a spoofed IP gets added to establishedConnections.
**Steps:**
1. Send `PingPeerMessage` to RSKJ node with correct IP as source IP
2. Receive RSKJ's `PingPeerMessage` containing a random `check` value
3. Reply with `PongPeerMessage` containing correct `check` but with spoofed IP
4. Loop `FindNodePeerMessage` with spoofed IP; node replies with much larger `NeighborsPeerMessage` to the victim
**How found:** Noticed the ping-pong anti-amplification mechanism only checks the random 'check' value and reasoned that source IP is never compared between ping and pong, allowing spoofed IPs into establishedConnections.
**Exploitation:** Attacker spoofs victim IP, completes the ping-pong handshake to register the victim in establishedConnections, then repeatedly sends FindNodePeerMessage with the spoofed IP so the node emits large NeighborsPeerMessage responses to the victim, amplifying traffic toward both the node and the third party.
**Insight:** When auditing anti-amplification handshakes, verify the response is bound to the same source address/port as the challenge, not just a token value; a token-only check enables spoofed-IP registration and reflection.

