Web应用的安全模式

PPT
  • 阅读 177 次
  • 下载 0 次
  • 页数 55 页
  • 大小 267.124 KB
  • 2023-07-23 上传
  • 收藏
  • 违规举报
  • © 版权认领
下载文档12.00 元 加入VIP免费下载
此文档由【精品优选】提供上传,收益归文档提供者,本网站只提供存储服务。若此文档侵犯了您的版权,欢迎进行违规举报版权认领
Web应用的安全模式
可在后台配置第一页与第二页中间广告代码
Web应用的安全模式
可在后台配置第二页与第三页中间广告代码
Web应用的安全模式
可在后台配置第三页与第四页中间广告代码
Web应用的安全模式
Web应用的安全模式
还剩10页未读,继续阅读
【这是免费文档,您可以免费阅读】
/ 55
  • 收藏
  • 违规举报
  • © 版权认领
下载文档12.00 元 加入VIP免费下载
文本内容

【文档说明】Web应用的安全模式.pptx,共(55)页,267.124 KB,由精品优选上传

转载请保留链接:https://www.ichengzhen.cn/view-288982.html

以下为本文档部分文字说明:

Web应用的“外患”与“内忧”谭晓阳Txy@graphics.nju.edu.cnBasedon《SecuritymodelsforWeb-basedapplication》byJamesB.D.Joshi,WalidG.Aref,ArifGhafoorFebruary2001/Vol.4

4.No.2p38-44《CommunicationofACM》本讲内容介绍基本的安全概念和基本的安全机制Web环境下的安全机制防火墙的工作原理常用的安全措施Web应用安全“外患”“内忧”“外患”•A

spectsofSecurity•AuthenticationandEncryption•InternetFirewallsandPacketFiltering•VirtualPrivateNetworks•SecureHTTP(SHTTP)andSecureSocketLa

yer(SSL)•SecuringyourSiteMainrisks:信息被非法窃听:未经认可的用户对数据的非法访问假冒他人发送信息信息被非法修改拒绝服务病毒。。。解决DataIntegrity:referstoprotectionfromchange:Isthedatar

eceivedexactlythesameasthedatathatwassent?DataAvailability:referstoprotectionagainstdisruptionofservice:Doesthedataremain

availableforlegitimateuse?DataConfidentiality:referstoprotectionagainstunauthorizeddataaccess:Isdataprotectedag

ainstunauthorizedaccess?Privacy:referstotheabilityofthesendertoremainanonymous:Isthesender’sidentityrevealed?完整性机制防止偶然或故意破坏数据完整性

的常用方法:◼奇偶校验(paritybits)◼校验和(checksum)◼循环冗余校验(cyclicredundancychecks,CRC).发送者以包的数据为函数计算出一个整数值。接收者从接收到的数据中重新计算出这个整数,并比

较二者的结果。However,aattackercancreateavalidchecksumorCRCfromthealtereddata.完整性机制Severalmechanismsagainstmalicious(恶意)intentio

nalchangeofintercepteddataexist:用MAC(MessageAuthenticationCode)来编码要发送的数据。◼MAC基于无法破译或仿造的密码机制工作。◼采用只有收发双方知道的secretkey。◼发送者用the

secretkey来scramblethedataandthechecksumorCRC访问控制和口令在传统的计算机系统中,简单的口令即足以保护对系统的访问。Simplepasswordmechanismsarevulnerable(

易受攻击)onnetworksbecausetheyaresusceptibletoeavesdropping(偷听).Wiretapping(搭线窃听)iseasyespeciallythatpasswordsontelnet,FTPorHTTParecleartext

.“外患”•AspectsofSecurity•AuthenticationandEncryption•InternetFirewallsandPacketFiltering•VirtualPrivateNetwo

rks•SecureHTTP(SHTTP)andSecureSocketLayer(SSL)•SecuringyourSite你是谁?Howdoyouknowthecustomeristhecustomerhe/shepretendstobe?Howdoyouknow

theserveristheserveritpurportstobe?IsitreallythethewebpageIwanttoconnectto?IsitreallythecompanyIwanttomakeatransactionwith?I

sitreallythecustomerIthinkIamdealingwith?认证Theprocessofmakingsuretheserverandtheclientareindeedtheserverandclientt

heypurporttobeiscalledauthentication.用户认证是计算机安全中最为困难的部分之一。AuthenticationisbasedondigitalsignaturesTosignamessage,thesendere

ncryptsthemessageusingakeyknownonlytothesender加密目的:即使消息被窃听(wiretapping)也仍可保持其confidentiality.方法:SenderScramblesthebitsof

themessageinawaythatonlytheintendedreceivercanunscramblethemessage.Basedonkeys.结果:Interceptingamessagesisuselesssincenoinfo

rmationextraction.对等加密ThereceiverandthesendersharethesamesecretkeyThesenderencryptsthemessagewithakeyKandthereceiverdecodestheencrypted

messagewiththesamekeyK.Example:DESE=encrypt(Key,M)M=decrypt(Key,E)Mathematicallydecryptisinverseofencryptdecrypt=encrypt-1对称加

密缺陷◼需要进行私钥交换◼规模复杂◼未知实体间通信困难公钥密码机制由Deffie和Hellman发明:◼“NewDirectionsinCryptography”,1976原理◼Publiclyrevealinganencr

yptionkeydoesnottherebyrevealthecorrespongdingdecryptiondecryption.重要结论Noneedtotransmitkeys.◼onlytheintendedrecipien

tcandecipherthemessage.Amessagecanbe“signed”byaprivatelyhelddecryptionkey.◼Signaturescannotbeforged.◼A

signercannotlaterdenythevalidaityofhissignature.下面我们来看如何用这种机制来实现:◼机密性和隐私性:privacyandconfidentiality◼数字签名:signature◼实体

鉴别:authenticationPrivacyandconfidencialityBob向Alice发一个privatemessage的过程:◼GetthepublickeyEafromthepublicfile◼SendherEa(M)◼Ali

cedecpherit:Da(Ea(M))=M特点◼Noneedtoestablishprivatetransactions(保证了私密性)◼Anintruderlisteninginonthecha

nnelcannotdecipheranymessages.Sincederivedecryptionkeysfromencryptionkeysisimpossible.(保证了机密性)数字签名Signatures

Alice首先用自己的私钥对要发给Bob的消息签名:s=Da(M)然后用Bob的公钥加密:Eb(S).并把结果发出.Bob先用自己的私钥解密得到S,然后用Alice的公钥解密得到M.数字签名Signatures完整性:Bob或其他人不可修改M,

对输入数据的任何修改都会引起输出的变化。不可否认性:Alice不可否认发给Bob消息,因为除了他没人能得到他的签名s=Da(M)。机密性:因为只有Bob才有他自己的私钥,别人无法获得。Authentication简单的<id,password>的缺陷:◼Replay

:重放攻击◼例子:“阿里巴巴与四十大盗”基于公钥技术,采用“挑战-响应”协议和信息签名解决实体鉴别问题.◼AlicechallengetoBob:anumber100◼Bobsignthenumberwithhisprivat

ekey.◼AlicegetthesignednumberanddecpheritwithBob’spublickey,comparetheresult.◼Alice的challenge每次都不一样,因此不可能重放攻击.Certificates上面的讨论基于:◼Alice认为他获得的Bob的

公钥是“真的”。攻击者常会假冒因此需要一个方法来保证这一点,保证你得到的证书是可以信赖的。这个方法就是:证书机制,所有的证书都经过颁发者的私钥签名,因此是可以信赖的。发放证书的机构就是:PKI-公开密钥基础设施Certificates证书是一种验证服务器身份的电子

手段。◼客户端可以通过检查证书确认自己连接到了正确的服务器上。证书被预先存放在客户端数据库或一个证书权威(certificateauthority)处,通过比较可以验证一个收到的证书是否正确。证书一般由第三方颁布。◼证书有期限。◼你可以颁布自己的证书并分发给允许访问你站点的用户

。PKI:公开密钥基础设施◼证书管理◼认证◼完整性◼机密性“外患”•AspectsofSecurity•AuthenticationandEncryption•InternetFirewallsandPa

cketFiltering•VirtualPrivateNetworks•SecureHTTP(SHTTP)andSecureSocketLayer(SSL)•SecuringyourSiteInternetfirewall加密技术并不能解决所有的安全问题,还需要其他技术的配合.对内网的每台计算

机都施加保护代价太大。Bettercreateaprotectivewall防火墙技术帮助保护内网不被unwantedInternettraffic所骚扰.防火墙通常放在内网与Internet之间,防止问题从Internet扩散到内部。防火墙的要点所有进入内网的流量必须经过防火墙所有离

开内网的流量必须经过防火墙防火墙拒绝任何违反内网安全规则的流量防火墙本身对安全攻击有免疫力。IfanorganizationhasmultipleInternetconnections,afirewallshouldbeplacedoneach包过滤Pa

cketfiltering是防火墙采用的主要机制防火墙检查所有进出的IP包,从而控制内网与外界的联系,同时也控制外网与内网的通信。基于IP包中的源/目的地址来决定是否丢弃某个包。过滤服务filteringservice除了低级的IP地址包过滤,

还可检查包的协议或其他高层服务即实施基于服务的过滤Example:allowHTTPandSMTPandFTPonly实现的方法:Canuseabooleancombinationofdestination,sourceandservices.FirewallwithPac

ketFiltering“外患”•AspectsofSecurity•AuthenticationandEncryption•InternetFirewallsandPacketFiltering•VirtualPrivateNetworks•SecureHTTP(SHTTP)andSecure

SocketLayer(SSL)•SecuringyourSitePrivateNetworksPlus&MinusofPrivateNetworks专线连接站点:完全的安全性。(completelyprivate)◼Nobodyels

ehasaccessorcanreadpassingdata◼租用专线==》昂贵代价Internet无法保证confidentiality,但很便宜:justgetISPonbothends.能否同时兼得二者的好处?VirtualPrivateNetwork(VPN)VPN

isimplementedinsoftwareEachrouterrunsaVPNsoftwareVPNsoftwareactsasapacketfilterVPNsoftwareencryptspackets,allcommunicationremainsconfidentialTunne

ling技术将整个报文都加密传送????如果报头加密,routerswouldn’tknowwhoisthereceiver如果报头不加密,信息可能泄露(whoissendingandwhoisreceivingmaybeobserved)VPN使用一种称为IP-in

-IPtunneling的技术来完全隐藏信息。IP-in-IPTunneling“外患”•AspectsofSecurity•AuthenticationandEncryption•InternetFirewallsandPacketFiltering•VirtualPrivateNe

tworks•SecureHTTP(SHTTP)andSecureSocketLayer(SSL)•SecuringyourSiteSecureHTTPS-HTTPrequestheader–Secure*secure-HTTP/1.1–Content-Privacy-D

omainPEMorPKS-7–Content-Type:application/http–Security-Scheme,Certificate-Info,Key-AssignS-HTTPresponseheader–Secure-H

TTP/1.1200OK两个特点:协商、脆弱Negotiation◼S-HTTP允许交互双方就安全参数进行协商◼S-HTTPallowsbothpartiestonegotiatetheirneedsandpreferences

regardingsecurityparameters(algorithm,keylength,etc.)VulnerabilityS-HTTP容易受低层攻击,因为它是一个应用层的协议。S-HTTPis

vulnerablesinceitissusceptibletolowlevelattacksattheTCPorIPlevel.Itissecureattheapplicationlevelonly.SecureSocketLayer(SSL)为了解决这个问

题,SSL在OSI模型的更低层实现。◼因此,它不仅可用于HTTP,也可用于其他协议,如FTP,telnet,NNTP,etc.SSL建立并维护一个用于通信的安全通道(securechannel)UnlikeHTTP,SSLissta

teful.SecureChannelPropertiesChannelisauthenticated:服务器必须对客户端进行认证而客户端也可对服务器进行认证。认证的方法是采用public/privatekey进行加密。•Channelispriva

te:先进行握手定义一个密钥,此后所有的消息传递都用它进行加密。加密方法是对等加密法。•Channelisreliable:EachmessageincludesamessageintegritycheckusingaM

ACSSLHandshake•DuringanSSLsession,somevariablesneedtobedefined.Theserverneedstodetermine:◼–VersionofSSLsupported(版本)◼–Encry

ptionalgorithmtobeused(加密算法)◼–SessionID(eachSSLsessionhasauniqueID)(会话号)◼–Compressionalgorithmtobeuse

d(ifneeded)(压缩算法)◼–2randomnumbers以上参数在协商过程中确定下来。协商过程又称为handshake(SSL握手协议)Authenticationalsooccursattheha

ndshakeHandshakeProtocolHandshakeProtocol1.浏览器发一个clienthello消息2.服务器返回一个serverhello消息3.如果客户端需要对服务器进行认证,服务器将自己的证书(certificate)发给对方。同时可按彼此同意的加密

算法发一个serverkeyexchange消息。4.服务器向客户端请求证书(certificate)5.服务器发serverhellodone消息6.如果客户端发会证书或发回nocertificatealert消息,还将发送一个clientk

eyexchange消息HandshakeProtocol7.如果一切正常,客户端发送一个changecipherspec消息,同时附带同意的参数。8.客户端发finished消息9.服务器发自己的changecipherspec消息10.服务器发finished消息“内忧”

对内部后台信息系统的保护◼更难防备主要安全原则◼Leastpriviledgeprinciples◼SeparationofDuty◼Dataabstraction完成机制:访问控制(AccessControl)安全策略最早使用访问控制方法的两种:军

用:MAC(MandatoryAccessControls)◼军方应用的安全目标:preventingtheunauthorizedobservationofclassifiedinformation.民用:DAC(DiscretinaryAc

cessControls)◼Integritydealswithbroaderissuesofsecritythanconfidentiality◼特别是:fundstransfer,clinicalmedicine,environmenta

lresearch,airtrafficcontrol等行业◼每个企业都有自己唯一的安全需求,传统的DAC和MAC难以满足要求。安全策略DAC的定义:◼ameansofrestrictingaccesstoobjectsbasedontheidentityofsubject

sand/orgroupstowhichtheybelong.◼Thecontrolsarediscretinaryinthesensethatasubjectwithacertainaccesspermissioniscapableofpassingthatpermission(perhan

psindirectly)ontoanyothersubject(unlessrestrainedbymandatoryaccesscontrol)◼一言蔽之,DAC的特点是:用户可不经批准的把自己拥有的权限批准给其他人使用。安全策略MAC的定义:◼am

eansofrestrictingaccesstoobjectsbasedonthesensitivity(asrepresentedbyalabel)oftheinformationcontainedintheobjectsand

theformalauthorization(I.eclearance)ofsubjectstoaccessinforamtionofsuchsensitivity.◼强调的是:严格限制什么级别的人访问什么级

别的信息。RBACPermissonsareassociatedwithrolesandusersaremadmembersofappropriaterols.更自然,符合组织管理方式.greatlysimplifiesmanagementofpermi

ssions.与DAC的主要不同:Theusercannotpassaccesspermissionsontootherusersattheirdiscretion.更像MACMAC关心的是whocanreadwhatinformation.信息绝对不可从高级流向低级权限.RBAC更

关心保护信息的Integrity,也就是“Whocanperformwhatactsonwhatinformation”符合安全三原则Securingyoursite:BasicStepsConsiderProblemswithCGIBecarefulwha

tsortofscriptscanbeuploadedontheserverValidateinputofFormsandbestrict•Ex:“/usr/lib/sendmailuser”anduseris“john

.smith@somewhere.ca;rmindex.html”InPerlorotherlanguages,thiscouldbeexecutedbythesystemaftersendingthee-mailsummar

yPKI技术可以有效防止用户的非法访问和修改数据等问题.但在浏览器客户端实施尚不完善要保护内部后台数据库的安全,可以实施RBAC的策略,如果要进一步提供基于工作流的访问控制,也可在RBAC的基础上完成..

精品优选
精品优选
该用户很懒,什么也没有留下。
  • 文档 34925
  • 被下载 0
  • 被收藏 0
相关资源
广告代码123
若发现您的权益受到侵害,请立即联系客服,我们会尽快为您处理。侵权客服QQ:395972555 (支持时间:9:00-21:00) 公众号
Powered by 太赞文库
×
确认删除?