UNIX SECURITYdoc.docx

上传人:b****8 文档编号:30549992 上传时间:2023-08-16 格式:DOCX 页数:22 大小:26.30KB
下载 相关 举报
UNIX SECURITYdoc.docx_第1页
第1页 / 共22页
UNIX SECURITYdoc.docx_第2页
第2页 / 共22页
UNIX SECURITYdoc.docx_第3页
第3页 / 共22页
UNIX SECURITYdoc.docx_第4页
第4页 / 共22页
UNIX SECURITYdoc.docx_第5页
第5页 / 共22页
点击查看更多>>
下载资源
资源描述

UNIX SECURITYdoc.docx

《UNIX SECURITYdoc.docx》由会员分享,可在线阅读,更多相关《UNIX SECURITYdoc.docx(22页珍藏版)》请在冰豆网上搜索。

UNIX SECURITYdoc.docx

UNIXSECURITYdoc

UNIXSECURITY

UNIXhastakentheindustrybystorminrecentyears.UNIX’spopularityisaresultofitsabilitytoprovideatruemultiprocessing,multitaskingoperatingenvironmentfortoday’sapplications.Inaddition,UNIXisascaleableoperatingsystemworkingonamainframethroughapersonalcomputer.ThisscalabilityhasandwillaccruefurtherselectionsofUNIXforfutureapplicationsintheClient/Serverenvironment.Finally,UNIXrunsextremelywellontheRISCtechnologyoftoday.ReducedInstructionSetComputing(RISC)currentlysupportssymmetricalprocessingandreducedinstructioncode.UNIXisoneofthefewoperatingsystemsthattakesadvantageofthistechnology.GivenallofthesereasonsandthatorganizationsaretryingtodownsizetotakeadvantageofthepowerofsmallercomputersandtheresultisthegrowthinUNIX.

UNIXforallit’sgoodpointsstillisanoperatingsystemthatneedssecurity.Forthatreasonthisarticleaddressestenrisksareasthatrequirereview.

WeneedtoreviewacoupleofrulesaboutUNIX.FirstUNIXiscasesensitive.Allcommandsareinlowercasewhereasfilesanddirectoriescouldbeupperorloweroracombinationofboth.Second,UNIXisahierarchicalfilesystem.Thetopdirectoryistherootdirectoryandtheslash/leansforwardwithinUNIX.Sotherootdirectoryissimplyaforward”/”.Undertherootdirectorythereareseveralsystemsubdirectories.Theseincludethefollowing:

/binThisdirectoryhasallthesystemcommandswithinUNIX

/usrThisdirectoryhasalltheuseraccountsspecificallytheirhomedirectories

/tmpThisdirectoryisusedtosortfilesandcompileprogramstemporarily

/devThisdirectoryisusedtodefineallthedevicesthatwillbeattachedtotheUNIXmachine

/etcThisdirectoryisusedtodefinemanyfilesthatrelatetosecurityandcontrol

InordertoauditorsecureUNIXthereviewerwillneedtolearnfiveUNIXcommands.Theyareasfollows:

lsThelscommandwilllistadirectoryorfileandprovidealistofsecuritypermissions

catThecatcommandwilllistthecontentsofafile

whoThewhocommandwilllistthecontentsofabinarylogfile

findThefindcommandwillsearchforusers,permissions,andfilesandlistthemoutforreview

grepThegrepcommandwillscanafilewithapatternsearch

Thiscommandsandfilesaredelineatedwithinthisarticlewhenappropriate.Nowletslookatthevariousriskcategories.

1.AdministrationRisk

WithintheUNIXenvironmenttheadministrationofthesystemconfigurationandthesecurityconfigurationareparamount.WithUNIXaknowledgeableadministratorismandatorytomaintainaneffectiveandsecuredenvironment.Thiscanbeaccomplishedtwoways.FirsteachUNIXmachineisassignedaUNIXadministrator.ThesecondwouldbetosetupaUNIXsupportgroupthatisresponsiblefortheactualoperatingconfigurationandsecurityandcontrolofeachmachine.Itshouldbeobviousthatthesecondapproachprovidesthebestbenefitstotheorganization.ThefirstapproachresultsinoneindividualwhoisresponsibleforallUNIXsystemactivityincludingconfiguration,security,changecontrol,violationreportingreviews,andqualityassurance.

Successfulimplementationofapproachnumbertwowouldallowtheorganizationtomaximizethetalentofacentralpoolwhiledecreasingthetrainingandproblemresolutioncoststhataccompanyadistributedimplementation.Inaddition,changecontrol,security,andtheotherresponsibilitiesmentionedabovecouldbeseparatedwithinthegroupandreviewedbycompetentpersonnel.Theusergroupwouldstillberesponsiblefortheapplicationlayersecuritybutalloftheoperatingsystemconfigurationparameterswouldresidewiththecentralgroup.Additionaldynamicsecuritycontrolscouldbeinstalledoneachmachinetocertifythatthesecurityandcontrolfeaturesinstalledhavenotbeenalteredonceinthefield.WiththepowerofthenetworkstodayincludingthenetworkmanagementagentssuchasSimpleNetworkManagementProtocol(SNMP)whichrunsundertheUNIXprotocolofTransmissionControlProtocol/InternetProtocol(TCP/IP)onecoulddesignaneffectivemonitoringsystemformanyUNIXinstallationsthroughouttheorganization.

Auditing,Security,andSystemAdministrationshouldworktogethertosetupthedynamiccontrolsbaseontherisksdefinedwithinthisarticle.However,auditingandsecuritystillmustperformperiodicauditsandreviewstoensurethatthespecificsystemissecurityandthatthedynamicroutinesarestilloperatingeffectively.

FinallyitisimportanttonotethatmostUNIXenvironmentsdonotallowfortheseparationofsystemadministrationversessecurityadministration.Thisfactallowsshouldbeaddressedbypurchasingathirdpartyproductthatdividesthefunctionoftheallencompassingsystemadministrationauthority.ThisauthoritywithintheUNIXenvironmentiscallroot.Rootisauserwhohasauserid(uid)isequalto“0”.Severalproductsareonthemarkettoprovidethisseparation.Onesuchproductis“Wizdom”fromTivoliSystem’sInc.ofAustinTexas.

2.AuthenticationRisk

AlluserswithintheUNIXenvironmentmustbeestablishedwithinthe/etcdirectoryinafilecalledpasswd.Thefullpathdefinitionwouldbe/etc/passwd.Thepasswdfilehasatleastoneentryforeachuser.

Toobtainalistingofthepasswdfileyoucanissuethefollowingcommands:

$cd/etc/passwdThiscommandpointsyoutotheUNIXpasswdfilewithintheetcdirectory

$catpasswdThiscommandlistoutthecontentsofthepasswdfile.

Eachentryinthepasswdfilelookslikethefollowing:

root:

fi3sed95ibgr6:

0:

1:

SystemAdministrator:

/:

/bin/sh

Letsbreakeachparameter,whichareseparatedbycolons,ofthisentry

root=username

password=theencryptedpasswordstringforthisaccount

0=theuid

1=thegidtheprimarygrouptowhichthisuserbelongs

SystemAdministrator=accountinformation/description

/=thedirectorywherethisuserwillbeplacedaftersigningontothesystem

/bin/sh=theprogramthatwillbeexecutedaftertheuserissignedontothesystem

FromasecuritypointofviewthisisnotasecuredversionofUNIXasthesecondparameter,theencryptedpasswordstring,isreadablebyeveryone.ThisistruewithinUNIXasthepermissionlevelsonthepasswdfilehavetobereadforeveryonesotheycansignontothesystem.Thiswouldallowausertocopyoffthepasswordfileandtrytohackitbyguessingauser’spasswordandcomparingtheirencryptedversiontotheactualencryptedversioninthepasswdfile.InordertoeliminatethisexposuretheUNIXsystemshouldbeconvertedtoaC2implementationthatremovestheencryptedpasswordstringfromtheprimarypasswdfileandplacesitinasecondaryfilealsocalledashadoworsecurityfile.Byplacingtheencryptedpasswordstringinasecondaryfile,nobodyonthesystemexceptforrootcanreadthefile.

Secondly,mostusershouldnotstartoffusingaprogramcalled/bin/sh.Thisprogramiscalledashellprogramandisreallytheuser’ssysteminterfaceprogram.ThisprogramprovidestheuserwiththecapabilitytoexecuteUNIXcommands.UNIXhashundredsofcommandswithmanyoptions.ItissaferfromasecuritystandpointtoplacetheuserrightintoanapplicationsystemsotheydonotrealizethattheyareonaUNIXsystem.Tothemitlookslikeanormalapplication.SinceUNIXisdifficulttosecureitmakesitmucheasierifmostoftheuserscannotnavigateusingUNIXcommands.

Theentryinthepasswordfilewithbothoftheseoptionforauserfrankwouldlooklike:

frank:

*:

22:

35:

localuser:

/usr/frank:

/lib/pay:

Theuserisfrank

The*indicatesthatthepasswdfilehasashadoworC2implementation

Theuidis22

Thegidis35

Thedescriptionislocaluser

Thestartupdirectoryis/usr/frank

Thestartupprogramisinthelibdirectoryandisthepayprogramthatwillstartanapplicationmenu

Therearedifferenttypesofshellprograms.Youhavetheoptiononyoursystemstousetheonebestsuitedforyourenvironment.Thetypeofshellprogramsare:

sh=Bourneshell

csh=Cshell

ksh=Kornshell

rsh=Restrictedshell

tsh=Trustedshell

AllofthesedoallowausertointerfacewithUNIXandissuecommands.

Inreviewthen,itisimportanttoensurethatallaccountshaveapassword.Thatthepasswordisstoredinashadowfilethatisreadableonlybyroot.Thatallpasswordsareconstructedwithrulesthatforcesomealphaandnumericcharactersandthatthelengthissufficient.Usersthatdonotneedtouseoperatingsystemcommandsshouldbeplaceddirectlyintoanapplicationmenutoreducetheleveloftraininganderrorsandtohelpsecuretheoverallenvironment.

3.FileLevelPermissionsRisk

UNIXtreatseverythingasafile.Thismeansthatadirectoryisafile,aterminalisafile,adiskisafile,andafileisofcourseafile.WhenafileiscreatedinUNIXaheaderfilecalledaninodeiscreated.Theinodehasmanyentriesofvaluebothfromanoperationalandsecurityaspect.Theinodeisthefileidentifier.Itcontentsareasfollows:

inodenumber

filetype

accessrights

numberofreferencestoafileorifadirectorythenumberofsubdirectories

ownerofthefile

groupthathasaccess

lengthinbytes

pointerstotheactualdatablocks

timeoflastaccess

timeoflastmodification

timeofcreation

filename

Whenyouzeroouttheinodenumberyouhaveeffectivelyremovedanypointerstothephysicaldata.

Thewaythatyoucanidentifyfiletypesisbytheleadingcharacterofthefilelisting.Afilelistingoftheinodeinformationisobtainedbyenteringthefollowingcommand:

#ls-l

Thisisthelistcommandandtheresultsofthecommandlooklikethefollowing:

-r

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 中考

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1