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

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

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

围绕 fiatjaf.com 上的一篇文章,Hacker News 上出现了一场关于 Nostr 协议潜在攻击向量的讨论。核心问题在于当前网络客户端为了与网络交互,会请求用户的私钥(Nsec)的做法。 担忧是,托管 Nostr 网络应用程序的网站如果被攻破,可能会提供恶意代码,从而可能允许攻击者(评论中戏称为“摩萨德”)显示虚假帖子或审查内容。由于 Nostr 依赖密钥对进行身份验证,依赖中继进行分发,因此被盗的密钥可能被用于冒充用户或操纵他们看到的信息。 评论者指出这是一个根本的权衡(Zooko 三角形),并强调需要更安全的方法,例如用于客户端签名的浏览器扩展,而不是信任网络应用程序处理敏感密钥。这场争论凸显了 Nostr 生态系统内可用性和安全性之间的紧张关系。
相关文章

原文

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