保障SQL SERVER 2000中安全的最佳做法【外文翻译】

保障SQL SERVER 2000中安全的最佳做法【外文翻译】

ID:452944

大小:112.50 KB

页数:18页

时间:2017-08-03

上传者:U-944
保障SQL SERVER 2000中安全的最佳做法【外文翻译】_第1页
保障SQL SERVER 2000中安全的最佳做法【外文翻译】_第2页
保障SQL SERVER 2000中安全的最佳做法【外文翻译】_第3页
保障SQL SERVER 2000中安全的最佳做法【外文翻译】_第4页
保障SQL SERVER 2000中安全的最佳做法【外文翻译】_第5页
资源描述:

《保障SQL SERVER 2000中安全的最佳做法【外文翻译】》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

外文翻译原文SQLServer2000SecurityBestPracticesMaterialSource:GlobalKnowledgeAuthorBrettTomson,IntroductionTheSlammerworm,SQLInjectionattacks,DenialofServiceattacks,andBruteForceattacks.Newsheadlinesscreamthelatesttheftof300,000creditcardnumbersfromane-commercewebsitebyagroupofhackers.Adisgruntledemployeetrashesyearsofproprietarycorporatedataafterlearningthatheisbeinglaidoff.Theseattacksandmanyothersareexamplesofthesecuritythreatsthatpervadeourinterconnectedsociety.Systemandnetworkadministratorsareattheforefrontofthedefenseagainsttheseattacks.But,withtheexplosionofe-commerce,databaseadministratorsmustensurethesecurityandintegrityoftheirdatabaseservers.ThisarticleexaminesbestpracticesthatcanbeemployedtosecureMicrosoftSQLServer2000databases.ItprovidesanoverviewofthesecuritymodelinSQLServer2000andthendiscussesseveralbestpracticesthatcanbeemployedtosecureyourSQLServer2000databaseserver.WhatAreBestPracticesandWhyShouldWeUseThem?Bestpracticesaretechniques,tips,andtricksthathaveevolvedovertimethroughresearch,planning,anddeploymentinorganizations.Theprocessofyieldingbestpracticestypicallyinvolvesaseriesoftrial-and-errorstagesimplementingatechniqueormethodologyandthenevaluatingitseffectiveness.Iftheresultispositive,thetechniqueiskept,refined,anddistributedtoothermembersoftheorganization.Iftheresultisnegative,thepracticeisthrownoutandanothertechniqueistested.Thissubstitutionrepeatsuntilapositiveresultisreached.Intheend,theorganizationisleftwithagroupoftechniquesandmethodologiesthatwhenemployedwillincreasetheproductivityandeffectivenessoftheorganizationasawhole.BestpracticesarebynomeansrestrictedtotheITworld.Youwilloftenfind bestpracticesinjustabouteveryfieldimaginable,fromhealthcaretoaccountingtoforestry.Theprimaryreasontousebestpracticesinyourorganizationistoincreaseyourlevelofunderstandingwithyourproducts.Furthermore,usingbestpracticessavesyoufromspendingyourvaluabletimefiguringoutwhateveryoneelsealreadyknows.Inotherwords,donotreinventthewheel.SQLServerSecurityModelTobeginunderstandingtheroleofMicrosoftSQLServer2000securitybestpractices,itisimportantthatyouhaveathoroughunderstandingofhowthesecuritymodelisimplementedinSQLServer.SecurityinSQLServercanbedividedintotwocategories:ServerandDatabase.Server-levelsecurityinvolvesaccessandauthenticationtotheserveralongwithsecuritymechanismsrelatedtoserver-basedadministration.Database-levelsecurityisrelatedtothedatabasesontheserverandwhoorwhatcanaccesstheobjectsstoredinthosedatabases.ServerAuthenticationInordertouseSQLServer,youmustfirstlogintotheserver.Inordertosuccessfullylogintotheserveryoumustfirstbeauthenticatedbytheserver.InSQLServer2000,therearetwotypesofauthenticationthatcanbeemployed.ThesetypesareWindowsauthenticationandSQLServerauthentication,ormorecommonlyreferredtoasMixed-Modeauthentication.WindowsAuthenticationWindowsauthenticationisthedefaultauthenticationemployedbySQLServerduringinstallation.ThistypeofauthenticationrequiresallconnectionstotheservertobevalidWindowsuseraccountsorgroups.ThislevelofauthenticationprovidesanextrabenefitbyleveragingthesecuritymodeloftheWindowsnetworktoauthorizeaccesstotheserver.Furthermore,withWindowsauthentication,auditingcantracktheuser’snameandwhatactionsheorsheisperformingontheserver.ThistypeofauthenticationishighlyrecommendedandshouldbeemployedonallSQLServerdatabaseservers.LoginsassociatedwithWindowsauthenticationarestoredinthesysxloginstableinthemasterdatabase.Don’tworrythough,asnopasswordinformationisstoredinthistablealongwiththeuserorgroupname.Duringauthentication,usercredentialsarepassedtotheunderlyingoperatingsystemforvalidationandauthentication.Ifthecredentialsarevalid,theusercanaccesstheserver.Ifthecredentialsfail,thentheuserisdeniedaccesstothe server.Administratorsorthosewithsufficientprivilegescangrant,revoke,ordenyaccesstotheSQLServerdatabaseservertoindividualusersorgroups.Usersandgroupsaregrantedaccesstotheserverasopposedtohavingaccountscreatedontheserver.Ifauserorgroup’saccessisrevoked,thenthatuserorgroupcannotaccesstheserver.However,ifthatuserorgroupisinanothergroupthatdoeshaveaccesstotheserver,thentheywillbeallowedtoaccesstheserverthroughthatgroup’sprivileges.Topreventanyone,notmatterwhom,fromaccessingyourdatabaseserver,youmustexplicitlydenythemaccesstotheserver.Evenifthatuserorgroupisinanothergroupthatdoeshaveaccesstotheserver,theywillbepreventedfromloggingintotheserver.YoucanuseEnterpriseManagerorsystemstoredprocedureslikesp_grantlogin,sp_revokelogin,orsp_denylogintoconfigureaccessforyourusersandgroups.Mixed-ModeAuthenticationMixed-ModeauthenticationsupportsbothWindowsauthenticationandtheuseofSQLServerlogins.SQLServerloginsarestoredlocallyoneachdatabaseserverandcannotbeusedtoconnecttootherserversonthenetwork.ThistypeofauthenticationprovidesbackwardcompatibilitywithearlierversionsofSQLServerandprovidesameansofconnectingtotheserverinanenvironmentwhereWindowsauthenticationcannotbeused.SQLServerlogins,likeWindowsauthenticationlogins,arestoredinthesysxloginstableinthemasterdatabase.However,unlikeWindowsauthenticationlogins,thepasswordsforSQLServerloginaccountsarestoredinthesysxloginstable.Fearnot,forthesepasswordsarestoredinanencryptedformatandcannotbeviewedbypryingeyes.WhenMixed-Modeauthenticationisenabledonaserver,adefaultsystemadministratoraccountbecomesenabledaswell.Thisaccountiscalled"sa",andtypicallystandsforsystemadministrator.Thisaccounthasallprivilegesforallareasofthedatabaseserver.Unfortunately,thisaccountisinstalledwithnopasswordbydefault.Itisimperativethatacomplexpasswordisprovidedforthisaccountassoonaspossible,evenifyoudonotplanonusingMixed-Modeauthenticationinyourenvironment.SupplyingapasswordforthesaaccountwillpreventasecurityholefromopeningupifsomeoneinadvertentlyswitchestheserverfromWindowsAuthenticationtoMixed-ModeAuthentication.UnlikeWindowsAuthentication,youonlyhavetwochoiceswhenitcomesto controllingaccesstothedatabaseserver.Youcanaddloginsthateffectivelygivessomeonetheabilitytoconnecttotheserver,oryoucandroplogins,whichpreventsanyonefromusingthatSQLServerlogintoconnecttotheserver.ThesesettingscanbeconfiguredusingEnterpriseManagerorthesp_addloginandsp_droploginsystemstoredprocedures.ServerRolesServerRolesarefixedfortheserver.Youcannotchangethem,norcanyouaddyourown.Serverrolesareusedtograntpermissiontoperformserver-basedadministrativetasksdependingonthetypeofroleselected.ThefollowinglistillustratesthedifferenttypesofServerRolesfoundonaSQLServer2000databaseserver.•BulkInsertAdministrators–LoginsassociatedwiththisrolecanperformbulkinsertoperationsusingtheBULKINSERTcommand.•DatabaseCreators–Loginsassociatedwiththisrolecanalter,create,drop,andrenamedatabasesontheserver.Theyalsohavetheabilitytorestoredatabasesandtransactionlogsfrombackups.•DiskAdministrators–Loginsassociatedwiththisroleaddandremovedumpdevicesontheserver.Dumpdevicesareusedtostoredatabaseandtransactionlogbackups.•ProcessAdministrators–LoginsassociatedwiththisrolecanterminateconnectionstotheserverbyusingtheKILLcommand.•SecurityAdministrators–Loginsassociatedwiththisrolecanmanageaccesstotheserver.•ServerAdministrators–Loginsassociatedwiththisrolecanmanageserver-widesettingsandconfigurationoptions.•SetupAdministrators–Loginsassociatedwiththisrolecanmanageextendedstoredprocedures.•SystemAdministrators–ThisrolegrantspermissiontoperformanyandeverytaskassociatedwithSQLServer.Furthermore,anyoneinthisrolecanaccessanyobjectinanydatabaseeveniftheyuserhasbeenexplicitlydeniedpermissiontothatobject.Bydefault,SQLServerassociatesthelocaladministratorsgroupwiththisserverrole.Ifnecessary,youcanreassignthisrolepermissionordenySQLServeraccesstothisgroup.Also,ifMixed-Modeauthenticationisenabled,thenthe saaccountisgrantedaccesstothisrole.Thissettingcanbemodified,ifdesired.DatabaseUsersDatabaseusersareaccountsthatarecreatedforeachdatabaseontheserverandallowaccesstotheobjects(suchastables,views,andstoredprocedures)storedineachdatabase.Thesedatabaseuseraccountsarenotthesameasloginaccountscreatedtoaccesstheserver.Onceausersuccessfullyauthenticatesandconnectstotheserver,theydonothavedefaultaccesstothedatabasesontheserver.Inordertoaccessaspecificdatabaseontheserver,adatabaseusermustbecreatedinthedatabaseandassignedtotheloginaccount.Then,theusercanconnecttothatdatabase.AspecialuseraccountcalledGuestcanbeaddedtodatabases.Guestuseraccountsarenotaddedbydefaultwhenadatabaseiscreated.Thisaccountisusedbyallserverloginsthatarenotassociatedwithaspecificdatabaseuserorrole.Assuch,theyposeasecurityriskandshouldnotbeused.DatabaseuserscanbecreatedandremovedthroughEnterpriseManagerorthroughT-SQLstatementslikesp_grantdbaccessandsp_revokedbaccess.OneofthebenefitsofusingEnterpriseManageristhatitmakesiteasyfortheadministratortocreateserverloginsandassignthemtodatabasesinthesameprocess.ThereareseveralDatabaseRolesthatcomepre-configuredwhenanewdatabaseiscreated.Thefollowinglistillustratesthefixeddatabaserolesandtheirassociatedpermissionsfornewdatabases.•db_accessadmin–Usersinthisrolecancontrolaccesstothedatabase.•db_backupoperator–Usersinthisrolecanperformbackupsandbackuprelatedproceduresonthedatabase,butcannotrestoredatabases.•db_datareader–Usersinthisrolecanreaddatafromanyobjectinthedatabase.•db_datawriter–Usersinthisrolecancreate,modify,anddeletedatafromanyobjectinthedatabase.•db_ddladmin–Usersinthisrolecancreate,alter,anddropobjectsinthedatabase.•db_denydatareader–Usersinthisrolearepreventedfromreadinganydatainthedatabase.•db_denydatawriter–Usersinthisrolearepreventedfromcreating,modifying,ordeletingdatainthedatabase. •db_owner–Usersinthisroleareconsideredownersofthedatabase.Assuch,theyhavepermissionstoallobjectsinthedatabase.However,anydenypermissiononanobjectwillnotbeoverriddenbybeingamemberofthisdatabaserole.•db_securityadmin–Usersinthisrolecanmanageobjectpermissionsforotherdatabaseusersandrolesinthesamedatabase.•public–Thisuserroleisacatch-allroleforalldatabaseusersinthedatabase.Permissionsshouldneverbedirectlyappliedtothisroleastheywillaffecteveryonewhousesthedatabase.Besidesthesefixeddatabaseroles,user-defineddatabaserolescanbecreatedwiththeirownsetofpermissionstoobjectsinthedatabase.Furthermore,theseuser-definedrolescanbeaddedtoanyofthefixeddatabaserolesforthatdatabase.ThereisathirdtypeofdatabaseroleavailableinSQLServer2000calledanapplicationrole.ThistypeofroleisusedbyapplicationsconnectingtoSQLServerthroughavalidloginanddatabaseuseraccount.Uponconnectingtothedatabase,theapplicationactivatestheapplicationroleandtransferstheidentityoftheuserconnectingtotheserverandthatapplicationrole.Asaresultofthislossofidentityinauditingactionsondatabaseobjects,itisnotrecommendedthatapplicationrolesbeusedinyourenvironment.BestPracticesThefollowingsectionoutlinesbestpracticesthatcanbeemployedonSQLServer2000serversinyourenvironment.Thissectionisdividedintothefollowingsubsections:Physical,OperatingSystem(OS),Network,SQLServerInstallation,SQLServerConfiguration,SQLServerAdministration,SQLServerMaintenance,andSQLServerDevelopment.PhysicalThelowestThelowestlevelofsecuritythatonecanemployisindealingwiththephysicalelementsaroundtheserver.Bestpracticesrelatingtothephysicallayerinclude:•Themostimportantthingyoucandototheserverisisolateandsecureitwithinyourorganization.Noonewantstoexplaintotheirbossthattheylostallofthecorporatedatabecausesomeonetrippedoverthepowercordandfriedtheharddrivesallbecausetheserverwaslocatedundersomeone’sdeskintheircubicle.Databaseservers,likeallservers,shouldbekeptinasecureroomwithfire suppressionequipmentandenvironmentalcontrols.•Accesstothisroomshouldonlybegiventoaselectfewtrustworthyindividualswithintheorganization.•Accesstothisroomshouldbetrackedandauditedthroughtheuseofkeycardsorindividualaccesscodes.•UsetheappropriateRAIDconfigurationtoensuretheintegrityofthedataontheserver.OperatingSystemThenextareatofocusattentiononistheOperatingSystem.Anentirearticlecouldbedevotedtothisarea,soonlythosebestpracticesthatimpactSQLServerwillbelisted.•UseNTFS.NTFSwillprovidemoreefficientdiskuseandbettersecurityoptionsonfilesanddirectoriesontheserver.•Ifthedatainyourdatabaseiscriticaltoyourorganization,enableEFSalongwithNTFS.EFSwillenablefileencryptiononyourdatabasefiles.RememberthatencryptionanddecryptionisperformedbytheaccountrunningtheSQLServerservice.Ifyouneedtoswitchserviceaccounts,youmustfirstdecryptthefileswiththeoldaccount,andthenencryptthemwiththenewaccount.•Iffilesharesarenecessaryonyourdatabaseserver,theseshouldbeenabledasread-onlyshares.Ifread-writeisinevitable,makesurethatonlytheappropriateusershavewriteaccess.•Renamethelocaladministratoraccount.Thismakesithardertohackthesystem.•Enablesecurityauditingforanyoneloggingontotheserver.•Installvirusprotectionsoftwareonyourserver.Donotincludeyourdatafoldersinthevirusscan.Also,keepyourvirusdefinitionsuptodate.•Createdomaingroupsandassignuserstothesedomaingroups.Createlocalgroupsandassignthedomaingroupstotheselocalgroups.Thengrantloginprivilegestotheselocalgroups.•Disableallunnecessaryservicesontheserver.Network Applyingthesepracticestoyournetworkdeviceswillhelpensurethatyourdatabaseservercannotbeaccessedfromoutsideyournetwork.•Usefirewallstopreventaccesstothedatabaseserverfromexternallocations.•DisableTCPport1433andUDPport1434onallfirewalls.IfyouareusingNamedInstances,disablethoseportsaswell.•Makesurethatthedatabaseserverisonasecuresubnetofthenetwork.SQLServerInstallationThefollowingstepswillaidintheinstallationprocessofSQLServer2000.•InstallSQLServer2000onitsownserverseparatefromanymiddle-tierorwebservers.•Makesurethatthedatabaseserverdoesnotprovideotherservicesonthenetwork,suchasdomaincontroller,orfile/printserver.•CreateseparateWindowsuseraccountswiththelowestpossibleprivilegesforuseastheSQLServer2000serviceaccounts.InstallationofSQLServer2000willensurethatthenecessaryprivilegesareappliedtotheseaccounts.•Alwaysinstallthelatestservicepacksandsecuritypatches.•ConfigureinstallationtouseWindowsAuthenticationmode,ifpossible.•IfMixed-ModeAuthenticationisrequired,configurethesaaccountwithastrongpassword.SQLServerConfigurationConfiguringaSQLServerdatabaseserverproperlycanbeatryingtask.Thefollowingbestpracticescanhelpalleviatesomeofthedangersofhavinganopensystem.•Deleteorarchiveoldsetupfiles,sqlstp.log,sqlsp.og,andsetup.iss.Thesefilesmaycontaincleartextorweaklyencryptedcredentials.Youcanfindthesefilesinthe:ProgramFilesMicrosoftSQLServerMSSQLInstallfolder.•AssignstrongpasswordstoallSQLServerlogins,especiallythesaaccountifonehasn’tbeenprovidedduringinstallation,eveniftheserverissettouseWindowsauthentication.•EnableloginauditingonSQLServer.YoucanconfigurethissettingontheserverpropertieswindowundertheSecuritytab.SettheAuditLeveltoFailureasa minimum,orAllforenhancedsecurityauditing.•Removethesampledatabasesfromallproductionservers.ThesampledatabasesarepubsandNorthwind.ThesedatabasescontainguestuseraccountsandcanprovideameansforhackerstouseSQLinjectionandgainaccesstodataontheserverorworseyet,gainaccesstotheserveritself.•Assignstaticportsforanynamedinstancesinstalledontheserver.Makesureyoudisabletheseportsonyourfirewalls.SQLServerAdministrationTheapplicationofthefollowingbestpracticescanaidtheDBAwithnormaladministrativedutiesaswellasenhancethesecurityofthedatabaseserver.•KnowtheSQLServersecuritymodelinsideandout.•Assignlogins(localgroupsontheserver)tofixedserverroleswhereappropriate.•Backupyourdataandtransactionlogfilesregularly.Storethesebackupsinasecurelocation,preferablyoff-site.Testyourdisasterrecoveryplan;thentestitagain.•LimitmembershipintheSystemAdministratorsfixedserverrole.•Trynottousecrossdatabaseownershipchaining.Ifyoumustdoso,thenmakesurethatthedatabasesinvolvedaredeployedasasingleunit.•Denyexecuteprivilegeonxp_cmdshelltoallusersotherthanthoseintheSystemAdministratorsfixedserverrole.•RemovetheBUILTINAdministratorsloginaccountfromtheserver.•Ifthedatabasecontainscriticalinformation,suchassalarydata,considerencryptingthedatausingathird-partyorcustom-builtcryptographytool.•EnableSSLontheservertoensureanencryptionconnectiontotheserver.Youwillneedacertificatefromacertifyingauthority,suchasVeriSign,Thawte,oryourownCA.•Simplifypermissionsbyassigningdatabaseuserstorolesandapplyingpermissionsontheroles.•Donotassignanygrantpermissionsonthepublicdatabaserole.•Donotenabletheguestaccountonanydatabase.•UseEnterpriseManagerifyouneedtochangetheWindowsuseraccountassociatedwiththeSQLServerservices.EnterpriseMangerwillensurethattheappropriateprivilegesareassignedtothenextaccount. •Uselinkedserversasopposedtoremoteserverswithregardstodistributedqueries.Useloginsforlinkedserversthathaveaminimumofprivilegeswiththeserver.•Disconnectanylinkedserversthatarenolongerneeded.•Monitorfixedserveranddatabaserolestoensurethatmembershipiscontainedtoonlythoseusersandloginsthatneedaccesstothoseroles.•MonitorallstoredproceduressetforAutoStartforanysecurityflaws.•RemoveordenySQLServerloginaccountspromptly,especiallyifaroundoflayoffsisimminent.•MonitortheerrorandsecurityeventlogsandtheSQLServerlogfilesforanyinstancesoferrorsorauditfailures.•UseMicrosoft’sBaselineSecurityAnalyzertoanalyzethesecurityofyourserver.ThisapplicationisafreedownloadfromMicrosoft.ItcanbefoundatthefollowingURL:http://www.microsoft.com/technet/security/tools/mbsahome.mspx.•UseatoollikeLumigentLogExplorertomonitorthetransactionlogsandseewhoisdoingwhatontheserver.MoreinformationonLumigentLogExplorerisavailableatthefollowingURL:http://www.lumigent.com/products/le_sql.html.SQLServerMaintenanceThefollowingbestpracticesarebeneficialwhenitcomestoapplyingservicepacksorhotfixesonthedatabaseserver.•Maintainaseparateidenticaldatabaseenvironmenttotestservicepacksandsecuritypatches.Ifaseparatedatabaseenvironmentisnotfeasible,installanamedinstanceonyourserverandrestoreacopyofyourdatabaseonthenamedinstance.Theninstallthepatchonthenamedinstanceandtestitsimpactonyourdatabaseandapplications.•MonitorthefollowingURL,http://www.microsoft.com/technet/security/prodtech/dbsql/default.mspx,andapplypatchesastheybecomeavailable.SQLServerDevelopmentDeveloperslovetothinkthattheyknowitallwhenitcomestothesecurityoftheirapplications.While,somedevelopersareexcellentatthistask,othersarelesssointhistaskandneedhelp.Inanycase,thefollowingbestpracticesshouldbeemployedbydatabaseandapplicationdevelopersintheorganization. •First,alwaysusestoredproceduresinapplications.StoredproceduresarefasterthanT-SQLstatementsanditmakestheapplicationeasiertoadministerifthereisachangeinhowastoredprocedureneedstoexecute.•DiscouragedynamicSQLcreationinstoredproceduresordirectlyfromapplications.•Useownershipchainingproperly.Makesurethatallobjectshavethesameowner,preferablydbo.•ValidatealluserinputpriortosendingittotheservertopreventSQLinjectionattacks.•Whenappropriate,useviewstoaccesstables.Viewsseparatetheuserfromtheunderlyingdatabaseschema.•UseSSLorIPSectoensureencryptedcommunicationsbetweentheapplicationandthedatabaseserver.ConclusionThesecurityofSQLServerdatabaseservershasbecomeatoppriorityfordatabaseadministrators.Thediscussionofsecurity-relatedbestpracticesinthisarticlerelatesmostlytoanidealizedworld.Intherealworld,itisnecessarytomakecompromisesbetweenwhatyouwantandwhatyoucanprovide.Notallorganizationscanaffordtoimplementallofthebestpracticesoutthere.Furthermore,someofthesebestpracticesmayimpactapplicationperformancetoomuchtobeofmuchbenefit.Throughthoroughresearch,testing,andmodificationtofityourenvironment,thebestpracticeslistedinthispapershouldprovideyouwithabaselineforsecuringyourdatabaseservers.译文保障SQLSERVER2000中安全的最佳做法资料来源:全球知识作者:布雷特汤臣Slammer蠕虫病毒攻击,SQL注入攻击,拒绝服务攻击和暴力攻击;最近一个大新闻就是一个电子商务网站的30万信用卡账户被一个黑客集团所盗。一名公司员工在得知自己会被解雇之后,基于愤怒删除了公司内部的所有可用数据。此类威胁以及其他相同的案件在我们这个社会中时有发生。系统和网络管理员是应对这些黑客攻击的首要操作人员。但是,随着电子商务的发展 ,数据库管理员必须确保他们的数据库服务器的安全性和完整性。本文主要探讨如何采用的最佳做法,以确保微软SQL2000数据库的安全性。本文首先提供了一个SQLServer2000的安全模型,然后提供了几种能够保障SQLSEVER2000数据库安全性的做法。(1)什么是最佳做法以及采取这些做法的原因。最佳做法是技术和技巧,而这些技巧是通过研究、规划和部署,经过时间积累而积累下来的。寻找最佳做法的过程通常需要不断尝试,出现错误再次尝试然后评价其有效性,最后直到成功的过程。如果结果是肯定的,该技术将会被保留下来,并被组织中其他成员利用。如果结果是否定的,这种做法是舍弃,接着做另一种方法的测试。这种替代重复进行,直到达到一个积极的结果。最后,企业留下来一些最佳技术和方法,这些技术和方法能够从整体上提高企业的生产力和效能。最佳做法是绝不局限于IT领域。你会在几乎所有行业的发现最佳做法,从保健、会计到林业。在企业中使用的最佳做法的首要原因是增加你与你的产品的了解程度。其次是避免你重复将时间投入到研究已有经验的测试中去。(2)SQLserver2000安全模型为了首先了解微软SQLServer2000安全最佳做法的作用,对如何实现安全模型有深入了解是非常重要的。SQLServer中的安全性被分成两种类别:数据库安全性和服务器安全性。服务器级别的访问和身份验证安全涉及到服务器以及与安全相关的基于服务器的管理机制。数据库级的安全是关系到数据库服务器上,谁或什么能够访问这些数据库中的对象中。①服务器身份验证为了使用SQLServer,您必须先登录到服务器。为了成功登陆到服务器,你必须通过服务器验证。在SQLServer2000中,有两种身份验证方式可以采用。主要的认证方式有windows认证和SQLserver服务器认证,可能还有混合认证方式。Windows身份验证是使用在SQLServer安装过程中默认的身份验证。这种类型的身份验证要求所有到服务器的连接是有效的Windows用户帐户或组。这个级别的身份验证充分利用了Windows网络安全模型,授权访问服务器的一个额外的好处。此外,Windows身份验证,审计可以跟踪用户的名称和该用户采取何种形式登陆到服务器。这种类型的身份验证方式强烈建议,应该对所有SQLServer数据库服务器认证时采用。使用Windows身份验证登录相关存储在master数据库中的sysxlogins表,因为没有密码信息一起存储在该表与用户或组的名称。 在身份验证,用户凭据传递给底层的验证和认证的操作系统。如果凭据是有效的,用户可以访问该服务器。如果凭据失败,则用户被拒绝访问该服务器。管理员或有足够的权限可以授予,撤销或拒绝访问SQLServer数据库服务器的个人用户或组。用户和组授予访问服务器,而不是在服务器上创建具体帐户。如果一个用户或组的访问被注销,则该用户或组不能访问服务器。但是,如果该用户或组的另一组也有权访问服务器,然后他们将被该组的权限的访问服务器。为了防止任何人,不管谁,访问你的数据库服务器,你必须明确地拒绝他们访问服务器。这样的话即使该用户或组在另一组能够访问服务器上,他们也将无法登录到服务器。您可以使用企业管理器或系统,如sp_grantlogin,sp_revokelogin存储过程或sp_denylogin来配置用户和组的访问。②混合模式身份验证混合模式身份验证同时支持Windows身份验证和SQLServer登录使用。SQLServer登录是存储在每个数据库服务器上,不能用于连接到网络上的其他服务器。这种类型的身份验证提供给SQLServer的早期版本,也可在Windows身份验证不能用于登陆服务器环境的时使用。SQLServer登录,与Windows身份验证登录一样,其登陆信息都存储在主数据库的sysxlogins表。然而,与Windows身份验证登录不一样,SQLServer登录帐户的密码存储在sysxlogins表。这些密码都以一个加密格式存储着,不能被窥视。当混合模式身份验证在服务器上启用时,一个默认的系统管理员帐户也被激活了。此帐户称为“sa”,通常代表了系统管理员。此帐户有数据库服务器上所有地区的所有特权。但是,此账户默认是没有密码设置的。为此账户设一个密码是非常必要的。即使你不打算使用环境中的混合模式身份验证。为SA设置一个密码,能够防止发生安全漏洞,如某些人恶意转变服务器角色。不像Windows身份验证,当谈到控制数据库服务器权限时,你只有两种选择。你可以添加日志,是别人能够有权利登录到数据库服务器,同时你也可以删除日志。这些设置可以配置企业管理器或sp_addlogin和sp_droplogin系统存储过程。(3)服务器角色每个服务器都是固定的角色。你无法修改也无法将自己加入到其中。服务器角色是用于授予特定的权限来执行不同类型的管理任务。下面的列表说明了在SQLServer2000数据库服务器中,不同类型的服务器角色。①大量插入管理员---这个角色可以通过使用BULKINSERT命令执行批量插入操作。②数据库创建者-----此角色可以修改,创建,删除和重命名服务器上的数据库相关联的登录。他们也有能力恢复数据库和事务日志从备份。③磁盘管理员-----登录此角色相关联的添加和删除服务器上转储设备。转储设备是用来存储数据库和事务日志备份。 ①流程管理-----此角色可以终止使用KILL命令到服务器连接相关的登录。②安全管理员-----此相关联的登录名角色可以管理访问服务器。③服务器管理员-----与此角色可以管理服务器范围的设置和配置选项相关的登录。④设置管理员-----登录与此相关的作用,可管理扩展存储过程。此外,任何人在此角色可以访问该对象的任何对象在任何数据库即使用户已被明确拒绝的权限。根据预设,SQLServer的本地管理员联系与此服务器角色组。如有必要,您可以重新设定这个角色的权限或拒绝的SQLServer访问到该小组。此外,如果混合模式身份验证一旦启用,那么sa帐户就被授予访问这个角色。如果需要的话,此设置可以修改。(4)数据库用户数据库用户的帐户是为每一个数据库服务器和允许访问的对象(如表,视图和存储过程)在每个数据库中创建的。在创建访问服务器登录帐户时,这些数据库的用户帐户是不一样的。一旦用户成功认证登录到服务器他们没有默认访问服务器上的数据库的权限。为了访问服务器上的一个特定的数据库,数据库用户必须在数据库中创建权限并分配给登录帐户。只有这样才能登录到数据库服务器。所谓特殊的用户帐户称作客户账户,可以添加到数据库。此类账户无法在数据库被创建时被默认添加。使用此帐户是被所有的数据库登录时使用而非为特定的账户。因此,它们构成了安全风险,不应使用。用户可以创建数据库,并通过企业管理器或通过像sp_grantdbaccess和sp_revokedbaccessT-SQL语句删除。对使用企业管理器的一个好处是,它很容易让管理员创建服务器登录并将它们分配给在同一进程中的数据库。(5)数据库角色有几个数据库角色是来预先设定一个新的数据库时创建。下面的列表说明了固定数据库角色和权限的新的相关数据库。①db_accessadmin-在这个角色的用户可以控制对数据库的访问。②db_backupoperator-在这个角色的用户可以对数据库执行备份和备份相关手续,但不能恢复数据库。③db_datareader-在这个角色的用户可以读取数据库中的任何对象的数据。④db_datawriter-在这个角色的用户可以创建,修改和删除数据库中的任何对象的数据。⑤db_ddladmin-用户可以在这个角色的创建,更改和删除对象在数据库中。⑥db_denydatareader-在这个角色的用户无法读取数据库中的任何数据。⑦db_denydatawriter- 在这个角色的用户无法创建,修改或删除数据库中的数据。⑧db_owner的-在这个角色的用户被认为是数据库所有者。因此,他们必须有数据库中所有对象的权限。但是,任何拒绝权限的对象将不会被覆盖数据库角色的成员。⑨db_securityadmin-角色的用户可以在这同一个数据库对象的权限管理的其他数据库的用户和角色研究。⑩public-这是一个用户角色包罗万象的数据库角色的用户,对于所有数据库的数据库。权限应该永远不会被直接应用到这个角色,因为这些会影响每个使用数据库的用户。除了这些固定数据库角色,用户定义的数据库角色可以创建他们自己在数据库中设置对象的权限。此外,这些用户定义的角色可以被添加到数据库中的任何角色的,固定的数据库。还有第三种类型的数据库角色可以在SQL2000服务器调用应用程序角色。这个角色类型是通过有效账户,帐户登录和使用的用户的数据库应用程序连接到SQLServer的。在连接到数据库,应用程序激活应用程序角色和转让作为一个结果身份这一损失对数据库操作的审计对象的认同。(6)最佳安全性做法下面一节概述的最佳做法,当你在SQLServer2000服务器。本节从以下几个方面来概述:物理设备,操作系统(OS),网络,SQLServer安装,SQLServer配置,SQLServer管理,SQLServer维护和SQL服务器的开发。(1)物理设备最低级别的可以利用的安全性,一个是在服务器处理元素周围的物质。最佳安全性做法在物理层的做法包括:最重要的是你可以在你的组织中做的到服务器的隔离和安全组织。没有人愿意承认,企业中数据消失是因为有人绊倒了电源线从而损坏了硬盘驱动器。数据库服务器应该像所有的服务器一样保存在一个可控制安全的空间与灭火设备能够使用的环境中。进入这个房间的人只应考虑在组织中几个特定的值得信赖的个人。所有进入这个房间的人应该进行必要的钥匙认证系统等进行认证才可进入。(2)操作系统下一个区域集中注意力的是操作系统。使用NTFS。NTFS将提供更有效的磁盘和更好的安全服务器上对文件和目录的选项。如果数据库中的数据对组织是非常重要,启用NTFS的EFS相处。英法西将启用文件将你的数据库文件加密。请记住,加密和解密是由服务器执行的服务帐户下运行的SQL。如果你需要切换的服务帐户,您必须先使用旧帐户的解密文件,使用,然后用新账户加密它们。 如果在你的数据库服务器上有必要的文件共享,这些应为只读共享。重命名本地管理员帐户。这使得它更难破解系统。为所有账户启用安全审核。在服务器上安装病毒防护软件。不包括您的数据文件夹的病毒扫描。此外,让您的病毒库定义更新。创建域组和用户分配到这些域组。创建本地组,并指定域组添加到这些本地组。然后授予权限登录到这些地方团体。禁用服务器上的所有不必要的服务。(3)网络应用这些做法,你的网络设备将有助于确保您的数据库服务器不能被外部网络访问。使用防火墙,以防止外部位置访问到数据库服务器。禁用TCP端口1433和UDP端口1434上所有的防火墙。(4)SQLServer安装下面的步骤将有助于在SQLServer2000的安装过程。安装SQLServer2000在自己的服务器从任何中间层或Web服务器上不同。确保数据库服务器不提供其他服务的网络,如域控制器,或文件/打印服务器。创建服务器单独的Windows2000服务帐户作为SQL用户可以用最低权限的帐户使用。SQLServer2000的安装将确保必要的权限被应用到这些帐户。始终安装最新的ServicePack和安全补丁。如果可能的话,配置安装使用Windows身份验证模式。如果混合模式身份验证是必需的,为sa帐户配置复杂的密码。(5)SQLServer配置配置SQLServer数据库服务器正常工作可以是一个尝试。以下最佳做法可以帮助减轻有一个开放的系统的某些危险。删除或存档旧的安装文件,sqlstp.log,sqlsp.og,和Setup.iss。这些文件可能包含明文或加密凭据。你可以在这些文件放在程序文件MicrosoftSQLServer的的MSSQLInstall文件夹中。sa帐户为所有SQLServer登录指定强密码,特别是如果没有提供在安装期间,即使服务器设置为使用Windows身份验证也要这样做。启用SQLServer登录审核。您可以配置此服务器上的安全选项卡下的属性设置窗口。确定的工作水平失败,因为最低限度,或审计一切为了增强安全性。从生产服务器中删除所有的样本数据库。示例数据库pubs和Northwind。这些数据库包含guest用户帐户,黑客可以利用SQL 注入和获得自身服务器上的数据或更糟的是,获得对服务器的访问。对于任何命名实例分配静态端口安装在服务器上。确保你的防火墙上禁用这些端口。(6)SQLServer管理以下最佳实践应用可以帮助数据库管理员管理数据库服务器的安全。知道SQLServer内外安全模型。指定登录(服务器上的本地组),酌情固定服务器角色。定期备份您的数据和事务日志文件。存储这些备份在一个安全的位置,最好是场外。测试您的灾难恢复计划,然后再对其进行测试。限制会员在系统管理员固定服务器角色。尽量不要使用跨数据库所有权链接。如果你必须这样做,然后确保所涉及的数据库作为一个单元进行部署。拒绝执行xp_cmdshell的权限对所有用户在系统管理员比固定服务器角色的除外。从服务器中删除了BUILTINAdministrators登录帐户。如果数据库包含关键信息数据,如工资,考虑加密数据使用第三方或定制的加密工具。在服务器上启用SSL,以确保加密连接到服务器。您需要从一个CA证书,证明自己的权威,如VeriSign,Thawte,或你的CA。通过指定数据库用户角色和应用的角色权限,简化权限。不在公共数据库角色授予任何权限。不启用Guest帐户上的任何数据库。使用企业管理器如果您需要更改Windows用户帐户相关联的服务与SQL服务器。企业管理器将确保适当的权限分配给下一个帐户。使用链接的服务器,而不是服务器与问候远程分布式查询。使用服务器的登录与链接服务器的权限有一个最低限度。断开所有不再需要连接的服务器。监视器固定服务器和数据库角色的成员,以确保只包含那些用户和登录需要访问这些角色;监视所有存储过程设置为自动启动的任何安全漏洞。删除或否认SQLServer登录帐户迅速,特别是如果一轮的裁员迫在眉睫。监视错误和安全事件日志和SQLServer的错误或审计失败的任何实例的日志文件。使用微软基准安全分析器来分析您的服务器的安全。此应用程序是从微软免费下载。(7)SQLServer维护 以下最佳做法是有益的,当谈到应用服务包或数据库服务器上的热修复程序。维护一个单独的数据库环境,以相同的测试服务包和安全补丁。如果一个单独的数据库环境中是不可行的,安装你的服务器的命名实例和恢复数据库实例命名的副本。然后安装命名实例上的补丁,并测试其影响你的数据库和应用。下载有用的应用补丁。(8)SQLServer的发展当开发人员谈到自己的应用程序的安全时,认为他们知道这一切,。在任何情况下,下列最佳做法应该是在企业中数据库和应用程序开发者所使用。首先,在应用程序中经常使用存储过程。存储过程是快于T-SQL语句,它使应用程序更易于管理,如果有一个变化,如何执行一个存储过程需要。不鼓励动态的SQL在存储过程中创建或直接从应用程序中创建。正确使用所有权链接。确保所有对象都具有相同的所有者,最好DBO的。验证所有用户输入之前将其发送到服务器,以防止SQL注入攻击。在适当的时候,使用视图来访问表。它是分开的基础数据库模式用户。使用SSL或IPSec来确保在应用程序和数据库服务器的加密通信。(9)结论SQLServer数据库服务器的安全性已成为数据库管理员的首要任务。在与安全有关的最佳做法,这篇文章主要讨论谈到的是一个理想的世界。在现实世界中,有必要把自己同你想要的,你能提供什么方法,并不是所有的企业都能将以上最佳安全性方法及配置实现。

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
关闭