在windows 2003 server上安裝了Oracle 9.2.0.1.0,將其升級(jí)到9.2.0.8版本,并打上最新的安全補(bǔ)丁April 2008版。
一、升級(jí)oracle(administrator用戶權(quán)限)
(1)到metalink下載升級(jí)壓縮包,patch號(hào)為4547809,壓縮包名稱為 p4547809_92080_WINNT.zip,for windows 32bit。
(2)解壓縮zip到根目錄,下邊包含一個(gè)Disk1和readme.html文件。安裝升級(jí)補(bǔ)丁之前,在管理中停掉所有的oracle相關(guān)服務(wù),在命令提示符中l(wèi)snrctl stop,停掉監(jiān)聽器。
(4)雙擊setup.exe,自動(dòng)升級(jí)到9.2.0.8,命令提示符提示安裝完成后,說明組件已經(jīng)安裝上。
(5)第4步并沒有update組件,所以還需要update.此時(shí)需要開啟Oracle的服務(wù),最好是重起電腦,Oracle默認(rèn)服務(wù)會(huì)自啟動(dòng)。
(6)以sysdba登錄數(shù)據(jù)庫(kù),執(zhí)行
C:\...>SQLPLUS /NOLOG
這個(gè)過程持續(xù)大概20分鐘。
(8)重起數(shù)據(jù)庫(kù),登陸后select * from v$version;可以看到oracle升到了9208。
二、oracle打安全補(bǔ)丁
(1)補(bǔ)丁信息:Critical Patch Update Note Release 9.2.0.8 for Microsoft Windows (32-Bit),patch號(hào)為6867138。
(3)在用OPATCH安裝安全補(bǔ)丁之前,重啟服務(wù)器,進(jìn)入安全模式進(jìn)行。
(4) 解壓p2617419_10102_GENERIC,解壓縮后將OPATCH目錄覆蓋%oracle_home%\opatch
(5)在命令提示符中直接Opatch apply %補(bǔ)丁所在位置%,比如在電腦中補(bǔ)丁在 D:\6867138中,則命令提示符中輸入 Opatch apply D:\6867138,自動(dòng)安裝安全補(bǔ)丁。
(6)跑remove_demo.js腳本來移除不穩(wěn)定的Oracle HTTP Server demos.。
打開CMD窗口在提示符中cd到6867138目錄
輸入cscript //nologo remove_demo.js
(7)啟動(dòng)oracle服務(wù),cd %ORACLE_HOME%\cpu\CPUApr2008 然后以sysdba登錄后執(zhí)行SQL>@catcpu.sql
以sysdba登陸執(zhí)行SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS= 'INVALID';檢查,若有數(shù)據(jù)執(zhí)行以下語句
SQL> @utlrp.sql
(8)重新編譯數(shù)據(jù)庫(kù)中的視圖
cd %ORACLE_HOME%\cpu\view_recompile然后sysdba登錄,執(zhí)行
SQL> @recompile_precheck_jan2008cpu.sql
這個(gè)是計(jì)算下需要執(zhí)行的時(shí)間等。
shutdown數(shù)據(jù)庫(kù),以migrate方式startup,
SQL>startup migrate
然后SQL> @view_recompile_jan2008cpu.sql 關(guān)閉數(shù)據(jù)庫(kù)。
重復(fù)第7步操作
三、Oracle安全設(shè)置
1、針對(duì)oracle9i用nessus掃描后出現(xiàn)443端口有高危風(fēng)險(xiǎn)的設(shè)置
描述
In a default installation of Oracle 9iAS v.1.0.2.2, it is possible to
deploy or undeploy SOAP services without the need of any kind of credentials.
This is due to SOAP being enabled by default after installation in order to
provide a convenient way to use SOAP samples. However, this feature poses a
threat to HTTP servers with public access since remote attackers can create
soap services and then invoke them remotely. Since SOAP services can
contain arbitrary Java code in Oracle 9iAS this means that an attacker
can execute arbitray code in the remote server.
解決方法
參考文檔:http://www.oracle.com/technology/deploy/security/pdf/ias_soap_alert.pdf
修改文件jserv.conf
$ORACLE_HOME/Apache/Jserv/etc/jserv.conf
在版本為9.2.0.8.0中為$ORACLE_HOME/Apache/Jserv/conf/jserv.conf
找到以下四行并將其注釋掉
ApJServGroup group2 1 1 $ORACLE_HOME/Apache/Jserv/etc/jservSoap.properties
ApJServMount /soap/servlet ajpv12://localhost:8200/soap
ApJServMount /dms2 ajpv12://localhost:8200/soap
ApJServGroupMount /soap/servlet balance://group2/soap
需重啟服務(wù)生效
2、針對(duì)oracle9i用nessus掃描后出現(xiàn)7778端口有高危風(fēng)險(xiǎn)的設(shè)置
描述:
Oracle 9i Application Server uses Apache as its web
server with an Apache module for PL/SQL support.
By default, no authentication is required to access the
DAD configuration page. An attacker may use this flaw
to modify PL/SQL applications or prevent the remote host
from working properly.
解決方法
參考文檔: http://www.oracle.com/technology/deploy/security/pdf/ias_modplsql_alert.pdf
修改 apache httpd.conf 文件,加入以下代碼:
<DirectoryMatch \_ pages\>
Order deny,allow
Deny from all
</DirectoryMatch>
<Files ~ "^\globals.jsa">
Order allow,deny
Deny from all
</Files>
<DirectoryMatch WEB-INF>
Order deny,allow
Deny from all
</DirectoryMatch>
重啟apache服務(wù)生效
3、有關(guān)監(jiān)聽密碼為空的安全設(shè)置請(qǐng)參考
描述
遠(yuǎn)程Oracle偵聽器程序(tnslsnr)沒有密碼分配。攻擊者可以利用這個(gè)事實(shí),武斷地將其關(guān)閉,從而防止合法用戶使用它。
解決方法
聯(lián)系客服