资源预览内容
第1页 / 共144页
第2页 / 共144页
第3页 / 共144页
第4页 / 共144页
第5页 / 共144页
第6页 / 共144页
第7页 / 共144页
第8页 / 共144页
第9页 / 共144页
第10页 / 共144页
亲,该文档总共144页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
MoreInternettechnologiesandtheirapplications(含憑證與電子簽章介紹)蔡文能tsaiwncsie.nctu.edu.tw1AgendaIntroduction to Internet TechnologyWeb (WWW)XML, XULPKI與憑證簡介(主要介紹自然人憑證)J2EEIntroduction to Network SecurityAuthenticationRSA Public Key AlgorithmX.509 Certificates and their applications2Internet的起源與發展1962 ARPAcomputerprogrambegins1965Firstactualnetworkexperiment,LincolnLabs(nowpartofMIT)1966ARPApacket-switchingexperimentation1969FirstArpanetnodesoperational1972Distributede-mailinvented1973Fornon-U.S.computerlinkedtoARPAnet1975ArpanettransitionedtoDefensecommunicationsAgency1977E-mail takes off, Internet becomes a reality, Number of hosts breaks 100. 1978/2 first real BBS, the Board in Chicago 1980TCP/IPexperimentationbegins1981Newhostaddedevery20days3Internet的起源與發展(Cont.)1983TCP/IPswitchovercomplete1984Number of hosts breaks 1,000. 1986NFSnetbackbonecreated1987Number of hosts breaks 30,000.1989Number of hosts breaks 100,0001990Arpanetretired1990300,000 Hosts. 1,000 News groups 1991Gopherintroduced,U of Minnesota.1991WWW invented1992Hosts 1 Million. News groups 4,000 1993Mosaicintroduced(第一個圖形式瀏覽器)1993 Hosts 2 Million. 600 WWW sites4Internet的起源與發展(Cont.2)1995Internetbackboneprivatized1995/May Java formally announced by Sun Microsystems (JacaScript by Netscape) 19956.5 Million Hosts, 100,000 WWW Sites1996OC-3(155Mbps)backbonebuilt1996Internet21996NextGenerationInternet(NGI)199720 Million Hosts, 1 Million WWW sites, 71,618 Newsgroups.1999Dot-com Frenzy. 2000 Dot-com Crash. 123 Million Hosts, 8.5 Million WWW sites5www.Yahoo.com雅虎股價61968年於台灣台北出生十歲的時候移民加州聖荷西市四年內完成史丹佛大學及碩士課程史丹福大學攻讀CAD博士學位1994年與DavidFilo創立Yahoowww.Yahoo.com雅虎(by楊致遠)7TANetHistory,Hinet1989/9教育部召集各校研商建立教育部與各大學之整合性高速學術網路,計畫以二年時間協助各國立大學建立校園網路。1990年2月此網路命名為台灣學術網路(TaiwanAcademicNetwork,簡稱TANet)。1990年年7月月 TANet 正式啟用。正式啟用。1991/12 TANet 用用64Kbps與美國普林斯頓大學與美國普林斯頓大學 JvNCnet 連接。連接。1994/4/1 交通部電信局交通部電信局Hinet免費讓民眾試用一年免費讓民眾試用一年, 第一年只有發出第一年只有發出三千個帳號,三千個帳號, 免費的大家不喜歡用免費的大家不喜歡用。1994/8行政院成立國家資訊通信基本建設專案推動小組,推動NII計畫。(NationalInformationInfrastructureproject)。行政院院長連戰指示三年內要台灣連戰指示三年內要台灣 Internet 人口達到人口達到300萬人萬人。1994/10TANet 連美國頻寬提升至連美國頻寬提升至512 Kbps。1995/4Hinet用戶突破百萬。1995/10將連美國頻寬提升至T1(1.544Mbps),1996/5提昇至2條T1,並將進入美國之連接點由東岸JvNCnet移至西岸之GLOBAL-ONE。1998/11TANet擴充國際電路頻寬為T3(45Mbps)。1998/10教育部推動擴大內需計畫,推動全國中小學ADSL連線。1998/12 台灣台灣 Internet 人口正式突破人口正式突破300萬人。萬人。 1999/12完成全國中小學ADSL連線及四個縣市區網中心。8TANetHistory,Hinet(cont.)2000年02月,國內骨幹之區域網路中心對外頻寬為120Mbps(ATM),縣市教育網路中心對外頻寬為45Mbps。2000/11Hinet用戶達二百萬。2000/12我國網際網路用戶數達626萬人。2001/3我國網際網路用戶數達674萬人:TANet上網的用戶數有246萬,透過電話撥接上網用戶528萬,專線用戶數為1.7萬,ADSL用戶數為22萬,CableModem用戶數達14萬,ISDN用戶數為1.5萬,衛星用戶數為3000戶;上述用戶經過加值運算、扣除一人多帳號等重複值後,計算出我國網際網路用戶數達674萬。2001年10月,國際海纜原T3*2提升頻寬至STM1*2(310Mbps)。2001/12我國網際網路用戶數達782萬。2002/1/24 中華電信中華電信 ADSL用戶突破用戶突破100萬,萬, 且持續快速成長。且持續快速成長。2002/6我國網際網路用戶數突破突破 800萬。2002/8 中華電信中華電信 ADSL用戶達用戶達150萬。萬。2003/8 中華電信中華電信 ADSL用戶達用戶達230萬,且持續快速成長。萬,且持續快速成長。9TANet國際頻寬現況TANet國際專線目前有四四路STM1(每路頻寬頻寬155Mbps)直達美國,由教育部電算中心、國家高速網路與計算中心(NCHC)及中央研究院共同出資向台灣固網公司承租。目前這四條四條電路的頻寬頻寬分配情形如下:第1、2路:教育部教育部(155MbpsX2)美國第3路:國家高速網路與計算中心155Mbps美國第4路:教育部教育部(70Mbps)+國家高速網路與計算中心(25Mbps)+中研院(60Mbps)美國因此,教育部教育部提供各級學校共用的頻寬頻寬合計達380Mbps,為使資源作最佳利用,這380Mbps的頻寬頻寬又劃分為:圖書館專用頻寬頻寬20Mbps(例如電子期刊)快速網段頻寬頻寬280Mbps(Proxy、DNS等專用)一般使用者80Mbps(未設Proxy之一般用戶)民國10TheWorldWideWeb(WWW)The Year1988John Walker, founder of Autodesk, acquires Nelsons technology and sinks $5 million into its development.However, he is beaten to the race in 1989 by Tim Berners-Lee a physicist at CERN (European Particle Physics Laboratory) who proposed a global hypertext system that he named “WorldWideWeb.”Berners-Lee specifically invented three things:HyperText Transfer Protocol (HTTP) a standard format for enabling all computers to look up documents.Universal Resource Locator (URL) a standard for finding a document by typing in an address like http:/www.webonomics.com/book.htmlHyperText Markup Language (HTML) a standard design for word processor-like functions that enables people to add special codes to text.The Year1991Berners-Lee makes his trio of programs available on the Internet.Leads to a rapid growth in the number of web sites.11WWW發明人TimBerners-Lee Berners-Lee has software in his blood. Both his parents were programmers who worked for the British company Ferranti on one of the first commercial computers. He read physics at Queens College, Oxford, where he built his first computer with a soldering iron, a microprocessor chip and an old television set. Graduating in 1976, he worked first for Plessey and later for a firm writing typesetting software. 121993:MosaicwasbornOneoftheseprogrammerswasMarcAndreessen,whowasworkingfortheNCSAinUrbana-Champaign,Illinois.InJanuary1993,Andreessenreleasedaversionofhisnew,handsome,point-and-clickgraphicalbrowserfortheWeb,designedtorunonUnixmachines.InAugust,Andreessenandhisco-workersatthecenterreleasedfreeversionsforMacintoshandWindows. 13MosiacCommunications(Netscape)December1993AndreerssonleftNCSAandfoundedMosiacCommunications,nowcalledNetscape.ManyofthekeydevelopersfromNCSAwentwithhimtoworkonanewbrowser.December1995Microsoft宣佈全力投入InternetMicrosoftInternetExplorer(IE)MicrosoftInternetInformationServices(IIS)TheApacheHTTPServerProject14InternetTechnologySpeed / CapacityFirewallUserDBSecurityDWCRMODBCRemote AccessMonitoringData / LegacySystemsSecurityStatistics15MooresLawvs.GildersLaw摩爾定律(摩爾定律(Moores Law),),英特爾英特爾(Intel)創辦人創辦人Gordon Moore提出的,提出的,根據這條定律電子晶片(根據這條定律電子晶片(chips)處理訊處理訊息的能力每隔十八個月就增加一倍。息的能力每隔十八個月就增加一倍。吉爾德定律(吉爾德定律(Gilders Law),),指通指通訊系統的頻寬每十二個月便增加兩倍。訊系統的頻寬每十二個月便增加兩倍。n莫非定律 - Murphys Law ? 170.010.1110100100010000198619881990199219941996Performance in Mflop/sMicro PSuper C 808780287688180387R2000i860RS6000/540AlphaRS6000/590AlphaCray 1SCray X-MPCray 2Cray Y-MPCray C90Cray T901998 Moores Law vs. Gilders Law : The Last Twenty Years19821984Speed in MbpsEthernetEthernetStorageStorage in MB802.11Source: Gordon Bell, Microsoft ResearchSource: Gordon Bell, Microsoft Research180.1110100100010000100000200420062008201020122014Performance in Gflop/sMicroprocessor performance2016The Next Twenty Years20002002Speed in GbpsWired EthernetStorageStorage in GB802.1119By 2009AlmosteverythingwillbeconnectedtotheInternetAppliances,automobiles,personalcommunicators,screens(largeandsmall),evenyourwatch.3billionInternet-capablewirelessdevicesTheInternetwillbe:Telephone,answeringmachine,television,radio,movietheatre,clock,store,cellphone,pager,postoffice,mailbox,library,securitysystem,gamingplatform,musicalinstrument,learningcenter,storagemedium,andmuch,muchmore!20XMLis.aneXtensibleMarkupLanguage.HTML presentation tags+your-own-tags.ameta-languagefordefiningotherlanguages.asemistructureddatamodel.notadatamodelbutjustanexchangesyntaxtheASCIIoftheWeb.manygood(andsomebad)ComputerScienceideasreinvented(butnowforthemasses!).goodoldconstantchange(nottheXMLspec.,buteverythingelse)21SomeHistory(or:fromfatvialeanSGML(StandardGeneralizedMarkupLanguage)ISOStandard,1986,fordatastorage&exchangeMetalanguagefordefininglanguages(throughDTDs)AfamousSGMLlanguage:HTML!SeparationofcontentanddisplayUsedinU.S.gvt.&contractors,largemanufacturingcompanies,technicalinfo.Publishers,.SGMLreferenceis600pageslongXML(eXtensibleMarkupLanguage)W3C(WorldWideWebConsortium)-http:/www.w3.org/XML/recommendationin1998Simplesubset(80/20rule)ofSGML:“ASCIIoftheWeb”,“SemanticWeb”XMLspecificationis26pageslong22HTMLvs.XML Bibliography Foundations of DBs, Abiteboul, Hull, Vianu Addison-Wesley, 1995 Logics for DBs and ISs , Chomicki, Saake, eds. Kluwer, 1998 Foundations of DBs Abiteboul Hull Vianu Addison-Wesley . . Chomicki . . HTML tags: presentation, generic document structure XML tags: content, semantic, (DTD-) specific 23XMLvsSGMLorigins:HTML+SGML(ISOStandard,1986,600pp)W3Cstandard(26pp):XMLsyntax+DTDsXML=HTML presentationaltags+user-definedDTD(tags+nesting)=reallyametalanguagefordefiningotherlanguagesviaDTDs=XMLismorelikeSGMLthanHTMLXML=SGML complexity,documentperspective+simplicity,dataexchangeperspective24XMLasaSelf-DescribingDataExchangeFormatcanbeeasily“understood”byourfriend(.evenusingCP/M&edlin)canbeparsedeasilycontainsitsownstructure(=parsetree)inthedata=allowstheapplicationprogrammertorediscoverschemaandcontent/semantics(towhichextent?)mayincludeanexplicitschemadescription(e.g.,DTD)=meta-language:definitionofalanguagew.r.t.whichitisvalidallowsseparationofmarked-upcontentfrompresentation(=stylesheets)manytools(andmanymoretocome-(re)usecode):parsers,validators,querylanguages,storage,standards(goodforinteroperation,integration,etc):=genericstandards(XML,DTDs,XMLSchema,XPath,.)=community/industrystandards(=specificmarkuplanguages)25DifferentPerspectivesonXMLDocument(SGML)Communitydata=lineartextdocumentsmarkup(annotate)textpiecestodescribecontext,structure,semanticsofthemarkedtextDatabaseCommunityXMLasa(mostprominent)exampleofthesemistructureddatamodel=capturesthewholespectrumfromhighlystructured,regulardatatounstructureddata(relational,object-oriented,HTML,markeduptext,.)26XMLApplications&IndustryInitiativeshttp:/www.oasis-open.org/cover/xml.html#applicationsAdvertising:adXMLplace an ad onto an ad network or to a single vendorLiterature:Gutenbergconvert the worlds great literature into XMLDirectories:dirXMLNovells Directory Services Markup Language (DSML)WebServers: apacheXML parsers, XSL, web publishingTravel: openTravel information for airlines, hotels, and car rental placesNews: NewsML creation, transfer and delivery of newsHumanResources: XML-HR standardization of HR/electronic recruiting XML definitionsInternationalDvt: IDML improve the mgt. and exchange of info. for sustainable developmentVoice: VoxML markup language for voice applicationsWireless: WAP (Wireless Application Protocol) wireless devices on the World Wide WebWeather: OMF Weather Observation Markup Format (simulation) Geospatial: ANZMETA distributed national directory for land informationBanking: MBA Mortgage Bankers Association of America - credit report, loan file, underwritingHealthcare: HL7 DTDs for prescriptions, policies & procedures, clinical trialsMath: MathML (Mathematical Markup Language)Surveys: DDI (Data Documentation Initiative) “codebooks” in the social and behavioral sciences27Elements and their Contentelement typecharacter contentelementemptyelement Y.Papakonstantinou S. Abiteboul H. Garcia-Molina Object Fusion in Mediator Systems VLDB 96 element content28WhatisXUL?XML-basedUserinterfaceLanguage(“zool”)AnXMLgrammartoadd/modifyUIwidgetsofthebrowserMakesUIbuildingeasierandfasterUsesW3Cstandards:HTML,XML,CSS,DOMXPToolkitisthefinitesetofinterface-specificelementscreatedinXULXPFE(crossPlatformFrontEnd)isthefrontendcreatedfromXPToolkitXULprovidesflexibilityandeaseofuseCross-platformUIeasilyPowerenoughtobuildapplicationUIReady-madewidgetsProgramming in Programming in FacebookFacebook ? ?29XULWidget&SyntaxWidget:Window,box,menu,button,tabbox,checkbox,Syntax&Rules:XULiscasesensitive:alleventsandattributemustbewritteninlowercaseAllstringsmustbedoublequotedAllattributesmusthaveavalueXULfileextension:.xulProgramming in Programming in FacebookFacebook ? ?30InsideXULpackageMaincomponentsContent:XULfilesdescribesXMLdescriptionofUIAppearance:CSS,images,andotherscontrolpresentationBehavior:JavaScriptdefineseventhandlingwithinwidgetsLocale:AlllocalizablestringsinexternalDTD31XULandJavaScriptXULinterfaceisacollectionofdisconnectedwidgetsuntilprogrammedUsingJavaScriptand/orC+JavaScriptincludedinXULoraseparatefilefunctionInitWindow()varcheckbox=document.getElementByID(remember);if(checkbox)checkbox.checked=true;32何謂自然人憑證自然人憑證是可以在網路上作資料交換時,如同網路身分證辨識雙方身分。憑證包含了數位簽章跟公開金鑰。這個公開金鑰是智慧型的IC卡自己演算出來的一組金鑰對中的一半,另一半稱為私密金鑰,則永遠儲存在IC晶片當中。經由憑證使用人和憑證管理中心約定,日後用這憑證,身分就可以辨認,啟用了加解密的功能,不管你在網路上傳什麼資料,資料都被加密,駭客攔截了資料也無法輕易的解開。33自然人憑證34我國之政府公開金鑰基礎建設(GovernmentPublicKeyInfrastructure,GPKI)35自然人申辦服務流程步驟一請於預約申辦服務畫面點選申辦註冊選項。步驟二請輸入申請人基本聯絡資料及密碼,完成登錄註冊。步驟三完成登錄註冊後,請點選申辦預約選項,輸入身分證資料及密碼,選擇欲預約申辦之戶政事務所與時間。步驟四於預約申辦當日,請申請人攜帶本人國民身分證,依預約申辦時間與地點,親臨戶政事務所申辦自然人憑證。自然人憑證自然人憑證IC卡有效期限為五年卡有效期限為五年(申請當天起算申請當天起算)。36! 步驟一:步驟二: 步驟三:步驟四:下載下載作業軟體下載說明(安裝前請先關閉所有瀏覽器視窗)並安裝執行gcaee4.exe安裝說明進入憑證申請作業製作私密金鑰磁片(第一片)及憑證申請磁片(第二片)(採線上申請者,請跳過此步驟。例如使用HiNet個人帳號申請憑證者,請跳至步驟四)臨櫃申請:請攜帶身分證憑證資料磁片(第二片)親自前往服務窗口申請(不得代辦) 等待一個工作天等候Email寄發憑證或自行下載憑證儲存於私密金鑰磁片自然人憑證申請流程圖自然人憑證申請流程圖 (舊舊)37http:/village.gov.tw/38X.509AuthenticationServiceDistributedsetofserversthatmaintainsadatabaseaboutusers.EachcertificatecontainsthepublickeyofauserandissignedwiththeprivatekeyofaCA.IsusedinS/MIME,IPSecurity,SSL/TLSandSET.RSAisrecommendedtouse.39CertificateAuthorityTrusted,3rdpartyorganizationCA(CertificateAuthority)guaranteesthattheindividualgrantedacertificateiswhohe/sheclaimstobeCAusuallyhasarrangementwithfinancialinstitutiontoconfirmidentityCriticaltodatasecurityandelectroniccommerce40CertificateAuthoritygeneratesthe“signature”thatisaddedtoraw“Certificate”MICHashRaw“Certificate”hasusername,publickey,expirationdate,.RawCert.SignedCert.41GeneratehashcodeofRawCertificateEncrypthashcodewithCAsprivatekeytoformCAssignatureSignedCertificateRecipientcanverifysignatureusingCAspublickey.4142X.509 Formats42ThisCertificatebelongsto:investing.schwab.comtradingsubneta1199CharlesSchwab&Co.,Inc.Phoenix,Arizona,USThisCertificatewasissuedby:SecureServerCertificationAuthorityRSADataSecurity,Inc.USSerialNumber:6B:68:2F:3B:FD:8A:46:73:04:33:10:8A:32:1E:47:5BThisCertificateisvalidfromWedNov03,1999toThuNov02,2000CertificateFingerprint:4B:80:C6:C5:2D:63:14:E7:6F:50:BD:16:39:3C:96:FD43SampleCertificate information43PublicKeyInfrastructure(PKI)NoabsolutedefinitionorstandardEachpartyhasanassociatedkeypair:onepublicandoneprivatePrivatekeysarenotdivulgedPublickeysarepublishedInfrastructureenablesbothencryptionanddigitalsignatures(tothwartmaninthemiddle)Problem:publickeyspoofing44PKI-SecuredApplicationsPKIE-mailSecure DesktopWebE/Commerce*Single Sign onVPN45PKCSrelateddocumentsPublic Key Cryptographic Standards, PKCSA collection of 13 papers PKCS #1 to PKCS #15 developed by RSA Labs and representatives from the academia and industry.PKCS #1RSA AlgorithmPKCS #3Diffie-Hellman AlgorithmPKCS #5: Password-Based Cryptography Standard PKCS #6: Extended-Certificate Syntax Standard PKCS #7Cryptographic Message Syntax StdPKCS #8:Private-Key Information Syntax Standard PKCS #9: Selected Attribute TypesPKCS #10Key Certification RequestPKCS #11Standard API for developersPKCS #12Certificate Interchange FormatPKCS #13Elliptic Curves AlgorithmPKCS #14PRNG AlgorithmsPKCS #15Smart Card File Format 46http:/www.pki.gov.tw/47憑證的分類PKIUserPKICAPKI分類http:/210.71.181.21/48ServerAP憑證的功能確認伺服器應用程序(ServerApplicationProcess)之身分,確保資料傳遞的安全。SSL的ServerAP憑證:網站參觀者確信網站的真實身分,使瀏覽器與伺服器之間的通訊有安全加密的功能,以便確保通訊過程的資料安全以及傳遞資料的完整性。49ServerAP憑證用途示例-Client辨識Server身份ServerAP憑證ServerAP的公開金鑰憑證序號有效期限ServerAP的DN簽發者的DN簽發者的數位簽章Client端可信賴CA清單CA的DN憑證是否有效?CA的憑證CA的公開金鑰CA的數位簽章簽發者的DN在可信賴清單中?用CAPublicKey驗證signature通過?ServerAPsDN與實際DN是否相同?50ServerAP憑證與Device憑證之區別(1/2)憑證主體(subject;對象)的定義應該區分清楚。才可以定好申請及審驗的流程,不會造成發憑證的混淆及因擾。Device指的是硬體的設備或元件,例如讀卡機,加值機,PC,Workstation或VPN的VSU等。因此發給硬體元件的憑證稱為Device憑證,中文稱為硬體裝置憑證。一台Server機器上可能會同時有很多個Service,這邊簽發的對象是在Server機器上提供某個Service的的伺服應用軟體(ServerApplicationProcess),而不是發給那台機器設備的。此種發給伺服應用軟體的憑證稱為ServerAP憑證,中文稱為伺服軟體憑證伺服軟體憑證。51ServerAP憑證與Device憑證之區別(2/2)GCAServerAP憑證是發給政府部門應用的某台伺某台伺服主機上的該伺服應用軟體服主機上的該伺服應用軟體,因此GCAServerAP憑證其中文的名稱為“GCA伺服軟體憑證”或稱做“伺服器應用軟體(伺服器應用軟體(Server AP)憑證憑證 ”。若以後有需要,可以規劃發給Workstation的GCA伺服器憑證(屬於硬體裝置憑證)。依據電子閘門功能規範,建議將GCAServerAP憑證私密金鑰存放在高速保密器中,這和存放在floppy中,只是storagemedia及保護程度的不同而已,並不會影響該憑證是ServerAP憑證的本質。52GCAServerAP憑證內容憑證格式版本憑證序號簽章演算法簽發者名稱憑證有效期限持有者識別名稱(Subject Name)持有者公鑰簽發者唯一識別碼持有者唯一識別碼(Subject Unique ID)金鑰用途憑證政策憑證主體別名(Subject Alt Name)基本限制. CA 簽章擴充欄位53GCAServerAP憑證的種類(1/3)ServerAP憑證(AP係指ApplicationProcess),分成為專屬類別(Proprietary)的ServerAP憑證、SSL的ServerAP憑證以及給TimeStampServer或OCSPServer等特定用途的Specific憑證。GCA目前對政府機關提供專屬類別以及SSL的ServerAP憑證。上述兩種憑證其主要分別在Commonname及ou記載方式的不同。如為專屬類別時,則Commonname使用ServerAP的名稱或是IPAddress(註1);而為SSL的ServerAP憑證,則Commonname註記為該ServerAP所使用的Domainname。(註1:專屬類別的定義主要是來自於一些的應用系統,它們所用的通訊協定並不是國際公認的工業標準,而有其專屬的做法及用法,因此這樣專屬伺服軟體的憑證便稱為專屬伺服軟體憑證,而其憑證的格式剖繪(profile)在業界便沒有約定的方式,因此我們便依照X.521的命名方式,在cn中使用伺服軟體的名稱,並且由於這些的應用系統的IPAddress,並沒有像domainname有向TrustThirdParty登記,所以使用IPAddress便被我們視為專屬伺服軟體憑證的一個特性.)54GCAServerAP憑證的種類(2/3)如為專屬類別時,則ou為伺服軟體使用單位全名,也就是使用該伺服軟體的一級機關的名稱、各級單位名稱之串接。例如:ou=行政院&研考會&資訊管理處&三科而SSL的ServerAP憑證,其ou為伺服軟體名稱,也就是使用該伺服軟體的一級機關的名稱、各級單位名稱、及伺服軟體名稱。例如:ou=行政院&經濟部&商業司&工商電子閘門IP軟體55GCAServerAP憑證的種類(3/3)專屬伺服軟體憑證申請畫面SSL伺服軟體憑證申請畫面CNCNSubjectAltNameououSubjectAltNameoo56FAQregardingGCAQ1.可不可用政府機關可不可用政府機關(構構)的憑證來做為的憑證來做為Server AP憑憑證證 ?A1.不可以的不可以的。因為類別上根本不同,如果硬是使用會造成權責不分。政府機關(構)的憑證代表機關單位的身分,類似關防的作用,ServerAP憑證則代表伺服器上面的某個軟體程序(process)。Q.2RA與RAO的區別為何?A2.RA為RegistrationAuthority為一個機構法人,而RAO=RAOperator為一個機構中的自然人,因此是要建置RA並須訓練RAO。57Source:SunMicrosystems,Inc.,JDBC 3.0 SpecificationClient/Server(2-Tier)DatabaseAccessDataTierDatabaseManagementServicesClientTierPresentation,BusinessLogic58Source:SunMicrosystems,Inc.,JDBC 3.0 SpecificationTraditional(non-component)N-TierSystemsClientTierPresentationLogicApplicationTierBusinessLogicDataTierDatabaseManagementServices59ComponentN-TierSystemsJ2EEArchitectureEnterpriseInformationServicesWeb ContainerJSPServletEJB ContainerEJBAppletContainerStandaloneClientConnectorFirewareDatabase ServerMachineJ2EE ServerMachineClientMachineWeb TierBusiness TierEIS TierClient Tier60J2EE,J2SE,J2MEJ2EEandOtherJava2PlatformEditionsSource:Computer,August200061Source:SunMicrosystems,Inc.J2EEandOtherJava2PlatformEditionsJ2EE,J2SE,J2ME62J2EEPlatformTechnologies1/3ServletsandJSPJavatechnologyservletsandJavaServerPagesareservercomponentsthatruninawebserverthatsupportsdynamicHTMLgenerationandsessionmanagementforbrowserclients.EJBEnterpriseJavaBeansisaservercomponentmodelthatprovidesprotabilityacrossapplicationserversandimplementsautomaticservicesonbehalfoftheapplicationcomponents.JTAJavaTransactionAPIprovidesatransactiondemarcationAPI.JTSJavatransactionServicedefinesadistributedtransactionmanagementservicebasedontheCORBAObjectTransactionService.63J2EEPlatformTechnologies2/3JNDIJavaNamingandDirectoryInterfaceprovidesaccesstonaminganddirectoryservices,suchasDNS,LDAP,NDS,andCORBANaming.RMI-IIOPRemoteMethodInvocation(RMI)createsremoteinterfacesforJava-to-Javacommunication.ThisextensionusestheCORBAstandardIIOPcommunicationprotocol.JavaIDLJavaInterfaceDefinitionLanguagecreatesremoteinterfacestosupportjava-to-CORBAcommunications.64J2EEPlatformTechnologies3/3JDBCJDBCdatabaseaccessAPIprovidesuniformaccesstorelationaldatabases.JMSJavaMessagingServicesupportsasynchronouscommunicationusingeitherareliablequeuingorpublish/subscribemodel.JavaMailJavaMailprovidesaprotocol-independentframeworktobuildmailandmessagingapplications.JAFJavaBeansActivationFrameworkprovidesstandardservicestodeterminethetypeofanarbitrarypieceofdataandactivateanappropriateJavaBeanscomponenttomanipulatethedata.65HistoryofJ2EETechnologiesDistributedObjectsCORBA,DCOM,etc.Three-tierscenario:presentation,businesslogic,andbackenddatabasesHardto“getright”withouttheproperinfrastructureServer-SideComponentsFocusesonencapsulating“businessrules”intoobjectsinthemiddletierComponentTransactionMonitorsDescendantofCORBAsObjectRequestBrokerprovidesdiscovery,persistence,eventnotification,transactions,etc.forthree-tierorn-tierapplications66網路安全簡介IntroductiontoNetworkSecurity67常見的攻擊手法常見的攻擊手法 I I使用現成的攻擊工具使用現成的攻擊工具猜測密碼法猜測密碼法Remote Password GuessingRemote Password GuessingLocal Password CrackingLocal Password Cracking設定錯誤、設定不詳盡的系統設定錯誤、設定不詳盡的系統預設帳號、密碼預設帳號、密碼存取設定錯誤(存取設定錯誤(NFSNFS) NFS.aviNFS.avi安裝系統時,自動安裝的不必要程式安裝系統時,自動安裝的不必要程式(showcode.aspshowcode.asp)68http:/http:/www.?gsm.com.twwww.?gsm.com.tw/?/?/showcode.asp?sourceshowcode.asp?source=/ =/msadc/Samples/././././././boot.inimsadc/Samples/././././././boot.ini69常見的攻擊手法常見的攻擊手法 II II程式本身的設計缺陷程式本身的設計缺陷Buffer OverflowBuffer Overflow路徑檢查不嚴謹(路徑檢查不嚴謹(./././etc/./././etc/passwdpasswd)參數檢查不嚴謹(例如參數檢查不嚴謹(例如 phfphf)監聽網路上的封包(監聽網路上的封包(SniffingSniffing)搜尋順序的問題搜尋順序的問題安裝木馬(陷阱)安裝木馬(陷阱)動態函式替代法動態函式替代法安裝後門程式安裝後門程式70常見的攻擊手法IIbufferoverflow藉由輸入過長的資料給固定長度的buffer造成bufferoverrun。實例:NCSAhttpdbufferoverflowNCSAshttpdv1.4的MAX_STRING_LEN只能容忍256個字元Crack:當一個client連到server的port80,利用GETcommand輸入超過256字元,server便會要求結束程式。NetmanergerChameleontoolsuit的漏洞:FTPserverBufferoverflowwithusernameusername150字元71Bufferoverflow(Cont.)POP3dBufferoverflowwithUSERusernameusername152字元BufferoverflowwithPASSpasswdpassword104字元SMTPdBufferoverflowwithHELOhostnamehostname471字元BufferoverflowwithHELPtopictopic514字元72CGI : PHF CGI : PHF 參數檢查不嚴格參數檢查不嚴格73常見的攻擊手法常見的攻擊手法 IIIIIIn利用通訊協定的弱點(利用通訊協定的弱點(SYN-FloodSYN-Flood、SMTPSMTP)n假造假造 IP IP 位址(位址(IP SpoofingIP Spoofing)n偽造偽造 DNS DNS 資訊(資訊(DNS SpoofingDNS Spoofing)n攔截、替代封包(攔截、替代封包(Session HijackSession Hijack)n偽裝偽裝 Client Client 或或 ServerServern遠端掃瞄(遠端掃瞄(Port ScanningPort Scanning)74常見的攻擊手法常見的攻擊手法 IVIVn阻絕攻擊(阻絕攻擊(DoSDoS)nSYN-FloodSYN-FloodnSmurfSmurfnTCPTCP、UDPUDP、ICMPICMPnResource ExhaustingResource Exhaustingn分散式阻絕攻擊(分散式阻絕攻擊(DDoSDDoS)75常見的攻擊手法常見的攻擊手法 V Vn針對個人(針對個人(WindowsWindows)的攻擊的攻擊n存取未經限制的資源分享存取未經限制的資源分享n電子郵件、資料檔、甚至網頁(夾帶病電子郵件、資料檔、甚至網頁(夾帶病毒、巨集、程式碼)毒、巨集、程式碼)nWeb BombWeb Bomb、ICQ BombICQ Bomb、Mail BombMail Bombn程式的漏洞(程式的漏洞(MSIEMSIE、ICQICQ、FTPDFTPD)nOOBOOB、IGMPIGMP(一擊必殺)一擊必殺)nBo2kBo2k(後門程式)後門程式)76常見攻擊手法V OOBV OOBOut-of-band特徵:在與某台主機建立連線後,送出一個含有MSG_OOB的封包:send(s,str,strlen(str),MSG_OOB);原理:MSG_OOBflag是用來控制網路,因此具有很高的優先權這類程式會造成Windows會delay很久,嚴重者當機。Ex:WinnukeCrash95.c77常見攻擊手法V BOV BOBackorificeWindows95/98新版本Backorifice2000Windows95/98/NT特洛依型程式利用簡單控制台(console)或圖形(GUI)介面,提供駭客遠端控制能力,以便暗中竊取資料。當backorifice被執行後,installationfile會偷偷安裝程式,將檔案複製到windows的system目錄下,開始監控使用者電腦,並且installationfile會將自身殺掉。78BO(Cont.)程式包含兩部分:Server:remotetargetmachineClient:localintrudersmachineCapability:DisplaysysteminfoHDsize,memory,etcDisplaycachedpasswordsRebootthesystem.FreezetheremotemachineChanginganythingintheWindowsRegistry.CreateordeletedirectoriesMonitornetworkpacketsetc.79DenialofService(DoS)簡介攻擊對象:連上Internet的網路和裝置目的:讓被攻擊的網路伺服器因忙碌著回應不合法的存取要求或拒絕合法使用者的存取,導致:伺服器無法正常運作使用者無法再存取網路資源80DistributedDoS(DDoS)攻擊方式:採分散的攻擊方式,聯合網路上能夠發動DoS攻擊的主機同時發動攻擊,造成數以百萬計的封包流入欲攻擊的目標,造成對方癱瘓。程式:TFNTRIN00tfn2k81DoS常用攻擊技術IPSpoofing技術:改變網路封包的來源位置,欺騙路由器或防火牆,假裝入侵者是來自於可信任的網路。藉由IPSpoofing技術,攻擊者可達到:隱藏入侵者身份及位置加強DoS攻擊的能力82DoS攻擊型態皆是利用TCP/IP的漏洞,讓網路充滿了垃圾封包,攻擊型態包含:利用主機系統TCP/IP漏洞,例如:PingofDeathTeardrop利用TCP/IP規格本身的漏洞,例如:SYNFloodLANDSmurf攻擊83DoS攻擊型態PingofDeath方式:利用“ping”這支工具程式來產生超過IP協定所能允許的最大封包(65535bytesbasedonRFC-791)。當這封包送到沒有檢查功能的系統,則可能發生系統當機或者是因為過長的封包會被切成可接受長度的片段(fragments)再逐一傳送至遠端電腦,再將這些片段組合還原成完整封包,但此舉有時會造成對方電腦Bufferoverflow而當機或重開。84PingofDeath(Cont.)SSPING/Jolt一個能有效凍結大部分Windows95或WindowsNT連線的程式藉由傳送一連串長度為64k的spoofed&fragmentedICMP封包給攻擊目標,造成Windows95/NT無法正常運作。ssping.cusage:ssping85ssping.cif(hp=gethostbyname(argv1)=NULL)if(ip-ip_dst.s_addr=inet_addr(argv1)=-1)fprintf(stderr,%s:unknownhostn,argv1);exit(1);elsebcopy(hp-h_addr_list0,&ip-ip_dst.s_addr,hp-h_length);if(hp2=gethostbyname(argv2)=NULL)if(ip-ip_src.s_addr=inet_addr(argv2)=-1)fprintf(stderr,%s:unknownhostn,argv2);exit(1);elsebcopy(hp2-h_addr_list0,&ip-ip_src.s_addr,hp-h_length);86ssping.c(C.1)printf(Sendingto%sn,inet_ntoa(ip-ip_dst);ip-ip_v=4;ip-ip_hl=sizeof*ip2;ip-ip_tos=0;ip-ip_len=htons(sizeofbuf);ip-ip_id=htons(4321);ip-ip_off=htons(0);ip-ip_ttl=255;ip-ip_p=1;ip-ip_csum=0;/*kernelfillsin*/dst.sin_addr=ip-ip_dst;dst.sin_family=AF_INET;icmp-type=ICMP_ECHO;icmp-code=0;icmp-checksum=htons(ICMP_ECHO8);87ssping.c(C.2)for(offset=0;offsetip_off=htons(offset3);if(offsetip_off|=htons(0x2000);elseip-ip_len=htons(418);/*maketotal65538*/if(sendto(s,buf,sizeofbuf,0,(structsockaddr*)&dst,sizeofdst)type=0;icmp-code=0;icmp-checksum=0;88DoS攻擊型態-Teardrop攻擊方式:利用IP封包重組的漏洞送出一對經過特別設計封包片段,使得這一對封包片段在目標電腦重新組合後,造成與原來資料不合的封包。原理:網路層(Networklayer)的IP(InternetProtocol)主要負責路由與資料包分割(fragmentation)及重組(re-assembly)。正常片段重組異常片段重組89Teardrop(Cont.)改變第二片段位移資訊,使得第二片段的資料與第一片段資料重疊,造成這些datagramsincomplete.提供網路服務的主機因誤判封包的大小而使整個程式當掉,甚至是系統當機。WindowsNT當NT收到這類的invaliddatagrams時,會挖一塊kernelmemory,一旦有足夠的invaliddatagrams攻擊,便會使NT當掉。Example:teardrop.c90teardrop.c(1/5)void send_frags(int, u_long, u_long, u_short, u_short);int main(int argc, char *argv). for (i = 0; i th_sport=sin.sin_port; /* th_dport=sin.sin_port; tcpheader-th_seq=htonl(0xF1C); tcpheader-th_flags=TH_SYN; tcpheader-th_off=sizeof(struct tcphdr)/4; tcpheader-th_win=htons(2048); 101Land.c(Cont.)bzero(&pseudoheader,12+sizeof(struct tcphdr); /*= the same address =*/ pseudoheader.saddr.s_addr=sin.sin_addr.s_addr; pseudoheader.daddr.s_addr=sin.sin_addr.s_addr; pseudoheader.protocol=6; pseudoheader.length=htons(sizeof(struct tcphdr); bcopy(char *) tcpheader,(char *) &pseudoheader.tcpheader,sizeof(struct tcphdr); tcpheader-th_sum=checksum(u_short *) &pseudoheader,12+sizeof(struct tcphdr);.102Smurf原理:ICMP(InternetControlMessageProtocol)封包可以載送網路傳輸情況和錯誤訊息,以判定網路彼端的電腦是否有回應。判斷方式:對該主機位址傳送ICMPechorequestpacket若該主機收的到,會回送ICMPechoreplypacket通常這過程是由一個“ping”命令來達到因此,以程式來利用IPprotocol傳送大量Pingmessage封包給Internet上許多台機器,造成大量Replymessage造成網路交通的癱瘓。103Smurf(Cont.)攻擊方式:大量利用假造的ICMPechorequest封包。將假造的封包送至廣播位址,造成更多倍數量的ICMPechoreply封包傳回至欲攻擊的目標。在smurfattack中,攻擊者從遠端的網路位址發送ICMPechorequestpacket至IPbroadcastaddress來產生DoSattack,其中主要角色:TheattackerTheintermediaryThevictimEx:smurf.c104smurf.cfor (i = 0; i ip_src.s_addr = sin.sin_addr.s_addr;ip-ip_dst.s_addr = dest;icmp-icmp_type = 8;icmp-icmp_code = 0;icmp-icmp_cksum = htons(ICMP_ECHO 8);sendto(sock, packet, sizeof(struct ip) + sizeof(struct icmp) + psize, 0, (struct sockaddr *) & sin, sizeof(struct sockaddr);106DDoS攻擊型態-TFNTFN為一功能強大的smurf攻擊工具。為了達到DistributedDoS攻擊方式,TFN分為client程式和daemon程式。可發動的攻擊模式有:ICMPfloodSYNfloodUDPfloodSmurfattack107TFN(Cont.)攻擊者控制TFN網路上一台或多台的client每一個client可對更多的daemon下達攻擊命令其間的溝通是透過ICMPechoreply封包,因為一些網路監控工具並不截取ICMP封包內的資料,故當client與daemon溝通時很難被監控工具偵測到攻擊活動的進行。108DoS防範之道因為攻擊者利用DNSsearching,wwwserversearching,host/portscanning入侵系統,並植入hiddendaemon(Trojanhorse),繼續尋找並入侵,植入daemon,建立整個入侵架構,所以可能的防範方式如下:注意系統可能的漏洞,避免成為被攻擊者所利用的client及daemonRouter設流量統計分析DNS防護建立server的ACL建立Firewall/securitygateway109知己知彼-常見入侵方法SUID attackPassword attackTrusted-Access attackSequence Number Prediction AttackSession Hijacking AttackTrojan Horse Attack110影響網路安全的因素使用者的疏失軟體設計或網路協定的缺陷網路軟體的設計問題網路服務的錯誤設定惡意攻擊111 可能的 BackdoorSetuidshell/bin/login、/bin/inetd/etc/inetd.conf、/etc/servicesCrontab,netstat,tcpd,fingerd,sendmail,ftpd,.Windows?Config.sys,Autoexec.batWin.ini,system.ini,registry112 網路安檢工具SpidersSpiders針對某些服務,對網路上的主機進行資料收集的工作Port ScannerPort Scannernmap / strobe可以了解網路主機上有哪些服務nmap 可對子網路進行掃描,偵測子網路上有哪些主機Security ScannerSecurity ScannerSATAN / SAINT 弱點測試ISS ISS Internet/Intranet Scanner NAI CyberCop Sting (http:/www.nai.com)Nessus project (http:/www.tw.nessus.org)113網路安檢工具(C.1)IDSNFR (http:/www.nfr.net/)DTK (http:/www.all.net/dtk/)114網路安檢工具NessusNessusproject的目的是提供一個FreePowerfulUp-to-dateEasytouse的remotesecurityscanner。請參閱參考資料115網路安檢工具並非萬能通過網路安全檢查不代表系統絕對安全網路安全檢查工具做不到的事:防止竊聽防止 IP Spoofing防止偽造的 ICMP 封包防止系統內部的資料竄改防止工作人員的人為疏失或故意116 如何增進網路系統安全善用網路安檢工具, 改善系統弱點加裝TCP WrapperTCP Wrapper 以利監督(可配合swatchswatch)注意信任關係信任關係的設定/etc/hosts.equiv/etc/hosts.equiv, hosts.allow, hosts.deny, 使用者的. .rhostrhost使用SNP tool (交大資工系謝續平教授研發)ftp:/ftp:/ftp.csie.nctu.edu.tw/pub/CSIE/snpftp.csie.nctu.edu.tw/pub/CSIE/snp/ /重要資料加密117 如何增進網路系統安全(Cont.)注意注意Mail Server Mail Server 和其他和其他serverserver之設定之設定監督使用者設定好的密碼及好的使用習慣善用防火牆防火牆 (Firewall)(Firewall)Intrusion Detection SystemIntrusion Detection System118Firewall:定義:只讓具備特殊身分的外在使用者才能連上一個被保護的網站,使用其軟體或硬體Afirewallsystemisusedtocontrolaccesstoorfromaprotectednetwork(asite).小問題: pcanywhere如何增進網路系統安全架設Firewall119Firewall的安全策略管理者工作對機構內的安全策略必須十分清楚知道Firewall功能中監視,複製,控制的程度Firewall反應整體安全程度不能允許不受限制的modem上線機密資料就不該連到Internet私人資料系統與公司網路的其它部分分開Firewall非萬能120Firewall管理問題自己建立或買現成的買現成的貴又怕Trapdoor自行設計要考慮支援和系統更新等後續維修容量管理問題Bottleneck內容管理和控制問題MIS部門,行銷通訊部門或功能部門的工作121網路位址轉換(NAT)NATchangestheipaddressesinapacket,sothattheaddressoftheclientinsidenevershowsupontheinternet.Examples:CiscoPIX,LinuxMasquerading,FirewallOne,ipfilter,FreeBSDNAT122PrivateIP/NATIntranetEthernetEthernetInternetServerServer192.168.1.1192.168.1.2192.168.1.2123VirtualPrivateNetworksVPN connects the components of one network over another network by tunnel through the public network(Internet) with security and features formerly available only in private networksVPN saves the cost of Dedicated LineBrief: VPN is Secure TunnelSecure Tunnel124Public-KeyCryptographicAlgorithms公開金鑰密碼演算法RSAandDiffie-HellmanRSA-RonRives,AdiShamirandLenAdlemanatMIT,in1977.RSAisablockcipherThemostwidelyimplementedDiffie-Hellmanin1976EchangeasecretkeysecurelyComputediscretelogarithms125TheRSAAlgorithmKeyGeneration1.Selectp,q pandqbothprime2.Calculaten= pxq3.Calculate4.Selectintegere5.Calculated6.PublicKeyKU=e,n7.PrivatekeyKR=d,n126ExampleofRSAAlgorithm1.Selectp,q p=7,q=172.Calculaten= pxq =7x17=1193.Calculate=964.Selectintegere=5 5.Calculated =776.PublicKeyKU=e,n=5,1197.PrivatekeyKR=d,n=77,119 因為因為 77 x 5 = 385 = 4 x 96 + 1127ExampleofRSAAlgorithm(cont.)128Diffie-Hellman Key Echange 和和 q 是雙方先約好或由是雙方先約好或由一方送給另一方一方送給另一方(A送給送給B)雙方算出的雙方算出的 K 會相等會相等129Conventional Encryption AlgorithmsData Encryption Standard (DES)The most widely used encryption schemeThe algorithm is reffered to the Data Encryption Algorithm (DEA)DES is a block cipherThe plaintext is processed in 64-bit blocksThe key is 56-bits in length130131132AuthenticationRequirements-mustbeabletoverifythat:1.Messagecamefromapparentsourceorauthor,2.Contentshavenotbeenaltered,3.Sometimes,itwassentatacertaintimeorsequence.Protectionagainstactiveattack(falsificationofdataandtransactions)133ApproachestoMessageAuthenticationAuthenticationUsingConventionalEncryptionOnlythesenderandreceivershouldshareakeyMessageAuthenticationwithoutMessageEncryptionAnauthenticationtagisgeneratedandappendedtoeachmessageMessageAuthenticationCodeCalculatetheMACasafunctionofthemessageandthekey.MAC=F(K,M)134135One-way HASH function136One-wayHASHfunctionSecretvalueisaddedbeforethehashandremovedbeforetransmission.137DigitalSignatureStandard(DSS)UsesSecureHashAlgorithm(SHA)Condensesmessageto160bitsKeysize512-1024bitsProposedbyNISTin1991Adopted1994/05/19FIPS PUB 186-FederalInformationProcessingStandardsPublication186138Using the SHA with the DSAFromhttp:/www.itl.nist.gov/fipspubs/fip186.htm139MessageDigest5(MD5)NoformalmathematicalfoundationRelyonproducingrandomoutputOperateon512bitsatatimeMessagesarepaddedwith0wherenecessaryEachstagetransforms128-bitMD+512bitsofmessageMD5doesthis32-bitsatatimeCurrentdigestvalueis432-bitwords(d0,d1,d2,d3)Messagevalueis1632-bitwords(m0,m1,m15)140MD5(cont-1)BasictransformationcanbedividedintofourpassesFirstpassNewvalueofdigestisproducedfromoldvalueandthe16messagewordsin16stepsfirst6stepsare141KERBEROSInGreekmythology,amanyheadeddog,theguardianoftheentranceofHades142WhatisKERBEROSNetworkauthenticationprotocolDevelopedatMITAthena(雅典娜)projectin1983Providesacentralizedauthenticationservertoauthenticateuserstoserversandserverstousers.Reliesonconventionalencryption,makingnouseofpublic-keyencryptionTwoversions:version4and5Version4makesuseofDES143KerberosscenarioKerberosClientServerTicket Granting Service(TGS)123451.Requestticket-granting-ticket(TGT)2.3.Requestserver-ticket (ST)4.5.Requestservice144
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号