• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
 Security, Privacy and Trust - Lecture 11 - Web Information Systems (4011474FNR)
 

Security, Privacy and Trust - Lecture 11 - Web Information Systems (4011474FNR)

on

  • 4,494 views

This lecture is part of a Web Information Systems course given at the Vrije Universiteit Brussel.

This lecture is part of a Web Information Systems course given at the Vrije Universiteit Brussel.

Statistics

Views

Total Views
4,494
Views on SlideShare
4,253
Embed Views
241

Actions

Likes
1
Downloads
124
Comments
0

7 Embeds 241

http://wise.vub.ac.be 229
http://www.slideshare.net 6
http://www.inf.ethz.ch 2
http://www.sigtec.org 1
https://wise.vub.ac.be 1
http://translate.googleusercontent.com 1
http://www.slideee.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

     Security, Privacy and Trust - Lecture 11 - Web Information Systems (4011474FNR) Security, Privacy and Trust - Lecture 11 - Web Information Systems (4011474FNR) Presentation Transcript

    • Web Information Systems Security, Privacy and Trust Prof. Beat Signer Department of Computer Science Vrije Universiteit Brussel http://www.beatsigner.com 2 December 2005
    • Security Aspects  Authenticity  knowing the sender or receiver of data - who is trying to access data on a web server - who is offering a service - who sent an email - …  Privacy  keeping information private - protect credit card information that is sent to a server - protect information sent in emails - …  Integrity  ensuring that information is not changed when transferred December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 2
    • HTTP Authentication  Native authentication functionality offered by HTTP  instead of directly sending a response for a given request, the server can always respond with an authentication challenge (401 status code)  HTTP is extensible to support different authentication protocols and offers the following two standard protocols  basic access authentication - simple Base64 encoding of the string <username>:<password>  digest access authentication  Protected resources can be grouped in security realms with different sets of authorised users or groups of users December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 3
    • Basic Access Authentication try to access a protected resource GET /wise/exam.pdf HTTP/1.0 Client ask password Client Internet HTTP/1.0 401 Authorization Required WWW-Authenticate: Basic realm="WISE" Server Server GET /wise/exam.pdf HTTP/1.0 Authorization: Basic YmVhdDpydWxleg== Client Client December 12, 2013 Server HTTP/1.0 200 OK Content-type: application/pdf Server Beat Signer - Department of Computer Science - bsigner@vub.ac.be 4
    • Base64 Encoding  Base64 encoding can be used to represent binary data in a portable format (alphabet)    used by MIME for content transfer encoding used to embed binary data in XML files (e.g. in XML-RPC) note that Base64 encoded data needs more space  Takes a sequence of bytes (8-bit) and breaks it into 6-bit chunks   padding with 0s to make it a multiple of 24 (LCM of 6 and 8) complete 6-bit padding chunks are represented by the special character '='  Each 6-bit chunk is then represented by a character from a 64-character alphabet December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 5
    • Base64 Encoding Example  Let us encode the string   Text N o Index Base64 19 38 60 T m 8 = char val char A 16 Q 32 g 48 w B 17 R 33 h 49 x 2 C 18 S 34 i 50 y 3 D 19 T 35 j 51 z 4 E 20 U 36 k 52 0 5 F 21 V 37 l 53 1 6 G 22 W 38 m 54 2 7 H 23 X 39 n 55 3 8 I 24 Y 40 o 56 4 9 J 25 Z 41 p 57 5 K 26 a 42 q 58 6 11 L 27 b 43 r 59 7 12 M 28 c 44 s 60 8 N 29 d 45 t 61 9 14 Bit Pattern 01001110 01101111 00000000 val 13 padding char 1 padding to 24 bit lookup of 6-bit chunks in index table use '=' for completely padded 6-bit chunks val 10  char 0 'Ja' to Base64 val O 30 e 46 u 62 + 15 P 31 f 47 v 63 / Base64 index table December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 6
    • Proxy Authentication  We can use the same authentication approach for controlling access to proxy servers  The proxy will return slightly different HTTP headers HTTP/1.0 407 Proxy Authentication Required Proxy-Authenticate: Basic realm="WISE" December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 7
    • Web Server Configuration  Example configuration for an Apache HTTP Server  Create a new password file (using the –c parameter) #htpasswd -c /usr/local/apache/admin/passwords nelson New password: nelson123 Re-type new password: nelson123 Adding password for user nelson  Put an .htaccess file with the configuration into the directory that has to be protected  alternatively add information to httpd.conf AuthType Basic AuthName "WISE" AuthUserFile /usr/local/apache/admin/passwords Require user nelson December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 8
    • Basic Access Authentication ...  Basic access authentication is not secure  username and password are sent almost in "cleartext" - Base64 value can be very easily decoded  easy to do replay attacks - simply reuse the username and the password  Potential solutions  combine the basic access authentication with an encrypted data transfer (e.g. via TLS/SSL) - does not prevent replay attacks  use of alternative digest access authentication December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 9
    • Digest Access Authentication  Password is no longer sent in cleartext   only a one-way digest that is computed out of the password (one-way hash function) is sent to the server Message Digest #5 (MD5) is a popular digest function  What about digest replay attacks?   server sends a special token (nonce) that changes frequently client adds the nonce to the password before computing the MD5 - any changes of the nonce result in changes of the digest which helps to prevent replay attacks h1 = MD5(username:realm:password) h2 = MD5(httpMethod:requestedURI) response = MD5(h1:nonce:h2) Computed response based on MD5 December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 10
    • Digest Access Authentication ... try to access a protected resource GET /wise/exam.pdf HTTP/1.0 Client ask password Client Client Client December 12, 2013 Internet HTTP/1.0 401 Unauthorized WWW-Authenticate: Digest realm="WISE", qop="auth,auth-int" nonce="6G543RED" GET /wise/exam.pdf HTTP/1.0 Authorization: Digest username="nelson", realm="WISE", nonce="6G543RED", qop="auth", response="HF779RW47R7HF", ... HTTP/1.0 200 OK Authorization-Info: nextnonce="7HZT7F6" ... Server Server Server Server Beat Signer - Department of Computer Science - bsigner@vub.ac.be 11
    • Digest Access Authentication ...  The Authorization-Info: nextnonce="..." is used to send the next nonce in advance  client can send the computed hash value already with the original request (preemptive authorization)  The quality of protection (qop) field is used to negotiate different protection mechanisms  auth - authentification  auth-int - authentification and message integrity protection - add an MD5 of the body December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 12
    • Transport Layer Security (TLS)  Cryptographic protocol to ensure secure network communication   successor of the Secure Socket Layer (SSL) protocol situated at the TCP/IP Application Layer or OSI Presentation Layer  Types of authentification  unilateral authentification - only server authentification  mutual authentification - client and server authentification 7 Application TLS Presentation SSL Session Transport Network Data Link Physical 6 5 4 3 2 1 OSI Reference Model December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 13
    • Transport Layer Security (TLS)  Features     server authentication client authentication confidentiality through data encryption data integrity  Protection against   man-in-the-middle attacks replay attacks December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 14
    • Cryptography  In cryptography a cipher (coding scheme) is used in combination with a key to create a ciphertext out of a plaintext  Cryptanalysis tries to get information out of the ciphertext without having access to the secret information (key) PHHW PH DW QLLQ key MEET ME AT NOON plaintext December 12, 2013 cipher (encoder) ciphertext key cipher (decoder) MEET ME AT NOON plaintext Beat Signer - Department of Computer Science - bsigner@vub.ac.be 15
    • Symmetric Key Cryptography  A symmetric key cipher uses the same key for the encoding and decoding of a plaintext message  Many existing symmetric key ciphers  DES, Triple DES, Blowfish, Rijndael/AES, ...  The algorithms are often common knowledge and the key is the only secret thing  key has to be kept secret  Brute force attack (enumeration attack) tries all keys  The key length defines the number of potential keys  e.g. 128 bit key considered safe today - can change with more powerful machines December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 16
    • Symmetric Key Cryptography ...  One problem of symmetric key cryptography is that we have to secretly share the common key before we can exchange any messages   this has to be repeated with different keys for any two partners willing to establish a secret communication how should we establish the exchange over the Internet? - insecure channel  where should we secretly store all those keys? December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 17
    • Public Key Cryptography  Instead of a single key, public key cryptography uses an asymmetric pair of keys   publicly available key for the encoding secret key for the decoding  Each party has only a single public key which is used by everybody to encode messages to this party  only the receiver can decode message with their private key hJ7FHDu KJF Z8e fsdlgi public key B A MEET ME AT NOON plaintext December 12, 2013 cipher (encoder) ciphertext private key B cipher (decoder) MEET ME AT NOON B plaintext Beat Signer - Department of Computer Science - bsigner@vub.ac.be 18
    • Public Key Cryptography ...  Public key cryptography can be used to establish secure Internet connections to any computer around the world without having to secretly share a key beforehand  An asymmetric public key cipher has to ensure that an attacker cannot compute the private key based on any information they can intercept   public key ciphertext (with corresponding plaintext) - can easily be created by any party by using the public key  A well known public key algorithm is the RSA cipher December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 19
    • RSA Cipher (Rivest, Shamir and Adleman)  Public-key cipher that can be used for encryption as well as signing  published in 1978 by Rivest, Shamir and Adleman while they were at MIT  The public and private keys are Adi Shamir, Ron Rivest and Len Adleman generated based on two large distinct prime numbers    the potential attacker will know about the product of the two prime numbers but nothing about the numbers themselves use modular arithmetic for the encoding/decoding as long as the attacker is not able to do a factorisation into the two prime numbers, RSA is assumed to be secure December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 20
    • Public Key Cryptography ...  A drawback of asymmetric public key cryptography is the fact that the algorithms are much slower than symmetric ciphers  Hybrid solutions combine public key with symmetric key cryptography   the public key encryption is only used in the setup phase to securely exchange a pair of symmetric keys afterwards a secure channel is established based on the symmetric keys  Security of public key cryptography?  new developments (e.g. quantum computing) might break public key cryptography December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 21
    • Digital Signatures  A digital signature can be used for two purposes   to prove the authenticity of a message to guarantee that a message has not been changed during the transfer (integrity)  Sender creates a plaintext digest, encodes it with the private key and adds it as a signature to the message  the receiver creates the same digest and compares it with the decoded signature plaintext plaintext plaintext B A digest digest signature cipher private key A December 12, 2013 digest same? cipher public key A Beat Signer - Department of Computer Science - bsigner@vub.ac.be 22
    • Digital Certificates  Information about a person/company that is digitally signed by a certificate authority (CA)     owner's name validity time signature of the CA owner's public key December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 23
    • Digital Certificates ...  No single standard but most certificates store their information in the X.509 v3 certificate standard form  Basically digital certificates can be used on the server side as well as on the client side  in practice client-side certificates are not often used December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 24
    • HTTP Secure (HTTPS)  Secure version of HTTP   combines HTTP with asymmetric, symmetric and certificatebased cryptography HTTP sent over TLS/SSL  HTTPS protocol is selected by the https:// URL prefix  Browser connects to the HTTPS default port (port 443)  Initial SSL handshake - negotiate protocol versions - negotiate common cipher - authentication - generate temporary symmetric session keys December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 25
    • Email Security  Emails are generally sent as unencrypted plain text  An email is stored on multiple intermediary servers before reaching its target   relatively easy to intercept would you also put anything you write in an email on a postcard?  Note that the sender of an email can easily be faked  If we want to fix these problems we have to use thirdparty tools such as Pretty Good Privacy (PGP)  privacy - strong encryption  authentication - digital signatures December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 26
    • Email SPAM  Abuse of an electronic messaging system (email) to deliver unwanted messages  A major part of all SPAM is sent by only a few hundred spammers  It is estimated that SPAM costs businesses more than 100 billion dollars per year  SPAM is illegal in many countries and some spammers have already been sentenced to jail  "Solutions"   SPAM filters micropayments for emails December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 27
    • Email SPAM ...  Phishing attacks   send emails that look like coming from an official authority and contain a request for sensitive data (e.g. password) send emails with links to websites that look like official companies (e.g. your homebank)  Spammers often use botnets to send their SPAM December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 28
    • Botnets  Computers infected by malicious software become part of a large botnet that can be remotely controlled  the largest botnets contain more than 1 million machines  An attacker can buy part of such a botnet to perform various harmful tasks including   the distribution of SPAM distributed denial of service attacks (DDOS)  Distributed denial of service attacks are a very powerful weapon as it has for example been shown when Estonia was attacked in May 2007  cannot easily be detected and filtered by firewalls since the traffic is created by many different machines December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 29
    • Firewalls Internet Firewall Client Server  Software and hardware firewalls introduce artifical "bottlenecks" that have to be passed by all the traffic    block specific ports filter and block content protect private intranets from incoming Internet traffic - often only a subnetwork (demilitarised zone) is connected to the Internet December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 30
    • Privacy  While users access information over the Internet, there is a continuous logging of their requests  Each server stores information about clients who accessed specific resources  Data mining techniques can be used to combine this logging information and create user profiles  can for example be used for user-targeted advertising  Users also "deliberately" publish personal information  e.g. on Facebook  Published information often cannot be easily deleted  e.g. still accessible via Internet Archive (http://www.archive.org) December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 31
    • Web Log  Log entry created every time a web server is accessed  A log entry typically contains information about     IP address of the requesting machine accessed URL request time refer link (previous page accessed by the client) - sent as part of the HTTP Request    browser type errors that occured ... December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 32
    • Web Log  Web logs can be combined with other information  e.g. login information can be used to reveal a user's identity  Refer link   enables access to potentially private information e.g. if previous request was an HTML form request using the GET method then all the data will be available as part of the URL XXX.XXX.XXX.193 - - [02/Dec/2009:05:50:40 +0100] "GET /knives-shun-c-81_114-l-en.html?gclid=CLOFucf5tp4CFc5L5Qod8jQzpA HTTP/1.1" 200 65478 "http://guelph.kijiji.ca/f-Shun-Classifieds-W0QQKeywordZShunQQisSearchFormZtrue" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15" XXX.XXX.XXX.116 - - [02/Dec/2009:05:50:42 +0100] "GET /images/Jamie%20Oliver/flavourShakerSchwarz.jpg HTTP/1.1" 200 3594 "http://www.tenera.ch/kenwood-pasta-roller-at970a-for-lasagne-base-unit-p-1314-l-en.html" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; .NET CLR 1.1.4322; MS-RTC LM 8; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)" XXX.XXX.XXX.139 - - [02/Dec/2009:05:52:19 +0100] "GET /stylesheet.css HTTP/1.1" 200 10185 "http://www.tenera.ch/kai-seki-magoroku-redwoodnakirimesser-165-cm-p-1433-l-de.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) )" XXX.XXX.XXX.139 - - [02/Dec/2009:05:52:19 +0100] "GET /kai-seki-magoroku-redwood-nakirimesser-165-cm-p-1433-l-de.html HTTP/1.1" 200 60636 "http://www.google.ch/search?hl=de&source=hp&q=seki+magoroku&meta=&aq=0&oq=seki+ma" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) )" XXX.XXX.XXX.139 - - [02/Dec/2009:05:52:21 +0100] "GET /images/pixel_trans.gif HTTP/1.1" 200 43 "http://www.tenera.ch/kai-seki-magoroku-redwoodnakirimesser-165-cm-p-1433-l-de.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) )" ... web log with refer links December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 33
    • Web Log File Analysis  Site owner can use various tools to analyse the log files  e.g. Webalizer  How much information do we give away when accessing a website?  What is happening with the logged data?   combined with other information to reveal IP addresses? combined with log files from other sites? - user profiling  intended use of data should be mentioned in the privacy policy December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 34
    • Cookies Revisited  Persistent cookies can be used to track a user over time  similar to IP address but more precise  Third-party cookies can be used to build an anonymous user profile  if a website contains elements that have to be accessed from another server (e.g. banner ads), then the server can set a cookie - the third-party server creates a unique resource URL for every page on which the resource has been embedded - the user can be tracked on any site that uses the same service (e.g. banner ads) and an anonymous user profile can be created  Cookies should not be used for authentication  can be modified by a user to forge identity (cookie poisoning) December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 35
    • Web Bugs  User tracking based on the same idea as with third-party cookies  Embed a small object (e.g. 1 pixel image) in a webpage and get informed every time the webpage is accessed  request containing the IP address is sent to the server  The web bugs approach cannot only be used for webpages but also for other resources such as email, Word documents etc.  if the user reads an email containing an embedded HTML web bug, the server knows when the email has been read but also gets information about the IP address of the mail client December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 36
    • Other Services with Privacy Issues  Google Earth shows a lot of sensitive information  e.g. military bases etc.  Google Street View shows not only streets and buildings but also citizens   privacy of individuals might be violated since they are shown at strange places or in weird situations since the blurring of faces and number plates does not always work, some countries would like to stop the service  Many other free services from Google as well as other companies harvest personal information and use it, for example, for customer-targeted advertising December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 37
    • Video: Google Analytics December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 38
    • Google Analytics  Very nice tool for web administrators to analyse their web traffic   easy to "install" over the Web website administrators have to add a piece of JavaScript code to their website - similar to web bug approach shown earlier  Google gets information about site visitors  While a user can normally choose to use a free service (e.g. Gmail) or not, the user has no choice when it comes to the tracking via Google Analytics  How save is the captured data?  what if somebody manages to steal the data? December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 39
    • Exercise 11  Security December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 40
    • References  David Gourley et al., HTTP: The Definitive Guide, O'Reilly Media, September 2002  Google Analytics Video  http://www.youtube.com/watch?v=rHeKRvo6OhI  R.L. Rivest, A. Shamir and L. Adleman, A Method for Obtaining Digital Signatures and Public-Key Cryptosystems Authentication, Communications of the ACM, February 1978 December 12, 2013 Beat Signer - Department of Computer Science - bsigner@vub.ac.be 41
    • Next Lecture Future Trends and Summary 2 December 2005