Skip to content
DoS Disclosed report Intermediate

Traffic amplification attack via discovery protocol

The RSKJ node's UDP discovery protocol does not verify that a pong message comes from the same IP as the ping, allowing an attacker to add a spoofed IP to established connections. The attacker can then send a FindNodePeerMessage with that spoofed IP, causing the node to send a larger response to a victim, amplifying a DDoS attack.

luk-matczak Follow

Originally disclosed on HackerOne

Bounty$2,000 Medium 4.9 View original
  • Triaged in 7 hours
  • Fixed in 28 hours
  • Paid in 17 days
  • Disclosed after 4.0 years

Summary: It’s possible to use UDP discovery protocol to amplify DDoS attacks. Ping-pong mechanism that was intended to protect against it isn’t properly implemented. An attacker can successfully finish it, even with spoofed IP. Then he can send "FindNodePeerMessage" with spoofed IP in UDP packet and RSKJ node will send much larger "NeighborsPeerMessage" to third-party victim. This way an attacker can easily perform DDoS attack both on RSKJ node and third-party server.

Description: An attacker can send "PingPeerMessage" with his correct IP as source IP. It will cause RSKJ node to send "PingPeerMessage" with random "check" value to the attacker. Then he can reply with "PongPeerMessage" containing correct "check" but with spoofed IP. RSKJ doesn't check if pong message comes from the same IP as ping message and this way spoofed IP is added to establishedConnections. Then attacker can send "FindNodePeerMessage" with spoofed IP to perform traffic amplification attack. This vulnerability can be resolved by checking if source IP in pong message is the same as IP in ping message.

Steps To Reproduce:

  1. Send "PingPeerMessage" with correct victim's IP
  2. Wait for "PingPeerMessage" from RSKJ
  3. Send "PongPeerMessage" with correct "check" value but spoofed IP
  4. Send "FindNodePeerMessage" in a loop to perform traffic amplification attack

I'm attaching PoC in the attachment. Need to fill correct RSKJ node IP and port and DDoS victim's IP (and run with root privileges on attacker's host).

Supporting Material/References:

  • I'm sending patch in the attachment

Impact

It makes much easier to perform DDoS attack and it can lead to DoS both of RSKJ node and third-party servers.

The original report as published on HackerOne, by luk-matczak. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The node does not verify that the source IP of a pong message matches the IP used in the corresponding ping message.

Impact

This makes DDoS attacks easier and can lead to denial of service for both the RSKJ node and third-party servers.

What the attacker needed

Ability to spoof source IP addresses; network access to the RSKJ node's UDP port; root privileges on attacker's host

The fix

The vulnerability should be fixed by checking that the source IP in the pong message matches the IP in the ping message.

How it was found

  1. Send a PingPeerMessage with the victim's IP as the source.
  2. Wait for a PingPeerMessage from the RSKJ node.
  3. Send a PongPeerMessage with the correct check value but a spoofed IP.
  4. Send FindNodePeerMessage in a loop to perform the amplification attack.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report is about a way to make a server send more data to a victim than the attacker sends, which is called a traffic amplification attack. The server has a protection step where it sends a random value and expects it back, but it fails to check that the reply comes from the same address, so an attacker can fake the address and trick the server into sending large messages to someone else.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from Rootstock Labs

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.