Java 堆栈自省(introspection)

标签 java security jvm securitymanager

我希望有人可以帮助我解决以下问题:

我对 java 堆栈自省(introspection)的理解(这里可能有点过于简单化)是一个进程生成一个堆栈帧,然后将其添加到堆栈中。现在,当进程需要进行系统调用时,堆栈自省(introspection)算法会检查是否允许委托(delegate)人(即尝试访问资源的进程)使用特定资源,然后相应地注释框架(授予或禁止访问权限) ).

我的问题是:

  1. 以上是正确的还是我遗漏了什么?
  2. JVM 如何决定是授予还是限制访问权限?用户是否参与了这个决定?
  3. this study有一个示例(图 2),其中一个框架继承/被告知前一个框架的“信念集”!在此示例中,是什么阻止了恶意代码的执行(即访问不应访问的资源)?

最佳答案

How does the JVM decide whether to grant or restrict access? Is the user involved in this decision?

它委托(delegate)给当前安装的 SecurityManager

Is the above correct or am I missing something?

SecurityManager 可以在堆栈上自省(introspection),也可以使用其他一些标准。与在浏览器中运行的小程序关联的 SecurityManager 会进行内省(introspection),因此这至少在一个域中是正确的。

In this study theres an example (figure 2) in which a frame inherits/is being told the "belief set" of the previous frame! What stops malicious code from being executed in this example (i.e. get access to a resource that shouldnt have accesss to)?

真的没什么。 Java 安全性一团糟,许多人建议在浏览器中关闭 Java,因为如今很少有合法网站使用它。

"Sun Java by far the most vulnerable plug-in"从 2010 年开始。

关于Java 堆栈自省(introspection),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9650737/

相关文章:

java - 为什么switch on String会编译成两个switch

java - Jenkins 中的 PermGen 错误

java - 如何将光栅转换为渲染图像

java - 如何根据http header过滤JWT认证权限

database - 银行系统NoSQL数据库

security - 在开发过程中防止源代码被盗

java - 需要了解许可证 key 算法

java - 远程调试 Java - Solr

scala - 在 JVM 上从一个 jar 运行多个 Scala 应用程序

Java JSON 序列化器 Play 框架