DOC PREVIEW
Stanford CS 155 - Browser Security Model

This preview shows page 1-2-3-4-5-34-35-36-37-68-69-70-71-72 out of 72 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 72 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Reported Web Vulnerabilities "In the Wild"Slide 3Web vs System vulnerabilitiesWeb application vulnerabilitiesFive lectures on Web securityWeb programming pollGoals of web securitySlide 9Slide 10Web Threat ModelsMalware attackerOutlineHTTPURLsHTTP RequestHTTP ResponseRendering ContentRendering and eventsExampleExampleDocument Object Model (DOM)Changing HTML using Script, DOMHTML Image TagsImage tag security issuesJavaScript onErrorJavaScript timingPort scanning behind firewallRemote scriptingSimple remote scripting exampleIsolationFrame and iFrameWindows InteractAnalogyPolicy GoalsBrowser security mechanismComponents of browser security policyLibrary import excluded from SOPDomain RelaxationAdditional mechanismsCommunicationwindow.postMessagepostMessage syntaxWhy include “targetOrigin”?NavigationA Guninski AttackWhat should the policy be?Slide 48Window Policy AnomalySlide 50Slide 51Security User InterfaceSafe to type your password?Safe to type your password?Safe to type your password?Safe to type your password?Safe to type your password?Mixed Content: HTTP and HTTPSMixed content and network attacksLock Icon 2.0Finally: the status BarCookies: client stateCookiesCookie authenticationCookie Security PolicySecure CookieshttpOnly CookiesFrames and frame bustingFramesFrame BustingBetter Frame BustingSummaryBrowser Security ModelJohn MitchellCS155 Spring 2014Reported Web Vulnerabilities"In the Wild"Data from aggregator and validator of NVD-reported vulnerabilitiesWeb vs System vulnerabilitiesDecline in % web vulns since 200949% in 2010 -> 37% in 2011.Big decline in SQL Injection vulnerabilitiesXSS peakWeb application vulnerabilitiesFive lectures on Web securityBrowser security modelThe browser as an OS and execution platformProtocols, isolation, communication, …Web application securityApplication pitfalls and defensesAuthentication and session managementHow users authenticate to web sitesBrowser-server mechanisms for managing stateContent security policiesAdditional mechanisms for sandboxing and securityHTTPS: goals and pitfallsNetwork issues and browser protocol handlingThis two-week section could fill an entire courseWeb programming pollFamiliar with basic html?Developed a web application using:Apache? PHP? Ruby? Python? SQL?JavaScript? CSS?JSON?Know about: postMessage? NaCL? Webworkers? CSP?Resource: http://www.w3schools.com/Goals of web securitySafely browse the webUsers should be able to visit a variety of web sites, without incurring harm:No stolen information (without user’s permission)Site A cannot compromise session at Site BSupport secure web applicationsApplications delivered over the web should have the same security properties we require for stand-alone applicationsWeb AttackerSets up malicious site visited by victim; no control of networkAliceSystemWeb securityNetwork AttackerIntercepts and controls network communicationAliceSystemNetwork securityWeb Threat ModelsWeb attackerControl attacker.comCan obtain SSL/TLS certificate for attacker.comUser visits attacker.comOr: runs attacker’s Facebook app, etc.Network attackerPassive: Wireless eavesdropperActive: Evil router, DNS poisoningMalware attackerAttacker escapes browser isolation mechanisms and run separately under control of OSMalware attackerBrowsers may contain exploitable bugsOften enable remote code execution by web sitesGoogle study: [the ghost in the browser 2007]Found Trojans on 300,000 web pages (URLs)Found adware on 18,000 web pages (URLs)Even if browsers were bug-free, still lots of vulnerabilities on the webAll of the vulnerabilities on previous graph: XSS, SQLi, CSRF, …NOT OUR FOCUS IN THIS PART OF COURSEOutlineHttpRendering contentIsolationCommunicationNavigationSecurity User InterfaceCookiesFrames and frame bustingHTTPURLsGlobal identifiers of network-retrievable documents Example: http://stanford.edu:81/class?name=cs155#homeworkSpecial characters are encoded as hex:%0A = newline%20 or + = space, %2B = + (special exception)ProtocolHostnamePortPathQueryFragmentGET /index.html HTTP/1.1Accept: image/gif, image/x-bitmap, image/jpeg, */*Accept-Language: enConnection: Keep-AliveUser-Agent: Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)Host: www.example.comReferer: http://www.google.com?q=dingbatsHTTP RequestMethod File HTTP version HeadersData – none for GETBlank lineGET : no side effect POST : possible side effectHTTP/1.0 200 OKDate: Sun, 21 Apr 1996 02:20:42 GMTServer: Microsoft-Internet-Information-Server/5.0 Connection: keep-aliveContent-Type: text/htmlLast-Modified: Thu, 18 Apr 1996 17:39:05 GMTSet-Cookie: …Content-Length: 2543 <HTML> Some data... blah, blah, blah </HTML>HTTP ResponseHTTP version Status code Reason phraseHeadersDataCookiesRENDERING CONTENTRendering and eventsBasic browser execution modelEach browser window or frameLoads contentRenders itProcesses HTML and scripts to display pageMay involve images, subframes, etc. Responds to eventsEvents can beUser actions: OnClick, OnMouseoverRendering: OnLoad, OnBeforeUnload Timing: setTimeout(), clearTimeout()Example<html> <body> <div style="-webkit-transform: rotateY(30deg) rotateX(-30deg); width: 200px;"> I am a strange root. </div> </body> </html>Source: http://www.html5rocks.com/en/tutorials/speed/layers/Examplehttp://phet.colorado.edu/en/simulations/category/htmlDocument Object Model (DOM)Object-oriented interface used to read and write docsweb page in HTML is structured dataDOM provides representation of this hierarchyExamplesProperties: document.alinkColor, document.URL, document.forms[ ], document.links[ ], document.anchors[ ]Methods: document.write(document.referrer)Includes Browser Object Model (BOM)window, document, frames[], history, location, navigator (type and version of browser)Changing HTML using Script, DOMSome possibilitiescreateElement(elementName)createTextNode(text)appendChild(newChild)removeChild(node)Example: Add a new list item: var list = document.getElementById('t1') var newitem = document.createElement('li') var newtext = document.createTextNode(text) list.appendChild(newitem) newitem.appendChild(newtext)<ul id="t1"><li> Item 1 </li></ul>HTMLHTML Image Tags24Displays this nice picture  Security issues?<html> … <p> … </p> …<img src=“http://example.com/sunset.gif”


View Full Document

Stanford CS 155 - Browser Security Model

Documents in this Course
Lecture 5

Lecture 5

64 pages

Phishing

Phishing

31 pages

Load more
Download Browser Security Model
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Browser Security Model and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Browser Security Model 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?