Problem
Guardium S-TAP无法抓取到使用Bequeath协议连接到Oracle数据库的本地流量。
Cause
如果S-TAP的配置不准确,可能会导致本地连接(Bequeath)流量不被捕获;本地流量的客户端和服务器端都在同一台服务器上。
Diagnosing The Problem
请采用以下步骤来确认问题是否出在S-TAP端:
1. 使用root用户在数据库和S-TAP所在的那台服务器上运行以下命令:
[root]# tcpdump -i eth0 -nn host -X -s0 | grep dual
2. 开启一个新的控制台窗口连接至该数据库和S-TAP所在的同一台服务器,使用oracle用户登录,然后用以下命令产生oracle的本地连接流量:
sqlplus "/ as sysdba"
select * from sys.dual;
sys.dual表是否存在于您的数据库并不重要。如果S-TAP正常工作,它是可以在tcpdump里捕获到这条sql语句的。
以下是tcpdump成功捕获到该sql语句的输出示例:
[root]# tcpdump -i eth0 -nn host 192.168.0.2 -X -s0 |grep dual
0x00e0: 202a 2066 726f 6d20 7379 732e 6475 616c .*.from.sys.dual
如果该select语句没有出现在tcpdump的输出里,则S-TAP没有捕获到本地连接流量。
注意: 如果您使用的操作系统不支持tcpdump命令,可以考虑使用其他类似工具,例如snoop。
Resolving The Problem
修正S-TAP配置文件,guard_tap.ini, 使其包含以下参数及值:
[TAP]
ktap_installed=1
[DB_x]
db_exec_file=//bin/oracle
db_install_dir=/
tee_listen_port=0
以上参数确保使用K-TAP来监控本地流量,而不是使用Tee。
[{"Product":{"code":"SSMPHH","label":"IBM Security Guardium"},"Business Unit":{"code":"BU008","label":"Security"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"10.0;8.2;9.0;9.1;9.5","Edition":"All Editions","Line of Business":{"code":"LOB24","label":"Security Software"}}]