4

出于安全原因,我要求数据库团队添加 EXTPROC_DLLS:ONLY; 但他们这样说:

“请注意,KEY = EXTPROC1526根本不指任何外部进程。这只是任何进程使用的密钥,需要通过IPC协议调用Oraxxx。密钥可以是任何值,相同的密钥值应该是通过 tnsnames.ora"

在我看来,这似乎是错误的。你能帮我解决这个问题吗?EXTPROC 的确切用途是什么?如果我们不添加 EXTPROC_DLLS:ONLY 会发生什么?

4

2 回答 2

3

任何连接oracle数据库的程序都需要Extproc代理。

PLS/SQL例如需要Extproc使用 oracle

您可以在此处 找到有关证券的更多
信息

Description
***********
The Oracle database server supports PL/SQL, a programming language. PL/SQ can execute external procedures via extproc. Over the past few years there has been a number of vulnerabilities in this area.

Extproc is intended only to accept requests from the Oracle database server but local users can still execute commands bypassing this restriction.

Details
*******
No authentication takes place when extproc is asked to load a library and execute a function. This allows local users to run commands as the Oracle user (Oracle on unix and system on Windows). If configured properly, under 10g, extproc runs as nobody on *nix systems so the risk posed here is minimal but still present. 

这里的一个例子

于 2015-05-14T13:25:01.480 回答
2

与其他数据库相反,Oracle 不允许插件访问它自己的内存地址空间。在 MySQL/PostgreSQL 的情况下,主数据库进程会加载一个 .dll 插件(C 存储过程)。

extprocOracle 允许侦听器通过调用(或extproc32)来生成一个新进程。该进程加载共享库,数据库的其余部分通过 IPC 与该进程通信。

这种方法更安全,因为外部库不会使数据库崩溃,也不会损坏数据。另一方面,有时 C 存储过程可能比 Java 存储过程慢。

此选项可以限制 extproc 加载的 .dll 的路径。即那些由CREATE LIBRARY语句创建的。

PS:C 存储过程的使用非常少见,如果您不使用它们,您可以从 listener.ora 中自由删除整个 extproc 节。

PS1:可能存在利用该extproc功能的情况。

  • 用户必须拥有CREATE LIBRARY,通常不授予
  • extproc 未配置为使用任何人的权限运行 - 但作为 oracle:dba 运行
  • 用户创建恶意 .so 库,该库将在初始化期间执行“邪恶”操作。
  • 用户将此库放入 /tmp 目录
  • CREATE LIBRARY用户使用语句创建指向 /tmp 的 Oracle LIBRARY
  • extproc用户强制dlopen此库
  • exproc将以操作系统权限执行恶意代码oracle:dba

使用此EXTPROC_DLLS:ONLY限制时,开发人员必须与 DBA 合作,并且只能使用和加载列入白名单的库。

于 2015-05-14T14:22:09.260 回答