使用 SP_OACreate、SP_OAMethod 等是否存在安全风险? [英] Usage of SP_OACreate, SP_OAMethod etc.. is a security risk?

查看:50
本文介绍了使用 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 等是否存在安全风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆