DOS validator nodes of blockchain to block external connections
The public read interface of an Indy blockchain network accepted many parallel client connections, so an attacker could open hundreds of connections per node and send oversized read requests to exhaust the connection limit. Other clients were then unable to send read or write requests, although the ledger data itself was not damaged and service resumed after the attack stopped.
- Triaged in 3 days
- Fixed in 3 days
- Paid in 3 days
- Disclosed after 5 days
Attack was documented in the in the github repo: https://github.com/hyperledger/indy-node/security/advisories/GHSA-x996-7qh9-7ff7
Attack:
The attacker sends 500 read requests to each node and opens a new one when holding 500 parallel connections. Every user is able to send read requests since it's a public readable registry so setting up an allowlist like it's done with the nodes' port for the consensus does not work here. To increase the efficiency:
the custom read request is increased with more bytes (random header or json values) the bandwidth of the sender machine is limited Requirements on the attacker side: Indy-VDR: comment out the timeouts. Using another tool to send the requests could be even more efficient VM: attack can be performed from one or multiple VMs limited connection: using TC to limit the bandwidth (value depends on the amount of connections) Sample Implementation We set up a VON-Network and added the firewall rules. The VM had 32 CPUs and 64 GB RAM
Result:
there is no damage to the blockchain, only an unreachable network as long as the attack is going on . Other clients are not able to send read or write requests to the nodes. In the "best case" their requests will go through but with a response time of multiple seconds, see: Not available [image: image.png]
Not available [image: image.png]
Counteractions:
blacklisting actors: It does not matter what is in the body since the firewall rule acts in front of indy that is processing the information. To avoid big requests the firewall could set a limit of the request size, but this could also block valid requests. Scaling via the observer-pattern: Right now the amount of nodes is limited so blocking 25*500 connections is very easy. When adding nodes in front of the validators to prevent accessing from the internet the validators are save, but then all the observers are under attack Scalability: Giving the VMs more CPU and RAM to increase the parallel connections amount can help in first run, but the DoS attack can be performed as a DDos. An attacker does not have to DoS the network 24/7, but can scale up the VMs on demand to attack a specific network. The setup is done in about 2 minutes automatically. In our test we used 500 as the limit. Maybe there is some kind of algorithm for the node administrators to calculate the limit based on their CPU. But in this case the attacker can also increase his ressources.
Impact
An attacker can max out the number of client connections allowed by the ledger, leaving the ledger unable to be used for its intended purpose.
However, the ledger content will not be impacted and the ledger will resume servicing client requests after the conclusion of the attack.
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
Likely the read endpoint is open to anyone and the node caps concurrent client connections without any per-source rate limiting or request size limit, so a single actor can occupy every slot.
Impact
Clients could not reach the ledger for the duration of the attack, though the ledger content was unaffected and normal service resumed once the attack ended.
What the attacker needed
Network reachable from the internet; ability to open many parallel connections; attacker-controlled VM with limited bandwidth
The fix
The report suggests blacklisting the source, capping request size at the firewall, placing observer nodes in front of the validators, and adding resources, but notes each has drawbacks; it does not state that a fix was applied.
How it was found
- Set up a test network and add firewall rules, using a machine with many CPUs and plenty of memory.
- Send 500 read requests to each node and open a new connection whenever one is held, keeping 500 parallel connections.
- Make each custom read request larger by adding random header or JSON values.
- Limit the sender's bandwidth with traffic control to make the connections last longer.
- Observe that other clients cannot send read or write requests, or only get responses after several seconds.
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.
A blockchain network is run by several computers called nodes, and anyone can ask those nodes to read data from the public ledger. Each node only accepts a limited number of connections at once, and the attacker filled that limit with junk requests so ordinary users could not get through. Nothing stored on the ledger was changed; the network simply became unreachable while the flood lasted.
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.