Good Griefing: A Lingering Vulnerability On Lightning Network That Still Needs Fixing

2021-1-19 01:17

What happens when your Lightning Network routing node is fed with garbage transactions that never resolve? In short, it causes a lot of grief for routing nodes. What was once a smooth, global payment system can be locked up with trivial effort from a savvy script writer.

Working in a small team of routing nodes, we successfully ran a test of the attack with real funds and demonstrated the “griefing” attack described by Joost Jager. The attack is called a grief attack since it is not a theft of funds, but it causes a victim’s Lightning funds to be frozen: a major upset. What we found is that griefing is a serious threat to large “wumbo” channels expecting to earn a yield on their bitcoin, only to have their funds frozen for a period of time. 

This is mostly a grief attack: no loss of funds, but the victim may be forced to pay for an expensive channel force close. This is a known vulnerability on mainnet Lightning and it needs to be understood and prioritized, especially at this early market stage of Bitcoin’s Lightning Network.

Thanks to Clark Burkhardt and Phillip Sheppard for their willingness to participate in this test and to Jager for his tireless work to bring attention and priority to this vulnerability. Jager played the role of the attacker for our demonstration, while Burkhardt and Sheppard joined me as connected victim routing nodes.

How The Attack Works

The attacker saturates one (or several) channel(s) with Hashed Time Locked Contracts (HTLCs) that don’t resolve as a finalized payment. These are a special breed of HTLCs known as HODL invoices. Only 483 of these unresolved HTLCs are required to overwhelm a channel per direction. Once those HTLCs are in the channel, any transactions using that same channel direction are impossible, including a transaction to cooperatively close that channel.

In theory, an attacker could contact the victim (perhaps via a keysend message or in an “onion blob”) and demand a ransom be paid to halt the attack. Once the ransom is paid, the attacker could remove the unresolved payments, ending the attack. The attack can be sustained indefinitely, halting all routing and payment activity in that channel. This freezes the funds in the Lightning channel.

Both directions of payments can be stalled in a channel by using 483 HTLCs in each direction, both inbound and outbound.

Thunderhub view of my balanced channel to Burkhardt under attack. The channel shows as “Not Active,” as if Burkhardt were offline, but he wasn’t. The amount in blue is the local balance in sats, the amount in green is the remote balance in sats owned by Burkhardt. Source: Thunderhub. Why Would An Attacker Do Something Like This?

The first motive that comes to mind is to demand a ransom. This attack causes pain for the victim and paying a ransom may be attractive to a victim, even without assurance that the attack would stop. Contacting the victim might be risky for an attacker, but a ransom payment might not be the only reason someone would do this.

A secondary incentive for launching a griefing attack would be to disrupt routing competition. Jamming a competitor’s route could create more demand for a route owned by an attacker.

As a benchmark, consider that Lightning Labs’ Loop node has an ongoing demand for liquidity for which it will sometimes pay a 2,500 parts per million of the payment (ppm) (0.25 percent) fee rate. In my experience, they would normally exhaust 16 million sats’ worth of liquidity in about two weeks (5.2 percent annual percentage rate), but that is with competition present. 

If an attacker could disable any competing route with lower fee rates, Loop may be willing to pay a higher fee rate (since the supply of liquidity is now reduced). Let’s say Loop would pay 3,000 ppm (0.3 percent), as well as use that liquidity more quickly since no other channels are functioning. Loop might use that liquidity in half the time, say one week. The attacker would more than double their usual yield to 15.6 percent APR in this example. The only cost to the attacker is the cost of running a script on an existing channel and the psychological cost of doing something immoral/damaging to the Lightning Network. With a single attacker channel, a malicious actor could jam about nine channels (see Jager’s tweets about this).

What Would The Victim Of This Attack Experience?

The victim of this attack wouldn’t really know that this attack was happening unless they had some special alerts set for pending HTLCs. For Thunderhub users (a highly recommended tool), the home screen will show a chart of pending HTLCs as well as a warning stating that channels can only hold 483 pending HTLCs.

Source: Thunderhub

In practice, my node quickly became unreliable and experienced several app crashes, including Thunderhub, which was the only app to notify me of the problem. Then, thanks to my “Balance of Satoshis” Telegram bot, I got a channel closing notification. The channel under attack force-closed itself! That was not supposed to be part of the experiment. (For more technical information on the involuntary force close, see below for additional force-close data.)

A test payment using the channel with Burkhardt (salmiak) failed due to the attack. This warning reports that Burkhardt’s node is offline, though it was online. Source: Thunderhub. What Can The Victim Do To Stop A Griefing Attack?

Once an attack starts, a victim essentially can’t do anything to stop it. The only alternatives available to halt an ongoing attack would be to force-close the channel being attacked, which means that the terrorists win. 

To add insult to injury, force-closing the channel will push the unresolved payments to the on-chain transaction data, triggering secondary on-chain transactions for the initiator of the force close. At 50 sats/vbyte and 483 on-chain transactions, that’s easily a 1 million sat price tag to force close a single channel under attack (a $368 channel close fee at today’s prices). The multiple on-chain transactions only occur if the output is above the minimum payment “dust” limit. (See this example on testnet.)

The initiator of a Lightning channel pays the closing fee.

Another reason why you may not want 483 (non-dust) htlcs is that a potential force-close transaction at 50 sat/vB looks like this: https://t.co/z6mAGZxvrC.

The closing fee is getting expensive at over 1 million sat.

— Joost Jager (@joostjgr) September 28, 2020 How To Prevent A Griefing Attack

Jager has been working on a proof-of-concept program to help isolate and fight attackers. He’s calling his program “Circuitbreaker.” The Circuitbreaker works at a network level, which unfortunately means that everyone has to participate for it to be effective.

Beyond that, this issue needs prioritization and attention from dedicated engineers/developers to find better solutions. There have also been some good discussions on modifying the protocol in the Bitcoin Optech newsletter (issue #122 or #126).

This attack can be executed today. It is a miracle that it hasn’t already been used maliciously. It’s a reflection of the incentives for those using Lightning today so that it can become an open, universal payment network. Please share this post as you see fit to encourage and inspire more work to fix this problem before it causes real harm.

Additional Technical Information About The Involuntary Force-Close

Here are the logs from my node running LND 0.11 at the moment that the above mentioned involuntary force-close occured:

2020-11-26 21:24:47.374 [ERR] HSWC: ChannelLink(657759:561:0): failing link: ChannelPoint (c37bec006b18df172698a84739ca47128935e0a8666fecd1a843e49b01db207c:0): received error from peer: chan_id=7c20db019be443a8d1ec6f66a8e035891247ca3947a8982617df186b00ec7bc3, err=rejected commitment: commit_height=455, invalid_commit_sig=3044022076fd65191eb6305b723fa6012be378413b6326e2786c38db58b4c02e1f3999d202207605ca31de8b4c5b1d9cd20dc1581dfa2383e0b4e06c8ad4f718ab5c434d8cf5, commit_tx=02000000017c20db019be443a8d1ec6f66a8e035891247ca3947a8982617df186b00ec7bc300000000008a792e8002210d0000000000002200201031cf10a1efef261edd3d0a1a6a953b27bc25bd7150bb2b07afdc69805e02157213000000000000160014de650929042bef58b71783ae1a44834a902a8f2d542ca720, sig_hash=4e0fb804c74376020e4c44a60969b9206eb0aaa9a89b76017d60f23ad5cf63e5 with error: remote error

The logs show an “invalid_commit_sig” which is a known issue in LND. Supposedly, this can happen upon reconnecting and isn’t a direct result of the channel jamming. The volume of pending HTLCs unfortunately makes it more likely to happen. Jager helped explain the process as channel jamming –> endless payment loop (bug) –> node down –> reconnect –> invalid commit sig (bug) –> channel force-close.

The “endless” loop bug is a known bug that occurs when the HTLC limit is reached and an additional HTLC is sent. Instead of ending in a payment failure, LND will continue to attempt the payment in a loop. To help with this bug, see LND issue #4656.

This is a guest post by Jestopher. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.

The post Good Griefing: A Lingering Vulnerability On Lightning Network That Still Needs Fixing appeared first on Bitcoin Magazine.

Similar to Notcoin - TapSwap on Solana Airdrops In 2024

origin »

Santiment Network Token (SAN) на Currencies.ru

$ 0.0865709 (-0.22%)
Объем 24H $210
Изменеия 24h: 9.95 %, 7d: 19.49 %
Cегодня L: $0.0865709 - H: $0.0865709
Капитализация $0 Rank 5672
Цена в час новости $ 0.1272 (-31.94%)

network lightning griefing fixing needs good bitcoin

network lightning → Результатов: 126


Binance Announces Plans To Integrate Bitcoin Lightning Network

World-leading crypto exchange Binance has announced plans to integrate the Bitcoin Lightning Network (LN) on its platform for deposits and withdrawals. The exchange disclosed this information via a Twitter post earlier today following observations of Binance’s nodes on the Lightning Network by some “eagled-eyed” crypto community members.

2023-6-21 22:00


Приложение Block CashApp добавило поддержку Lightning Network

Платежный сервис компании Block Cash App добавил поддержку решения второго уровня Lightning Network. Теперь все транзакции по умолчанию будут проходить через эту сеть.

2022-10-26 09:21


В работе Lightning Network произошел сбой

Основатель платформы Bitmatrix Бурак Кеджели создал и выполнил сложную транзакцию в блокчейне биткоина, которая временно вывела из строя часть сети микроплатежей Lightning Network (LN).

2022-10-12 14:11


Состояние Lightning Network | 11 июня 2022

Bitcoin Magazine о состоянии Lightning Network на начало июня 2022. «Lightning Network позволит каждому — частным лицам и малому бизнесу, компаниям и организациям — отправлять внутренние и международные платежи любого размера — с неограниченной частотой, без посредничества банков, почти мгновенно и практически бесплатно», — NYDIG, «On Impossible Things Before Breakfast» (PDF). Для тех, кто не […]

2022-6-11 12:06


Kpиптoбиpжa Kraken дoбaвилa пoддepжку peшeния Lightning Network

Aмepикaнcкaя кpиптoбиpжa Kraken внeдpилa peшeниe Lightning Network (LN), чтoбы пpeдocтaвить клиeнтaм мгнoвeнныe pacчёты пo тpaнзaкциям в биткoйнax. Lightning Network — этo мacштaбиpуeмoe peшeниe или уpoвeнь 2, пocтpoeнный пoвepx блoкчeйнa биткoйнa, кoтopый пoзвoляeт быcтpo oтпpaвлять и пoлучaть BTC пpaктичecки бeз кoмиccии.

2022-4-4 19:00


Фото:

В Arcane Research отметили рост экосистемы Lightning Network

Экосистема сети микроплатежей биткоина Lightning Network (LN) растет быстрее ее емкости. На это обратили внимание аналитики Arcane Research. The Bitcoin Lightning Network ecosystem is growing! Our data on Lightning Network payments points to usage growing more than public capacity as well.

2022-3-19 19:37


Spiral Джека Дорси представила ролик об инициативе в области запуска нод в Lightning Network

Ориентированный на продвижение биткоина проект Spiral (ранее Square Crypto) представил набор инструментов для разработки криптовалютных кошельков и других технических решений на базе сети микроплатежей биткоина Lightning Network (LN).

2021-12-7 11:58


Остались только ходлеры

Ведущие аналитики Glassnode изучают бычьи и медвежьи факторы для текущей структуры рынка BTC, а также рассказывают о последних показателях Lightning Network на фоне распространения lightning-платежей в Сальвадоре и внедрения их поддержки в Twitter.

2021-9-28 16:15


Ритейлер миллиардера Салинаса Плиего добавит поддержку Lightning Network

Сеть магазинов потребительской электроники, мебели и бытовой техники в Латинской Америке Elektra добавит в качестве платежной опции сеть Lightning Network. Very soon we will have this in our Elektra store network.

2021-9-6 13:03


Количество заблокированных в Lightning Network биткоинов превысило 1500

С начала года количество биткоинов, заблокированных в сети Lightning Network, постоянно растет и сейчас показатель превысил 1 500 BTC. Lightning Network – это решение второго уровня по масштабированию сети Биткоина, которое позволяет значительно снизить объем комиссий и ускорить проведение платежей.

2021-6-19 14:17


Твиттер может добавить поддержку Lightning Network

Твиттер может добавить поддержку Lightning Network (LN), решения второго уровня для сети биткоина. Об этом сообщил глава компании Джек Дорси. Only a matter of time — jack (@jack) June 11, 2021 Как будет работать Lightning Network в твиттере, и когда планируется интеграция, Дорси не уточнил.

2021-6-12 16:53


Биржа OKCoin внедряет поддержку Lightning Network

Криптовалютная биржа OKCoin анонсировала поддержку протокола второго уровня Lightning Network (LN) для «снижения транзакционных комиссий биткойна с примерно $10 до считанных центов». We’re proud to announce that OKCoin will integrate the @lightning network allowing for near instant withdrawls and reducing bitcoin network fees from ~$10 to pennies.

2021-1-25 10:47


Биржа OKCoin будет поддерживать Lightning Network

Криптовалютная биржа OKCoin анонсировала поддержку протокола второго уровня Lightning Network (LN) для «снижения транзакционных комиссий биткоина с примерно $10 до Считанных центов».

2021-1-24 10:10


В Lightning Network обнаружена возможность атаки на цепочки платежных каналов

Исследователи из израильского университета утверждают, что обнаружили уязвимость в Lightning Network, которая позволяет украсть BTC при проведении транзакций. В исследовании Йона Харрис (Jona Harris) и Авив Зохар (Aviv Zohar) из Еврейского университета в Иерусалиме обнаружили, что злоумышленники могут использовать уязвимость Lightning Network, чтобы украсть BTC пользователей.

2020-7-1 10:00


Исследователи обнаружили проблему конфиденциальности в Lightning Network

Исследователи из университетов Норвегии и Люксембурга обнаружили возможность атаки на Lightning Network. При этом могут быть раскрыты балансы узлов, через которые проходит транзакция. Согласно отчету, четверо исследователей и разработчик Lightning Network (LN) Рен Пикхардт (Ren Pickhardt) смогли использовать передачу транзакций через промежуточные узлы для того, чтобы «прозондировать» каналы сети и раскрыть количество биткойнов, лежащих на […]

2020-4-19 13:33


NetCents integrating Lightning Network into crypto merchant payment gateway

NetCents, a cryptocurrency payments solutions provider, announced today that it is integrating the Lightning Network into its crypto merchant gateway. The Lightning Network is a “layer 2” payment protocol that operates on top of blockchain-based cryptocurrencies; enabling near-instant transactions with low or non-existent blockchain fees for users regardless of network congestion.

2020-2-6 18:48


Фото:

Развитие Lightning Network идёт даже быстрее, чем ожидалось

Исследовательский отдел BitMEX опубликовал отчёт по новому анализу потенциала Lightning Network. Итоги радуют. Эксперты пришли к выводу, что сеть LN достигла значительных успехов в своём развитии, а её рост идёт даже быстрее ранее прогнозированных темпов. Lightning Network — это платёжный...

2020-1-16 16:20


BitMEX: Внедрение Lightning Network для обработки биткоин-транзакций не оправдало ожиданий

Исследователи BitMEX утверждают, что преимущества Lightning Network аспектах конфиденциальности и масштабирования далеко не так хороши, как ожидалось. В отчете исследователи BitMEX проанализировали рост Lightning Network (LN) и попытались экстраполировать данные о платежных каналах из имеющейся в открытом доступе информации.

2020-1-15 17:10