在windows 2003 server上安裝了Oracle 9.2.0.1.0,將其升級到9.2.0.8版本,并打上最新的安全補(bǔ)丁April 2008版。 一、升級oracle(administrator用戶權(quán)限) (1)到metalink下載升級壓縮包,patch號為4547809,壓縮包名稱為 p4547809_92080_WINNT.zip,for windows 32bit。 (2)解壓縮zip到根目錄,下邊包含一個(gè)Disk1和readme.html文件。安裝升級補(bǔ)丁之前,在管理中停掉所有的oracle相關(guān)服務(wù),在命令提示符中l(wèi)snrctl stop,停掉監(jiān)聽器。 (3)在雙擊Disk下的setup.exe前,確保環(huán)境變量中有ORACLE_HOME變量,并已正確設(shè)置。 在CMD窗口中查看:set ORACLE_HOME=d:\oracle\ora92 也可在運(yùn)行setup.exe后查看已安裝產(chǎn)品,如下圖 (4)雙擊setup.exe,自動升級到9.2.0.8,命令提示符提示安裝完成后,說明組件已經(jīng)安裝上。 (5)第4步并沒有update組件,所以還需要update.此時(shí)需要開啟Oracle的服務(wù),最好是重起電腦,Oracle默認(rèn)服務(wù)會自啟動。 (6)以sysdba登錄數(shù)據(jù)庫,執(zhí)行 SQL> CONN SYSTEM/...@ORCL AS SYSDBA SQL> SHUTDOWN IMMEDIATE SQL> STARTUP MIGRATE SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catpatch.sql 其中ORACLE_BASE\ORACLE_HOME表示你的oracle目錄,假設(shè)oracle安裝目錄為d:\oracle\ora92,則第三句應(yīng)為: SQL>@d:\oracle\ora92\rdbms\admin\catpatch.sql 其中@表示執(zhí)行以下腳本。 這個(gè)過程持續(xù)大概20分鐘。 (7)完成后shutdown數(shù)據(jù)庫,然后startup,執(zhí)行另外一個(gè)腳本 SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp.sql,完成后升級補(bǔ)丁打完?。?/div> (8)重起數(shù)據(jù)庫,登陸后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號為6867138。 (2)CPU是過渡性補(bǔ)丁,需要用Oracle的安裝工具opatch安裝。 安裝CPU之前,查看相應(yīng)的opatch版本應(yīng)為1.0.0.0.57,9.2.0.1版oracle自帶版本為55的,到metalink下載57版本的,壓縮包名為p2617419_10102_GENERIC。 (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,自動安裝安全補(bǔ)丁。 (6)跑remove_demo.js腳本來移除不穩(wěn)定的Oracle HTTP Server demos.。 打開CMD窗口在提示符中cd到6867138目錄 輸入cscript //nologo remove_demo.js (7)啟動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í)行以下語句 cd %ORACLE_HOME%\rdbms\admin sqlplus /nolog SQL> CONNECT / AS SYSDBA SQL> @utlrp.sql (8)重新編譯數(shù)據(jù)庫中的視圖 cd %ORACLE_HOME%\cpu\view_recompile然后sysdba登錄,執(zhí)行 SQL> @recompile_precheck_jan2008cpu.sql 這個(gè)是計(jì)算下需要執(zhí)行的時(shí)間等。 shutdown數(shù)據(jù)庫,以migrate方式startup, SQL>startup migrate 然后SQL> @view_recompile_jan2008cpu.sql 關(guān)閉數(shù)據(jù)庫。 重復(fù)第7步操作 三、Oracle安全設(shè)置 1、針對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、針對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è)置請參考 遠(yuǎn)程數(shù)據(jù)庫服務(wù)是沒有密碼保護(hù)。 描述 解決方法 使用lsnrctrl CHANGE_PASSWORD命令分配一個(gè)密碼。具體操作如下: 打開CMD窗口,輸入lsnrctl回車,按照以下步驟執(zhí)行即可解決; LSNRCTL> change_password
Old password: New password: Reenter new password: 正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))) LISTENER的口令已更改 命令執(zhí)行成功 LSNRCTL> set password Password: 命令執(zhí)行成功 LSNRCTL> save_config 正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))) 保存的LISTENER配置參數(shù)。 監(jiān)聽器參數(shù)文件 d:\oracle\ora92\network\admin\listener.ora 舊的參數(shù)文件d:\oracle\ora92\network\admin\listener.bak 命令執(zhí)行成功 |
|