SlideShare une entreprise Scribd logo
1  sur  17
COOKIES
HTTP STATE MANAGEMENT MECHANISM
OUR TEAM
Bibek Subedi, 066 BCT 506
Dinesh Subedi, 066 BCT 512 Laxmi Kadariya, 066 BCT 518
Jivan Nepali, 066 BCT 517
June 19, 2013
PRESENTATION OUTLINE
 INTRODUCTION – Definition, Types, Purpose, Syntax & Semantics of Cookies
 COOKIE TECHNOLOGY – Components, Working Principle & Storage Model
 COOKIE: PRIVACY CONSIDERATIONS
 COOKIE: SECURITY CONSIDERATIONS
 COOKIE AUTHENTICATION GUIDELINES
INTRODUCTION
 A “cookie” is a small piece of information sent by a web server to store
on a web browser so it can later be read back from that browser. This is
useful for having the browser remember some specific information.
 Cookies were designed to be a reliable mechanism for websites to
remember the state of the website or activity the user had taken in the
past
 Although cookies cannot carry viruses, and cannot install malware on
the host computer, tracking cookies and especially third-party tracking
cookies are commonly used as ways to compile long-term records of
individuals’ browsing histories – Privacy Concern
PURPOSE OF COOKIES
 Cookies make the interaction between users and web sites faster and easier
 Web sites often use cookies of the purpose of collecting demographic information
about their users.
 Cookies enable web sites to monitor their users’ web surfing habits and profile
them for marketing purposes
 With the increasing commercial applications of the Internet, it was probably
inevitable that cookies would quickly be utilized for advertising purposes.
 Since cookies can be matched to the profile of a user’s interests and browsing
habits, they are a natural tool for the “targeting” of advertisements to individual
users.
TYPES OF COOKIES
 Session or Transient cookies
Cookies that are stored in the computer’s memory only during a user’s
browsing session and are automatically deleted form the user’s computer
when the browser is closed.
 Permanent, Persistent or Stored cookies
Permanent cookies can be used to identify individual users, so they may
be used by web sites to analyze users’ surfing behavior within the web
site. They are usually configured to keep track of users for a prolonged
period of time, in some cases many years into the future.
SYNTAX & SEMANTICS OF
COOKIES
1. Cookie Name
◦ public String getName();
◦ public void setName(String name);
2. Cookie Value
◦ public String getValue();
◦ public void setValue(String value);
3. Cookie Version
◦ public String getVersion();
◦ pulic void setVersion(String domain);
4. Cookie Age
◦ public in getMaxAge();
◦ public void setMaxAge(int lifetime);
EXAMPLE- SYNTAX &
SEMANTICS (Java)
Creating a Cookie
Step 1: Create a Cookie instance by calling the
Constructor
Cookie cookie = new Cookie()
Step 2: Set the name and value of the Cookie
cookie.setName(“ID”);
cookie.setValue(5);
(Both step can be done directly using Cookie
cookie = new Cookie(“ID”,5)
Step 3: Set and maximum age and version of
Cookie
cookie.setMaxAge(2500);
cookie.setVersion(1);
Step 4: Finally add the cookie object to the
response object
Response.addCookie(cookie);
COOKIE COMPONENTS
 HTTP is stateless. But, if an website wants to keep track the
identity of its user, then HTTP uses cookie for this purpose.
 Cookie technology has following four components
o A cookie header line in the HTTP response message
o A cookie header line in the HTTP request message
o A cookie file kept in the user’s end system & managed by the user’s
browser
o A back-end database at the website
WORKING PRINCIPLE:USER-SERVER
INTERACTION
 Suppose Susan, who always accesses the Web using Internet Explorer
from her home PC, contacts amazon.com for the first time.
 Let us suppose that in the past she has already visited the eBay site –
ebay.com.
 When the HTTP request comes in the Amazon’s web server, it creates
◦ unique Identification number
◦ entry in backend database that is indexed by the Identification number
for Susan
WORKING PRINCIPLE CONTD…
Figure : Keeping user ‘state’
using cookies
WORKING PRINCIPLE CONTD…
WHAT COOKIES CAN BRING
 Authorization
 Shopping carts
 Recommendations
 User session state (Web e-mail)
HOW TO KEEP STATE
 Protocol endpoints: maintain
state at sender/receiver over
multiple transactions
 Cookies: http messages carry
state
PRIVACY CONSIDERATIONS
 Third party cookies
if a user visits a site that contains content from a third party and then later visits
another site that contains content from the same third party, the third party can track
the user between the two sites
 User controls
User agents SHOULD provide users with a mechanism for managing the cookies stored
in the cookie store
 Expiration dates
Although servers can set the expiration date for cookies to the distant future, most
user agents do not actually retain cookies for multiple decades
SECURITY CONSIDERATIONS
 Ambient authority
 Clear text
 Session identifier
 Weak confidentiality
 Weak integrity
COOKIE AUTHENTICATION
GUIDELINES
 Use SSL for username/password authentication
 Do not store plain text or weakly encrypted password in a cookie
 The cookie should not be re-used or re-used easily by another person
 Password or other confidential info should not be able to be extracted from
the cookie
 Cookie authentication credential should NOT be valid for an over extended
length of times
 Set up “booby trapped” session tokens that never actually get assigned but will
detect if an attacker is trying to brute force a range of tokens.
COOKIE AUTHENTICATION GUIDELINES
CONTD…
(Whenever possible) Tie cookie authentication to an IP address (part or all
of the IP address)
 Adding “salt” to your cookie (e.g. hashed http header of a particular
browser, MAC address)
 Re-authenticate whenever critical decisions are made
 Over write tokens upon logout.
 Consider using server side cache to store session information, only retain
an index to the cache on the client side (also use ‘booby trapped’ indices)
Thank
You!
Questions & Answers Session

Contenu connexe

Tendances

Internet Cookies
Internet CookiesInternet Cookies
Internet Cookiesanita gouda
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Amit Tyagi
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTIONAnoop T
 
Owasp Top 10 And Security Flaw Root Causes
Owasp Top 10 And Security Flaw Root CausesOwasp Top 10 And Security Flaw Root Causes
Owasp Top 10 And Security Flaw Root CausesMarco Morana
 
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...Lenur Dzhemiliev
 
Authentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVCAuthentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVCMindfire Solutions
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
Web authentication & authorization
Web authentication & authorizationWeb authentication & authorization
Web authentication & authorizationAlexandru Pasaila
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
 
Web sockets - Pentesting
Web sockets - Pentesting Web sockets - Pentesting
Web sockets - Pentesting Vandana Verma
 
Real Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.ioReal Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.ioMindfire Solutions
 
Sql injections - with example
Sql injections - with exampleSql injections - with example
Sql injections - with examplePrateek Chauhan
 

Tendances (20)

Secure Session Management
Secure Session ManagementSecure Session Management
Secure Session Management
 
Http
HttpHttp
Http
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 
Internet Cookies
Internet CookiesInternet Cookies
Internet Cookies
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)
 
SQL INJECTION
SQL INJECTIONSQL INJECTION
SQL INJECTION
 
Owasp Top 10 And Security Flaw Root Causes
Owasp Top 10 And Security Flaw Root CausesOwasp Top 10 And Security Flaw Root Causes
Owasp Top 10 And Security Flaw Root Causes
 
Click jacking
Click jackingClick jacking
Click jacking
 
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
 
Authentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVCAuthentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVC
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Web authentication & authorization
Web authentication & authorizationWeb authentication & authorization
Web authentication & authorization
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
Cookie and session
Cookie and sessionCookie and session
Cookie and session
 
Web sockets - Pentesting
Web sockets - Pentesting Web sockets - Pentesting
Web sockets - Pentesting
 
HTTP Security Headers
HTTP Security HeadersHTTP Security Headers
HTTP Security Headers
 
Real Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.ioReal Time Communication using Node.js and Socket.io
Real Time Communication using Node.js and Socket.io
 
Sql injections - with example
Sql injections - with exampleSql injections - with example
Sql injections - with example
 
Presentation on Web Attacks
Presentation on Web AttacksPresentation on Web Attacks
Presentation on Web Attacks
 

Similaire à Cookies: HTTP state management mechanism

What Is Evercookie and Why You Should Avoid It for Privacy’s Sake
What Is Evercookie and Why You Should Avoid It for Privacy’s SakeWhat Is Evercookie and Why You Should Avoid It for Privacy’s Sake
What Is Evercookie and Why You Should Avoid It for Privacy’s SakePiwik PRO
 
Cookie replay attack unit wise presentation
Cookie replay attack  unit wise presentationCookie replay attack  unit wise presentation
Cookie replay attack unit wise presentationNilu Desai
 
Cookies and Session
Cookies and SessionCookies and Session
Cookies and SessionKoraStats
 
Enterprise java unit-2_chapter-2
Enterprise  java unit-2_chapter-2Enterprise  java unit-2_chapter-2
Enterprise java unit-2_chapter-2sandeep54552
 
Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servletsvishal choudhary
 
Sea surfing in asp.net mvc
Sea surfing in asp.net mvcSea surfing in asp.net mvc
Sea surfing in asp.net mvcmagda3695
 
Cyber ethics cbse class xi
Cyber ethics cbse class xiCyber ethics cbse class xi
Cyber ethics cbse class xiArchana Dwivedi
 
Cookie & Session In ASP.NET
Cookie & Session In ASP.NETCookie & Session In ASP.NET
Cookie & Session In ASP.NETShingalaKrupa
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior
 
Overview of Cookies in HTTP - Miran al Mehrab
Overview of Cookies in HTTP - Miran al MehrabOverview of Cookies in HTTP - Miran al Mehrab
Overview of Cookies in HTTP - Miran al MehrabCefalo
 
Cookies authentication
Cookies authenticationCookies authentication
Cookies authenticationRsilwal123
 
A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...
A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...
A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...kalichargn70th171
 

Similaire à Cookies: HTTP state management mechanism (20)

16 cookies
16 cookies16 cookies
16 cookies
 
What Is Evercookie and Why You Should Avoid It for Privacy’s Sake
What Is Evercookie and Why You Should Avoid It for Privacy’s SakeWhat Is Evercookie and Why You Should Avoid It for Privacy’s Sake
What Is Evercookie and Why You Should Avoid It for Privacy’s Sake
 
Cookies
CookiesCookies
Cookies
 
Internet cookies
Internet cookiesInternet cookies
Internet cookies
 
Cookie replay attack unit wise presentation
Cookie replay attack  unit wise presentationCookie replay attack  unit wise presentation
Cookie replay attack unit wise presentation
 
Cookies-PHP
Cookies-PHPCookies-PHP
Cookies-PHP
 
Cookies and Session
Cookies and SessionCookies and Session
Cookies and Session
 
Enterprise java unit-2_chapter-2
Enterprise  java unit-2_chapter-2Enterprise  java unit-2_chapter-2
Enterprise java unit-2_chapter-2
 
Sessions&cookies
Sessions&cookiesSessions&cookies
Sessions&cookies
 
Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servlets
 
Sea surfing in asp.net mvc
Sea surfing in asp.net mvcSea surfing in asp.net mvc
Sea surfing in asp.net mvc
 
Cyber ethics cbse class xi
Cyber ethics cbse class xiCyber ethics cbse class xi
Cyber ethics cbse class xi
 
Session,cookies
Session,cookiesSession,cookies
Session,cookies
 
Cookie & Session In ASP.NET
Cookie & Session In ASP.NETCookie & Session In ASP.NET
Cookie & Session In ASP.NET
 
APEX & Cookie Monster
APEX & Cookie MonsterAPEX & Cookie Monster
APEX & Cookie Monster
 
Session and cookies,get and post methods
Session and cookies,get and post methodsSession and cookies,get and post methods
Session and cookies,get and post methods
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessions
 
Overview of Cookies in HTTP - Miran al Mehrab
Overview of Cookies in HTTP - Miran al MehrabOverview of Cookies in HTTP - Miran al Mehrab
Overview of Cookies in HTTP - Miran al Mehrab
 
Cookies authentication
Cookies authenticationCookies authentication
Cookies authentication
 
A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...
A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...
A Comprehensive Guide to Cookie Management Using HeadSpin's Cutting-Edge Remo...
 

Plus de Jivan Nepali

Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and SparkCrystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and SparkJivan Nepali
 
Library System Implementation with JavaFx
Library System Implementation with JavaFxLibrary System Implementation with JavaFx
Library System Implementation with JavaFxJivan Nepali
 
Warehouse based Intelligent Banking Transaction Analysis System
Warehouse based Intelligent Banking Transaction Analysis SystemWarehouse based Intelligent Banking Transaction Analysis System
Warehouse based Intelligent Banking Transaction Analysis SystemJivan Nepali
 
Tourism market segmentation in context of nepal
Tourism market segmentation in context of nepalTourism market segmentation in context of nepal
Tourism market segmentation in context of nepalJivan Nepali
 
Decision Support and Knowledge Based Systems
Decision Support and Knowledge Based SystemsDecision Support and Knowledge Based Systems
Decision Support and Knowledge Based SystemsJivan Nepali
 
Grid computing the grid
Grid computing the gridGrid computing the grid
Grid computing the gridJivan Nepali
 
Restaurant Guide: A GPS based Android App
Restaurant Guide: A GPS based Android AppRestaurant Guide: A GPS based Android App
Restaurant Guide: A GPS based Android AppJivan Nepali
 
Project time management
Project time managementProject time management
Project time managementJivan Nepali
 

Plus de Jivan Nepali (8)

Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and SparkCrystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
Crystal Ball Event Prediction and Log Analysis with Hadoop MapReduce and Spark
 
Library System Implementation with JavaFx
Library System Implementation with JavaFxLibrary System Implementation with JavaFx
Library System Implementation with JavaFx
 
Warehouse based Intelligent Banking Transaction Analysis System
Warehouse based Intelligent Banking Transaction Analysis SystemWarehouse based Intelligent Banking Transaction Analysis System
Warehouse based Intelligent Banking Transaction Analysis System
 
Tourism market segmentation in context of nepal
Tourism market segmentation in context of nepalTourism market segmentation in context of nepal
Tourism market segmentation in context of nepal
 
Decision Support and Knowledge Based Systems
Decision Support and Knowledge Based SystemsDecision Support and Knowledge Based Systems
Decision Support and Knowledge Based Systems
 
Grid computing the grid
Grid computing the gridGrid computing the grid
Grid computing the grid
 
Restaurant Guide: A GPS based Android App
Restaurant Guide: A GPS based Android AppRestaurant Guide: A GPS based Android App
Restaurant Guide: A GPS based Android App
 
Project time management
Project time managementProject time management
Project time management
 

Dernier

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 

Dernier (20)

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 

Cookies: HTTP state management mechanism

  • 2. OUR TEAM Bibek Subedi, 066 BCT 506 Dinesh Subedi, 066 BCT 512 Laxmi Kadariya, 066 BCT 518 Jivan Nepali, 066 BCT 517 June 19, 2013
  • 3. PRESENTATION OUTLINE  INTRODUCTION – Definition, Types, Purpose, Syntax & Semantics of Cookies  COOKIE TECHNOLOGY – Components, Working Principle & Storage Model  COOKIE: PRIVACY CONSIDERATIONS  COOKIE: SECURITY CONSIDERATIONS  COOKIE AUTHENTICATION GUIDELINES
  • 4. INTRODUCTION  A “cookie” is a small piece of information sent by a web server to store on a web browser so it can later be read back from that browser. This is useful for having the browser remember some specific information.  Cookies were designed to be a reliable mechanism for websites to remember the state of the website or activity the user had taken in the past  Although cookies cannot carry viruses, and cannot install malware on the host computer, tracking cookies and especially third-party tracking cookies are commonly used as ways to compile long-term records of individuals’ browsing histories – Privacy Concern
  • 5. PURPOSE OF COOKIES  Cookies make the interaction between users and web sites faster and easier  Web sites often use cookies of the purpose of collecting demographic information about their users.  Cookies enable web sites to monitor their users’ web surfing habits and profile them for marketing purposes  With the increasing commercial applications of the Internet, it was probably inevitable that cookies would quickly be utilized for advertising purposes.  Since cookies can be matched to the profile of a user’s interests and browsing habits, they are a natural tool for the “targeting” of advertisements to individual users.
  • 6. TYPES OF COOKIES  Session or Transient cookies Cookies that are stored in the computer’s memory only during a user’s browsing session and are automatically deleted form the user’s computer when the browser is closed.  Permanent, Persistent or Stored cookies Permanent cookies can be used to identify individual users, so they may be used by web sites to analyze users’ surfing behavior within the web site. They are usually configured to keep track of users for a prolonged period of time, in some cases many years into the future.
  • 7. SYNTAX & SEMANTICS OF COOKIES 1. Cookie Name ◦ public String getName(); ◦ public void setName(String name); 2. Cookie Value ◦ public String getValue(); ◦ public void setValue(String value); 3. Cookie Version ◦ public String getVersion(); ◦ pulic void setVersion(String domain); 4. Cookie Age ◦ public in getMaxAge(); ◦ public void setMaxAge(int lifetime);
  • 8. EXAMPLE- SYNTAX & SEMANTICS (Java) Creating a Cookie Step 1: Create a Cookie instance by calling the Constructor Cookie cookie = new Cookie() Step 2: Set the name and value of the Cookie cookie.setName(“ID”); cookie.setValue(5); (Both step can be done directly using Cookie cookie = new Cookie(“ID”,5) Step 3: Set and maximum age and version of Cookie cookie.setMaxAge(2500); cookie.setVersion(1); Step 4: Finally add the cookie object to the response object Response.addCookie(cookie);
  • 9. COOKIE COMPONENTS  HTTP is stateless. But, if an website wants to keep track the identity of its user, then HTTP uses cookie for this purpose.  Cookie technology has following four components o A cookie header line in the HTTP response message o A cookie header line in the HTTP request message o A cookie file kept in the user’s end system & managed by the user’s browser o A back-end database at the website
  • 10. WORKING PRINCIPLE:USER-SERVER INTERACTION  Suppose Susan, who always accesses the Web using Internet Explorer from her home PC, contacts amazon.com for the first time.  Let us suppose that in the past she has already visited the eBay site – ebay.com.  When the HTTP request comes in the Amazon’s web server, it creates ◦ unique Identification number ◦ entry in backend database that is indexed by the Identification number for Susan
  • 11. WORKING PRINCIPLE CONTD… Figure : Keeping user ‘state’ using cookies
  • 12. WORKING PRINCIPLE CONTD… WHAT COOKIES CAN BRING  Authorization  Shopping carts  Recommendations  User session state (Web e-mail) HOW TO KEEP STATE  Protocol endpoints: maintain state at sender/receiver over multiple transactions  Cookies: http messages carry state
  • 13. PRIVACY CONSIDERATIONS  Third party cookies if a user visits a site that contains content from a third party and then later visits another site that contains content from the same third party, the third party can track the user between the two sites  User controls User agents SHOULD provide users with a mechanism for managing the cookies stored in the cookie store  Expiration dates Although servers can set the expiration date for cookies to the distant future, most user agents do not actually retain cookies for multiple decades
  • 14. SECURITY CONSIDERATIONS  Ambient authority  Clear text  Session identifier  Weak confidentiality  Weak integrity
  • 15. COOKIE AUTHENTICATION GUIDELINES  Use SSL for username/password authentication  Do not store plain text or weakly encrypted password in a cookie  The cookie should not be re-used or re-used easily by another person  Password or other confidential info should not be able to be extracted from the cookie  Cookie authentication credential should NOT be valid for an over extended length of times  Set up “booby trapped” session tokens that never actually get assigned but will detect if an attacker is trying to brute force a range of tokens.
  • 16. COOKIE AUTHENTICATION GUIDELINES CONTD… (Whenever possible) Tie cookie authentication to an IP address (part or all of the IP address)  Adding “salt” to your cookie (e.g. hashed http header of a particular browser, MAC address)  Re-authenticate whenever critical decisions are made  Over write tokens upon logout.  Consider using server side cache to store session information, only retain an index to the cache on the client side (also use ‘booby trapped’ indices)