解决 Nostr 网页客户端的攻击向量
Solving the Nostr web clients attack vector

原始链接: https://fiatjaf.com/6829ad8b.html

## Nostr 客户端安全与控制 Nostr 的一个关键漏洞在于依赖于像 Coracle.social 这样的中心化网络客户端。如果托管客户端的域名所有者受到威胁或恶意攻击,大量用户可能会受到不受欢迎或有害更新的影响。 提出的解决方案是将客户端视为由其代码哈希标识的*主观*版本,而不仅仅是域名。这意味着客户端可以托管在像 Blossom 这样的去中心化平台上,允许用户选择并自愿更新特定版本。 这种方法赋予用户控制权,使他们能够坚持使用可信版本,即使原始来源受到威胁。至关重要的是,它允许分叉——如果客户端所有者受到威胁,社区可以采用安全的副本,有效地转移“官方”版本并隔离恶意更新。这促进了 Nostr 生态系统内的弹性和去中心化。

一个 Hacker News 的讨论围绕着 fiatjaf.com 上的一篇文章,详细描述了 Nostr 协议中潜在的攻击向量。核心问题在于一些 Nostr 网页客户端目前的做法,要求用户提供私钥 (Nsec)——本质上是将账户控制权授予应用程序。 担忧是,一个被攻破的网页应用服务器可能会提供恶意代码,允许攻击者(可能包括原文中提到的“摩萨德”等国家行为者)显示虚假帖子、审查内容,或潜在地危及账户。 用户指出 Nostr 的设计,依赖于密钥对和分布式中继,*应该*提供验证,但当信任第三方网页应用提供密钥访问权限时,这一点就会被破坏。 讨论强调了易用性(网页应用)与安全性(自托管和理解开源软件)之间的权衡,呼应了 Zooko 的三角形概念,关于名称和信任。
相关文章

原文

One problem Nostr still has to deal with is the fact that web clients are "owned" by someone, because they rely so much on the domain name they're served from.

Everything is fine with, say, https://coracle.social/, until npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn decides to shut it down or maybe he is threatened to include some malicious code in there, most Coracle users are going to fall for that and Nostr will feel broken.

With native apps that problem isn't so big as updates aren't mandatory, automatic and invisible as in the case of web apps (although there is still a problem with malicious app stores such as Google Play, but we can't solve everything at once).

Maybe the correct way to approach this would be to treat Coracle as a subjective thing, not "whatever is on the coracle.social domain", but "this version of Coracle I use represented by this hash".

Any decent Nostr web client must be capable of running entirely on the client side, as a "static" webpage made of just HTML, JS and CSS, so it should be possible to have these files hosted on Blossom and referenced by the hash of the "index.html".

The hard part is how to get users to use not https://coracle.social/ directly, but their chosen version of Coracle, which they update voluntarily whenever npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn decides it's time to add some more spinners -- but they can also opt to not update. In fact they should be able to use any previously released version. And, most importantly, if becomes known that npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn is being blackmailed by the Mossad then someone else can release a fork of Coracle, and that fork may be chosen by most people to inherit the subjective denomination of "Coracle", such that most Coracle users will now use that and follow updates from that new source, ignoring the compromised npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn and his nefarious updates.

This article on Nostr

naddr1qqyrvwpj89skgwrzqyghwumn8ghj7enfv96x5ctx9e3k7mgzyqalp33lewf5vdq847t6te0wvnags0gs0mu72kz8938tn24wlfze6qcyqqq823c36zcak

#nostr
联系我们 contact @ memedata.com