Usage of SP_OACreate, SP_OAMethod etc.. is a security risk?(使用 SP_OACreate、SP_OAMethod 等是否存在安全风险?)
问题描述
我被告知在 SQL Server 2000 中使用 SP_OACreate 和 SP_OAMethod 存在安全风险.
I am told that usage of SP_OACreate , SP_OAMethod in SQL Server 2000 is of a security risk.
我在程序集中使用强名称并存储在 SQL Server 计算机上的 GAC 中.
I am using Strong Name in the assembly and is stored in GAC on the SQL Server Machine.
安全隐患/妥协是什么?
What are the security implications/compromise ?
推荐答案
这些扩展存储过程允许从 SQL Server 内部实例化 OLE (ActiveX") 对象.创建 MSXML 对象并让它发送一些数据库数据作为 HTTP POST 的典型用例.
These extended stored procedures allow one to instantiate an OLE ("ActiveX") object from inside SQL Server. A typical use case creating an MSXML object and having it send some database data as an HTTP POST.
在我看来,sp_OACreate 等过程有两个问题:
In my mind, there are two issues with the sp_OACreate etc procedures:
默认情况下,只有 sysadmin 角色的主体才能执行这些.授予和测试这些权限很痛苦.(您必须将用户添加到 Master 数据库并授予他们在该数据库中的权限.)
Only principals in the sysadmin role can execute these by default. Granting and testing these permissions is a pain. (You have to add the user to the Master database and grant them permissions in that database.)
授予的权限非常广泛.你不能只是说好的用户,你有权创建这种对象并用它做 xyz".相反,您说好的用户,您有权创建您想要的任何 OLE 对象并做您想做的任何事情."那是一块相当宽阔的画布.
The permission granted is very broad. You can't just say "ok user, you have the right to create this kind of object and do xyz with it." Instead you say "ok user, you have the right to create any OLE object you want and do anything you want." That is a pretty broad canvas.
这篇关于使用 SP_OACreate、SP_OAMethod 等是否存在安全风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 SP_OACreate、SP_OAMethod 等是否存在安全风险?


- 更改自动增量起始编号? 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- SQL 临时表问题 2022-01-01