是否可以通过返回虚假的已安装字体列表来阻止浏览器指纹识别?
是否可以编写一个程序来屏蔽计算机上安装的字体集,以便字体列表显示为“普通”并且对于创建〜独特的指纹没有多大价值? https://panopticlick.eff.org/
Is it possible to write a program that masks the set of fonts installed on the computer, so the font list would appear "plain vanilla" and would not be of much value in creating a ~unique fingerprint? https://panopticlick.eff.org/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
某些浏览器可能对此有一些支持,但使用任何浏览器,您都可以拦截用于枚举字体列表的 winapi 调用。
基本上,您编写一个将加载到浏览器进程中的 dll,然后它将拦截浏览器在枚举字体时对操作系统进行的调用。只需查找 Windows 中的哪些函数用于枚举字体,然后在您的 dll 中伪造它们即可。 (但这可能需要一些工作,因为您必须重写字体枚举逻辑)。
另外,某些浏览器很可能只是读取注册表来枚举字体,而不使用专门的字体函数,在这种情况下,您将不得不拦截registry-winapi函数,并确保它们报告您想要的字体列表。
要将 dll 加载到目标进程中,您可以使用 Windows 挂钩,或使用 .exe 文件编辑器将 dll 添加到浏览器 exe 文件的导入表中。注册表中还有一个特殊的地方,如果你在那里添加一个dll,它将被加载到系统中的每个进程。 (然后你必须检查浏览器进程,然后只拦截 api 调用,这样不是系统上的每个程序都会获得伪造的字体列表)。
另外,浏览器可能会在另一个进程中运行一些插件、activex 控件、java 或类似的东西(例如,chrome 在不同进程中运行每个选项卡),所以我会检查每个进程的父进程,如果你看到它已经被浏览器启动了,在这个过程中也拦截字体列表。这样,目标网页将无法通过flash、插件、java或任何其他方式获取真实的字体列表。
拦截 winapi 调用的良好开端可以在这里找到: http://www.codeproject.com /KB/system/InterceptWinAPICalls.aspx
因此,这是一种可靠的方法,虽然不可能在一小时内完成,但也不是太复杂。
当然,这不仅会使您的字体列表变得虚假,还会使浏览器看不到也无法显示不在列表中的字体。
当然,这一切对于 Windows 来说都是有效的,但在其他操作系统上肯定也有类似的方法。
另外,值得注意的是,如果您禁用了 javascript 和插件(flash),我认为网页无法读取字体列表。
There is probably some support for that in some browsers, but with any browser you could intercept the winapi calls for enumerating the font list.
Basically you write a dll that will be loaded into the browser process, and then it will intercept the calls the browser will make to the OS when it will enumerate fonts. Just lookup which functions in windows are used for enumerating fonts, and fake them in your dll. (that could be some work though, because you will have to rewrite the font enumerating logic).
Also, some of the browsers may very well just read the registry to enumerate fonts, and not use the specialized fontfunctions, in that case you will have to intercept the registry-winapi functions, and make sure they report the font list that you want.
For loading your dll into the target process you could use Windows hooks, or use a .exe file editor to add your dll to import table of the browser's exe file. There is also a special place in the registry where if you add a dll there, it will be loaded to every process in the system. (then you'll have to check for browser process, and only intercept api calls then, so that not every program on your system will get the bogus font list).
Also, it is possible that a browser will run some plugin, or activex control, or java, or something like that in another process (chrome runs every tab in different processes for example), so I would check every process' parent, and if you see that it has been started by the browser, intercept the font list in that process also. That way, the target webpage won't be able to get the real font list through flash, plugins, java, or anything.
A good start to intercepting winapi calls can be found here: http://www.codeproject.com/KB/system/InterceptWinAPICalls.aspx
So this is a reliable way to do this, and although it can't be done in an hour, it's not overly complicated either.
Of course, this will not only make your font list bogus, it will also make the browser not see and be able to display the fonts that are not in the list.
And this all is valid for Windows of course, but there are surely similair ways to do this on other OSes.
Also, worth to note, I don't think a webpage can read the font list if you have disabled javascript and plugins(flash).