
Oracle登录触发器绕过
名称:Oracle登录触发器绕过(7826485) [DB05]
涉及系统:Oracle 8-10g Rel. 2
安全级别:高风险
类型:Bypass Security Feature Database Logon Trigger
厂商URL :www.oracle.com
发现者 :Alexander Kornbrust
公告时间:17 April 2007 (V 1.00)
简单的 Logon Trigger:
-- 只允许IP 为192.168.2.121, 192.168.2.123, 192.168.2.233的用户登录
-- 只允许访问时间为6点和18点。
CREATE OR REPLACE TRIGGER rds_logon_trigger
AFTER LOGON ON DATABASE
BEGIN
IF SYS_CONTEXT('USERENV','IP_ADDRESS') not in ('192.168.2.121','192.168.2.123','192.168.2.233') THEN
RAISE_APPLICATION_ERROR(-20003,'You are not allowed to connect to the database');
END IF;
IF (to_number(to_char(sysdate,'HH24'))< 6) and (to_number(to_char(sysdate,'HH24')) >18) THEN
RAISE_APPLICATION_ERROR(-20005,'Logon only allowed during business hours');
END IF;
-- 插入数据到审计表
-- 该审计表必须先创建!!!
INSERT INTO rds_user_log VALUES(
user,
sys_context('USERENV','SESSIONID'),
sys_context('USERENV','HOST'),
null,
null,
null,
sysdate,
to_char(sysdate, 'hh24:mi:ss'),
null,
null,
null
);
END;
/
补丁信息:应用Oracle CPU April 2007补丁包。
历史:
7-jun-2006 Oracle 安全部门注意到该漏洞。
8-jun-2006 漏洞确认。
17-apr-2007 Oracle 发布CPU April 2007 [DB05] 补丁包修复漏洞。
17-apr-2007 发布公告。

