In this attackathon, your task will be to write a program that performs a channel jamming attack against a test lightning network. Your goal is to completely jam a routing node for an hour.
Your program should:
The final deliverable for the attackathon is a run script that downloads, installs and runs your attack in a kubernetes cluster.
We're aiming to jam a routing node, which we define as:
The target node is unable to facillitate forwading of HTLCs on behalf
of of nodes in the network.
Conventionally, this is achieved when:
All of the target node's local(/outbound) HTLC slots are occupied.
OR
All of the target node's local(/outbound) liquidity is occupied.
However, given that we are operating within the context of a specific mitigation, we need to consider the possibility that the attack may try to use the mitigation itself to disrupt quality of service.
In general, our reputation and resource bucketing mitigation may be abused by an attacker to jam a channel if:
All of its general bucket's local(/outbound) liquidity OR slots are occupied.
AND
Peers looking to use the channel have low reputation.
When the attacker manages to successfully sabotage the reputation and fill up general slots, the channel is effectively jammed because peers looking to use the channel do not have access to the projected slots that are reserved for high reputation peers. This may be abused in various ways, and we encourage you to explore them!
The attack you develop will be tested against a warnet running a network of LND nodes that have the jamming attack mitigation implemented* (via an external tool called circuitbreaker).
To assist with local development, we've provided a test network that can be used to run your attacks against. Prerequisites to set up this network are:
Clone the attackathon repo:
git clone https://github.com/carlaKC/attackathon
Do not change directory.
The scripts will pull the relevant repositories to your current working
directory and set up your network. They expect the attackathon
repository to be in the current directory.
Wait for your network to fully come up, then you can start your pod of attacking nodes:
flagship
container to run your attack
from.
Once you have brought your cluster up, you'll be able to execute your
program from inside of the cluster's flagship
pod:
kubectl exec -it flagship -n warnet-armada -- bash
run.sh
to:
⚠️ Remember that we're using a fork
of LND so you'll need to account for that if you're using common RPC
client libraires to have access to endorsement
fields (golang client
is available here).
The following utilities are available for your convenience:
source ./lncli.sh
provides aliases for your LND nodes (lncli0
,
lncli1
, lncli2
)./fund.sh
funds each of your LND nodes../connect_nodes.sh
connects the attacking nodes to the network
so that they can sync gossip.bitcoin-cli
provides access to the bitcoin node that all three
LND nodes are connected to.Some relevant characteristics of the network:
Some APIS to note:
* Note that endorsement signaling and reputation tracking are fully deployed on the test network, but unconditional fees are not. You should assume that they will be 1% of your success-case fees, and we will account for them during attack analysis.
Attacks will be assessed using the following measures:
A work-in-progress analysis script requires your network name to run. You may optionally provide the end timestamp (unix nano) of your attack to get a more precise comparison period (the present time will otherwise be used as the time of attack).
It can be run from within the attackathon repo:
python3 analysis/analyse_attack.py ln_10 [endtime_ns]
We're trying to break channel jamming mitigations, not our setup itself so please be a good sport and let us know if there's anything buggy! Real attackers won't be able to take advantage of our test setup, so neither should we.
Participants do not need to read the following section, it contains instructions on how to setup a warnet network to run the attackathon on.