出于安全原因,我要求数据库团队添加 EXTPROC_DLLS:ONLY;但他们这样说:
“请注意,KEY = EXTPROC1526 不涉及任何 完全外部过程。这只是任何流程需要使用的密钥 通过IPC协议调用Oraxxx。 key可以是任意值并且相同 键值应通过 tnsnames.ora 传递”
对我来说,这似乎是错误的。你能帮我解决这个问题吗? EXTPROC 的确切用途是什么?如果我们不添加 EXTPROC_DLLS:ONLY 会发生什么?
与其他数据库相反,Oracle 不允许插件访问它自己的内存地址空间。对于 MySQL/PostgreSQL,主数据库进程会加载 .dll 插件(C 存储过程)。
Oracle 让侦听器通过调用
extproc
(或 extproc32
)来生成新进程。该进程加载共享库,数据库的其余部分通过 IPC 与该进程通信。
这种方法更安全,因为外部库不会使数据库崩溃,也不会损坏数据。另一方面,有时 C 存储过程可能比 Java 存储过程慢。
此选项可以限制 extproc 加载的 .dll 的路径。即那些由
CREATE LIBRARY
语句创建的。
PS:C 存储过程的使用非常罕见,如果您不使用它们,您可以随意从listener.ora 中删除整个extproc 节。
PS1:存在利用
extproc
功能的可能场景。
CREATE LIBRARY
,通常不会被授予CREATE LIBRARY
语句创建指向 /tmp 的 Oracle LIBRARY extproc
到 dlopen
这个库exproc
将使用操作系统权限执行邪恶代码 oracle:dba
使用此
EXTPROC_DLLS:ONLY
限制时,开发人员必须与DBA合作,并且只能使用和加载白名单库。
任何连接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.
还有一个示例