Discourse 指纹 - 浏览器指纹识别插件

Discourse 指纹识别 :paw_prints:

Discourse 指纹识别 是社区管理者对抗网络喷子的利器。:troll: 它通过计算每个注册用户的唯一标识符(即“指纹”)来工作,该标识符综合考虑了 20 多种浏览器特征,例如用户代理、屏幕分辨率、时区、设备内存等。

当单独考虑这些浏览器特征中的每一项时,它们不足以判断两个用户是否为同一人。用户代理、屏幕分辨率等的数量相对有限。然而,当综合考虑这 20 个因素时,两个用户拥有相同密钥的概率极低。

:bar_chart: 数学时间: 假设只有 20 种浏览器特征,且每种特征只有 4 种可能的取值(注意:实际上有超过 20 种浏览器特征,且每种特征的取值远多于 4 种),这意味着共有 4\u003csup\u003e20\u003c/sup\u003e 种组合(指纹)。即 1,099,511,627,776 种组合……而地球上只有 7,640,175,882 人。好吧,有些浏览器特征可能毫无用处(例如,本地社区论坛的所有用户时区可能相同)……但大多数论坛也不会有 76 亿用户。:frowning:

它是如何工作的?

当用户在论坛上浏览时,系统会为其生成指纹,并将结果与最近生成的几个指纹一起存储(默认情况下为最近 10 个指纹)。随后,管理员可以使用一个简单的界面来检查最新的指纹匹配(冲突),并查看某个用户是否与他人存在冲突。

该插件对用户完全没有影响,它会在页面首次加载 3 秒后生成用户指纹。

它长什么样?

让我们考虑一个简单的测试场景:

  • 用户 Dan、Oliver 和 Jack 使用了某种设备(包括无痕模式和常规会话)。
  • 用户 Harry、Jacob 和 William 使用了另一种设备(同样包括无痕模式和常规会话)。
  • 在某时刻,用户 William 使用与 Oliver 完全相同的机器和浏览器登录。

仪表板将显示存在两个冲突。一个冲突涉及 Dan、Oliver、Jack 和 William,另一个冲突涉及 Harry、Jacob 和 William。请注意,冲突关系不具备传递性(即 Dan 与 William 存在冲突,Harry 也与 William 存在冲突,但 Dan 与 Harry 之间不存在冲突)。

查看 Dan 的详细信息可以告诉我们他的指纹是什么,这些指纹首次和最后出现的时间,以及根据该签名他与谁存在冲突。

查看 William 的详细信息会提供类似的信息,但这次会显示两个指纹。

管理员可以选择对此采取行动,或者点击“忽略”按钮来隐藏此冲突。请注意,即使您忽略了某个冲突,它仍会显示在“最新冲突”列表中,直到出现新的冲突。

我该如何安装它?

请按照 安装插件 的说明操作,使用 git clone https://github.com/discourse/discourse-fingerprint.git 作为插件命令。

基本上,您需要编辑 app.yml 文件以包含上述指定的命令。

48 个赞

Thanks for the plugin!

Don’t you mean:

i.e. Dan is in conflict with William, Harry is also in conflict with William, but Dan is not in conflict with Harry

5 个赞

That is correct. Thank you, I have fixed the post.

6 个赞

Is there a case study for this showing how well it has worked in the real world?

Thanks for the plugin!
This is a wonderful thing. It would be great to see him on: transifex

We are very interested in this, but should we be worried about the GDPR? Based on the plugin description it doesn’t seem to collect anything that GAnalytics already does.

How is the data stored? Is it automatically purged at some point of time or can it be purged manually?

1 个赞

Related/Unrelated note: Some browsers are actively working on avoiding fingerprinting. For example Firefox will soon ship with the ability to block this and will be blocked by default soon too.

7 个赞

Unfortunately I am not aware of any big communities that run this plugin. However, in the real world it seems to work pretty well. See https://panopticlick.eff.org/

It depends on how you see it. Every piece of information that is stored cannot be tied to a single individual, which is GDPR compliant. Combining them, you might be able to track individuals.

The plugin uses PluginStore to store at most max_fingerprints fingerprints (default value: 10), purging the oldest to make room for new ones.

I am not sure how their new protection works. In the past, browser extensions were relying on filenames or hashes to do it. Those methods are fragile and minor changes in the fingerprinting script can make them go undetectable.

8 个赞

Big is relative, but I am going to try this in production (tappara.co) when we have our next service break. Could be as soon as next week or one after that.

So it stores 10 most recent prints. Is there a way to purge the prints manually? Are they purged if the user is deleted?

1 个赞

I had high hopes from this plugin but unfortunately ios browsers mess up the whole plugin.

5 个赞

The latest Firefox version already have this protection, opt-in for now. You can test it from Preferences - Privacy - Content blocking.

7 个赞

There is no way from the UI, but technically, you could do it from the Rails console. Deleting the user does not purge old Fingerprints, but that is a bug I will have to fix. :slight_smile:

user = User.find_by_username("dan")
DiscourseFingerprint::Fingerprint.get_fingerprints(user.id).each do |fp|
  DiscourseFingerprint::Fingerprint.remove(user.id, fp)
end

Yes, I believe so. I remember a community had the same problem with mobile devices, especially iPhones due to their build similarity.

I will try and have a look. The news I read said they were using Disconnect’s list which could have been tricked with some little effort.

5 个赞

Our trial in production is now live.

Should we expect a performance penalty due to this? Our traffic has extreme spikes, based on real time events. Summer time is off-season, so things will be quiet, but during the hockey season we are likely to meet the limits of our server.

One additional idea for fingerprinting the user – what about tagging the users with a unique cookie? That would provide additional information that Harry’s browser has Dan’s cookie? This would obviously happen on shared devices, but might potentially expose trolls that lack technical expertise.

Many thanks for the development efforts and we are most interested in seeing the results.

I would really like a feature to ban a fingerprint.

Missing translation

1 个赞

How do I delete this plugin? Did a rebuild after removing the line from my app.yml but the plugin is still there.

Edit: no one can help deleting this?

How to ban a fingerprint?
I really need this feature.

It’s now enabled by default.

5 个赞

Great plugin idea.

It’s missing a couple of translations
[en_US.dates.medium.x_years]
[en_US.admin.flags.ignore_flag]

And I can’t click on the ignore flag - important because as the administrator of the site, I need an ‘alternative ego’ to post as a regular user, not as the admin.

Where do I find finger print matcher?

I see it in plugins. But not the Matcher.

(SOLVED)
Forgot to refresh page. My Bad.

1 个赞