HTTP – Strike 2
CSE 598 Advanced Security of the Web
Fish Wang
Fall 2026
A simple web app
2
Web Applications
3
Web Applications
4
Maintaining State
5
HTTP Authentication
HTTP Basic Authentication
HTTP 1.1 Authentication
A closer look at HTTP 1.1 Authentication
9
A closer look: Server response
HTTP/1.0 401 Unauthorized
Server: HTTPd/0.9
Date: Sun, 10 Apr 2014 20:26:47 GMT
WWW-Authenticate: Digest realm="testrealm@host.com",
qop="auth,auth-int",
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
opaque="5ccc069c403ebaf9f0171e9517f40e41"
Content-Type: text/html
Content-Length: 153
10
A closer look: Client request
GET /dir/index.html HTTP/1.0
Host: localhost
Authorization: Digest username="Mufasa",
realm="testrealm@host.com",
nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",
uri="/dir/index.html",
qop=auth,
nc=00000001,
cnonce="0a4f113b",
response="6629fae49393a05397450978507c4ef1",
opaque="5ccc069c403ebaf9f0171e9517f40e41"
11
Authentication only; no integrity protection
Generating the response
HA1 = MD5("Mufasa:testrealm@host.com:Circle Of Life")
= 939e7578ed9e3c518a452acee763bce9
HA2 = MD5("GET:/dir/index.html")
= 39aff3a2bab6126f332b942af96d3366
Res = MD5("939e7578ed9e3c518a452acee763bce9:
dcd98b7102dd2f0e8b11d0f600bfb0c093:
00000001:0a4f113b:auth:
39aff3a2bab6126f332b942af96d3366")
= 6629fae49393a05397450978507c4ef1
12
nonce
cnonce
Security Issues (Strike 2)
13
Potential threats
14
Missing authentication
15
Basic auth
16
Encoding errors
17
HTTP digest nonce replay
18
Credential bruteforcing
19
Embedding Information in Cookies
20
Embedding Information in Cookies
21
Embedding Information in Cookies
22
Embedding Information in Cookies
23
Embedding Information in Cookies
24
Embedding Information in Cookies
25
26
27
Embedding Information in Cookies
28
Embedding Information in Cookies
29
Modern Sessions
30
Designing Web Applications
31
Security Issues (Strike 3)
32
Cookies are in plaintext
33
Cookies can be set by attackers
34
Cookie integrity
35
Fabricating your cookie (a)
36
Fabricating your cookie (b)
37
Fabricating your cookie (c)
38
Session IDs
39
Session lifetimes
40
Session fixation
41
Web cache
42
Cache and secret pages
43
Questions?
44