对运行 HTML 和 HTML 的浏览器进行沙箱处理仅限JS

发布于 2024-12-19 16:17:31 字数 609 浏览 1 评论 0原文

我最近阅读了 chromium 沙箱架构概述多进程架构高级设计。 开发人员声称他们在特权外部进程中运行选项卡和 Web 应用程序有两个主要原因:

1)防止浏览器在选项卡或 Web 应用程序崩溃时崩溃。
2)各种安全原因。

我读到的安全原因主要是通过 Win32 API 更改用户的系​​统配置。

现在假设我开发了一个使用 Webkit 和 V8 JS 引擎的 Web 浏览器,并且不允许从浏览器内执行浏览器扩展和 flash。
此外,我们假设应用程序崩溃不是问题。

1) 通过实施沙箱架构我可以获得哪些优势?

2)纯Javascript代码可以访问内存\文件系统或调用任何不需要的Windows API函数吗?

3)还有哪些我不知道的其他安全问题?

I've recently read the chromium sandbox architecture overview and the multi process architecture high level design.
The developers claim they run the tabs and web apps in a privileged external process for 2 main reasons:

1) Prevent the browser from crashing in case a tab or a web app crashes.
2) Various security reasons.

The security reasons I read about were mostly about changing the user's system configuration via Win32 API.

Now let's assume I develop a web browser that uses Webkit and V8 JS Engine and does not allow browser extensions and flash to be executed from within the browser.
Furthermore let's assume that application crashes are not an issue.

1) What advantages do I gain by implementing the sandbox architecture?

2) Can pure Javascript code access the memory\file system or invoke any unwanted windows API function?

3) What are the other security concerns I'm not aware of?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清醇 2024-12-26 16:17:31

多年来人们一直通过网络浏览器遭到黑客攻击,这是一个愚蠢的问题。当然,可以使用 JavaScript 来访问 shell。这是基于浏览器的利用的基础。不仅 JavaScript,格式错误的 HTMl 和 CSS 也常被用来破坏内存并获得远程代码执行。 WebKit 是新的,它有 很多安全问题。保持 WebKit 最新,否则您将被黑客攻击。

应该注意的是,JavaScript 在沙箱中运行,该沙箱阻止它访问您的计算机或其他网站上的重要资源,我们将此称为同源策略。谷歌为 Chrome 引入了另一个沙箱,试图阻止远程代码执行,作为深度防御、分层安全的方法。

People have been hacked though web browsers for years, this is a silly question. Of course JavaScript can be used to gain access to the shell. This is the basis of browser based exploitation. Not only JavaScript, but malformed HTMl and CSS are also commonly used to corrupt memory and gain remote code execution. WebKit is new, and it has a lot of security problems. Keep WebKit Up to date, or you will be hacked.

It should be noted that JavaScript runs within a sandbox that jails it from accessing important resources on your machine or other websites, we call this the same origin policy. Google introduced another sandbox for Chrome to try and prevent remote code execution as a method of defense in depth, security in layers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文