Introduction to Web Security
Seoul, South Korea
November 1, 1995
Security flaws of viewers may be exploited (e.g. older ghostscript)
Client can be configured to run shell scripts sent from server
Commands can be compiled, put on stack after overflow
application/x-csh; csh -f %s
Gigantic browsers ==> Potential security holes
Nice, but this won't help solve the problems mentioned before!
system("/usr/lib/sendmail -t $USER < input_file")
USER = " foo@bar.com ; rm -rf / "
Writing Secure CGI Scripts
Using "cgiwrap", from UMR
NCSA httpd Making your Setup More Secure
NCSA httpd 1.3 Security Patch
==> So most all documents are "public"
groups of users
Passwords stored in encrypted form
Strengths:
We can restrict access using client's IP address
Both NCSA, CERN server all combinations of both methods
NCSA httpd:
satisfy any
allow from .cs.edu.au
require user moe curly schemp
CERN httpd:
"* : get, put : @128.141.*.*"
Anything encrypted with one key may only be decrypted by the other
To make message readable only by B, encrypt message using B's public key.
Slower than symmetric cryptography
Most popular scheme: RSA
What does an encrypted message look like?
From president@whitehouse.gov Wed May 18 15:33:50 1994 Date: Thu, 6 July 95 04:49:54 EDT X-Ph: V4.3@argus.cso.uiuc.edu From: "William J. Clinton"Subject: Re: your secret assignment To: a-cain@uiuc.edu -----BEGIN PGP MESSAGE----- Version: 2.6.2 hGwDYXYcVtJTtGkBAwCMPi/JMFueTMManx3tGZs9pmeBMQw7FOjOvfXFgTh2jOt1 YriB3DWkd8w7kIaxwFcE11SmKUdyqoYQBaDFBq+C9EkAZOBkOCfPcy4HDH0ZPxqr BVO5WkJ5hOfh2h0Fif2mAAABb+SLLdZSUMSrLCf3IJpYcts7E9aFHKmWTzT4iqUn DD42hvRtOn/TLYtqNdjzttho36gowAh7/wnjY8rBxhoosymZigJKOWwK33EE3H5B O4DgkxckGNhH9WjtdDKQ92icIcA/ORPmyl/4O72pscJr186u0xRiyhu04LvRxsFQ qzjWJjARaELKVCPwhg/W/QhlH3t7olK83yzEiRu5P/JyxPzReyEc1MAYhLR57rsX wJyChhUgHcCAeRsPcMVKHW4wg1T7zNUcfKu2KzlYGkvg3okGG8Jz7juiXDnCjkcN 0dIvuoKQHAH5EWclI1l9QepQxYq3V6xd/DxwLyhWS52owjeu73NpMnh9j6ScBDAI CPI= =lnFq -----END PGP MESSAGE-----
1. A generates Ks randomly, and sends it securely to B using B's public key
2. A & B communicate using session key Ks and symmetric cryptosystem
Decrypt with Public key ("verifying" )
Signature Verification
-----BEGIN PGP SIGNED MESSAGE-----
Dear Alice:
I'm getting very tired of cryptographers talking
about us behind our back. Why can't they keep their noses
in their own affairs?!
Really, it's enough to make me paranoid.
Sincerely,
Bob
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQB1AwUBL4XFS2F2HFbSU7RpAQEqsQMAvo3mETurtUnLBLzCj9/U8oOQg/T7iQcJ
vzMedbCfdR6ah8sErMV+3VRid64o2h2XwlKAWpfVcC+2v5pba+BPvd86KIP1xRFI
e3ipmDnMaYP+iVbxxBPVELundZZw7IRE=Xvrc
-----END PGP SIGNATURE-----
A Certificate is a data structure containing information such as:
So how do we trust the CA's public key ?
This suggests the need for a "Public Key Infrastructure" (a CA heirarchy?)
Often requires new browsers and servers with crypto smarts
Large variety of cryptographic algorithms, hardware, software
Network infrastructure requirements
Web security is one part of the larger puzzle: network/system security
Export/import restrictions on cryptographic technology
Mosaic, httpd run PGP, PEM to handle encryption/signing of HTTP messages
Mechanism:
GET /docs/protected.html HTTP/1.0 Accept: text/plain Accept: application/x-html [other Accepts] UserAgent: Mosaic/X 2.2
HTTP/1.0 401 Unauthorized WWW-Authenticate: PGP entity="paranoid@danger.ncsa.uiuc.edu" Server: NCSA/1.3
GET / HTTP/1.0 Authorization: PGP entity="acain@ncsa.uiuc.edu" Content-type: application/x-www-pem-request -----BEGIN PGP MESSAGE----- Version: 2.6.2 [this is the real request, encrypted and signed] hGwDl23+9JZcEX0BAv41s2ZP/3VcOdNj8oVKu2h3DP6C+TKdl4IIaQZIp6DBBPlc mx5GS3ijHk3jP2NYlM1UydxUoShcIIsx1YGlltI/34l4t76oEkkajyvETCiTPYw7 NCdfSXh6P62j9iMKG56mAAAD9kQmeRP2zIhj+6Mm3h5bdSMllfwu8zrYjVocnK+t jaFPZ6TuzyC2j6MFqfcO5M48ICdUw/KcOv63ffDC1bWYCyop3YeVAApqD/LekSLY [etc] -----END PGP MESSAGE-----
HTTP/1.0 200 OK Content-type: application/x-www-pem-reply -----BEGIN PGP MESSAGE----- Version: 2.6.2 [this is the real reply, encrypted and signed] JDqcVMsqo9RT3OGSa6pHDu3+dQm9HAgs56lf6CZqVK+g4PVlxIkA7WhErDJhtw+I sRC/LPGLi/dF5L6YNg+00HHABgbiowra+OeHhsCRD6AgB2cYv3vg0Jz3uejUDUZo FiG+va+AHqInZO5OvLHOxtIq5C7Hi2UZZpvITcVjfjb6YLRW+FGT6ekM5XHy3BAM i95ZQPZsIHh1msScF9r1vIjpbLIIMoentld8eGBeKvRSVPpFHKuMZ6EyuDYgrXIy [etc] -----END PGP MESSAGE-----
"S-HTTP" : EIT's proposed security extensions to HTTP
Protocol Designed to
Examples:
Server requires that client's request be signed
Client supports DES, RSA .....
New protocol designator in anchor: "shttp"
New protocol method: "Secure"
Protected HTTP message encapsulated in S-HTTP message
Headers are added to tell receiver how to "unwrap" the message
Secure * Secure-HTTP/1.1
Content-Privacy-Domain: PKCS-7
Content-Transfer-Encoding: 7BIT
BVO5WkJ5hOfh2h0Fif2mAAABb+SLLdZSUMSrLCf3IJpYcts7E9aFHKmWTzT4iqUn
DD42hvRtOn/TLYtqNdjzttho36gowAh7/wnjY8rBxhoosymZigJKOWwK33EE3H5B
O4DgkxckGNhH9WjtdDKQ92icIcA/ORPmyl/4O72pscJr186u0xRiyhu04LvRxsFQ
qzjWJjARaELKVCPwhg/W/QhlH3t7olK83yzEiRu5P/JyxPzReyEc1MAYhLR57rsX
New info in shttp anchors: DN, NONCE, CRYPTOPTS
HTML extensions: CERTS and CRYPTOPTS
for more information.... S-HTTP specification (Internet Draft)
for more information...
Strengths:
Future:
Passwords NOT sent in cleartext
Message Digest Authentication Internet Draft
One-way (and soon two-way) Authentication via RSA and X.509 Certificates
Provides an encrypted channel for sending such data as Credit Card numbers
Easy to add support for SSL via alternate BSD socket calls
Strengths:
2. Can be used with other protocols than HTTP
3. Easy to drop in support (for clients, especially)
Offers a few improvements (e.g., fewer messages for client auth)
What does it look like?
GET /restricted/adam.html HTTP/1.0 Accept: */* User-Agent: NCSA Mosaic for the X Window System/2.4 libwww/2.12 modified
HTTP/1.0 401 Unauthorized Date: Friday, 03-Feb-95 18:45:13 GMT Server: NCSA/1.3 MIME-version: 1.0 Content-type: text/html WWW-Authenticate: KerberosV4
GET /restricted/adam.html HTTP/1.0 Accept: */* User-Agent: NCSA Mosaic for the X Window System/2.4 libwww/2.12 modified Authorization: KerberosV4 acain 0406004e4353412e554955 32e454455003820c3e4fc931b68ed20d0f696ee74148a696eb4 a4d83e1c80af9ce02e5d3f230dc5e63bbc8595ce95ea6de42b18 d957063ceb45787ab479999565d353da2b5b17a76a89e0d169 3694ee91e5623b953a5dfd3be00642596ff846
timestamp+1 to authenticate server
HTTP/1.0 200 OK Date: Friday, 03-Feb-95 18:45:16 GMT Server: NCSA/1.3 MIME-version: 1.0 Content-type: text/html Last-modified: Wednesday, 04-Jan-95 22:58:20 GMT Content-length: 624 WWW-Authenticate: KerberosV4 [c3602905a92b683f] User authenticatedHTML Document here
Borrows from Spyglass Open Security Architecture
To use "Extension" headers, made part of HTTP 1.1
Enhanced Mosaic Security Framework:
Position Paper on Electronic Commerce Standards for WWW
Payment systems have diverse requirements
How much new software/hardware is required to use a payment scheme?
Who manages the accounts?
What allowances for privacy are made?
Client receives goods encrypted before payment is processed
Client receives decryption key after payment is processed
Support for micro-payments, customized pricing, 4-th party approval
for more information....
What is it?
An untraceable digital payment scheme -- just like cash
Ecash may reside in a "software" wallet, or in a hardware "smartcard"
Consists of individual tokens of various value, individually signed
Analogous to bank signing bill enclosed in a carbon-lined envelope
Pointers to shops accepting ecash
There is no single answer to Web Security