SlideShare a Scribd company logo
HttpOnly Cookie
Something You Don’t Know About HTTP

             RDSS Team
              2012-04
Author


    兰七
    yuxia0025@gmail.com
About
RDSS
Research on Domain Specific Solution

We focus on existed specification, solution, production etc.
We put our research into practice.
Contents
•   Cookie Definition
•   HttpOnly Cookie
•   Browsers Supporting
•   Cross-site Scripting
•   XMLHTTPRequest
•   Finally
Cookie Definition
• A cookie, also known as an HTTP
  cookie, web cookie, or browser
  cookie, is a piece of data stored by a
  website within a browser, and then
  subsequently sent back to the same
  website by the browser




Refer: http://en.wikipedia.org/wiki/Http_cookie#HttpOnly_cookie
                                                                  6
HttpOnly Cookie
Definition
• HttpOnly is an additional flag included
  in a Set-Cookie HTTP response
  header.an HttpOnly session cookie
  will be used only when transmitting
  HTTP (or HTTPS) requests.




Refer: http://en.wikipedia.org/wiki/Http_cookie#HttpOnly_cookie
Born
   • HttpOnly cookies were first
     implemented in 2002 by Microsoft
     Internet Explorer developers for
     Internet Explorer 6 SP1




Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.
                                                                          9
   3F
Feather
   • restricting access from other non-
     HTTP APIs (such as JavaScript).

   • restriction mitigates but does not
     eliminate the threat of session cookie
     theft via cross-site scripting (XSS).


Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.
                                                                          10
   3F
Syntax
   • Set-Cookie: USER(key)=123(value);
     expires=Wednesday, 09-Nov-99
     23:12:40 GMT; HttpOnly




Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.
                                                                          11
   3F
Set httpOnly Using PHP
• Permanently. session.cookie_httponly
  = True (in php.iniPHP)

• Setcookie("testcookie", $value,
  time()+3600, "/", "www.xx.com", 0 , 1);




Refer: http://www.php.net/manual/en/function.setcookie.php
                                                             12
Browsers Supporting
Support
   • the cookie cannot be accessed
     through client side script, even if a
     cross-site scripting (XSS) flaw exists,
     and a user accidentally accesses a
     link that exploits this flaw, the browser
     (primarily Internet Explorer) will not
     reveal the cookie to a third party.


Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.
   3F
NOT Support
   • The HttpOnly flag will be ignored by
     the browser, thus creating a
     traditional, script accessible cookie.

       – document.cookie




Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.
   3F
Browsers Supporting HttpOnly Cookie

                    ie6   ie7      ie8     ie9     chrome   firefox   safari


    prevent write   yes   yes      yes     yes     yes      yes       yes



    prevent read    yes   yes      yes     yes     yes      yes       Yes




Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.
   3F
Refer: http://www.browserscope.org/security/test
WebGoat




Refer: http://code.google.com/p/webgoat/
Cross-Site Scripting
Browser
• is a server-side vulnerability that is often
  created when rendering user input as html.


• e.g. expose sensitive information
  about users of the web site




Refer: http://msdn.microsoft.com/en-us/library/ms533046.aspx
Example




Refer: http://msdn.microsoft.com/en-us/library/ms533046.aspx
XMLHTTPRequest
• getResponseHeader
• getAllResponseHeaders




Refer: http://ha.ckers.org/blog/20070719/firefox-implements-httponly-and-
   is-vulnerable-to-xmlhttprequest/
Set-Cookie && Set-Cookie2
• Set-Cookie defined in RFC 2109
• Set-Cookie2 defined in RFC 2965

• one & more key-value




Refer: http://www.ietf.org/rfc/rfc2965.txt
Fixed Browsers
• FireFox 3.0.0.6
• IE
• Safari5 && Chrome12

• FireFox ban all cookie
Test Tool
• Robert Hansens' HTTPOnly test page
  now includes set-cookie and set-
  cookie2 checks for
  XMLHTTPRequest exposure




Refer: http://ha.ckers.org/httponly.cgi.
Test Result
     ie6        ie7        ie8        ie9        chrome     firefox    safari


A    not        not        not        not        not        not        not
     httpOnly   httpOnly   httpOnly   httpOnly   httpOnly   httpOnly   httpOnly



B    not        not        not        not        no         no         no
     httpOnly   httpOnly   httpOnly   httpOnly



A - document,cookie
B - xhr api
Finally
HttpOnly Cookie
• Pros
• Cons

More Related Content

What's hot

Hacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorruHacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorruMichele Orru
 
Buried by time, dust and BeEF
Buried by time, dust and BeEFBuried by time, dust and BeEF
Buried by time, dust and BeEF
Michele Orru
 
Security talk: Fortifying your Joomla! website
Security talk: Fortifying your Joomla! websiteSecurity talk: Fortifying your Joomla! website
Security talk: Fortifying your Joomla! websiteSigsiu.NET
 
Defeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security PolicyDefeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security Policy
Francois Marier
 
Owning the bad guys
Owning the bad guys Owning the bad guys
Owning the bad guys
Santhosh Kumar
 
Demystifying REST
Demystifying RESTDemystifying REST
Demystifying REST
Kirsten Hunter
 
Google chrome presentation
Google chrome presentationGoogle chrome presentation
Google chrome presentationreza jalaluddin
 
CodeIgniter i18n Security Flaw
CodeIgniter i18n Security FlawCodeIgniter i18n Security Flaw
CodeIgniter i18n Security Flaw
Abbas Naderi
 
.htaccess Cheatsheet
.htaccess Cheatsheet.htaccess Cheatsheet
.htaccess Cheatsheet
Shankar Soma
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)
Jeremiah Grossman
 
Open edx developing x-blocks @ upvalencia (4)
Open edx   developing x-blocks @ upvalencia (4)Open edx   developing x-blocks @ upvalencia (4)
Open edx developing x-blocks @ upvalencia (4)
Carlos Turró Ribalta
 
Word press security checklist
Word press security checklistWord press security checklist
Word press security checklist
Sanjay Dabhoya
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek
4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek
4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek
PROIDEA
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)Rob Fuller
 
Web vulnerabilities
Web vulnerabilitiesWeb vulnerabilities
Web vulnerabilities
Oleksandr Kovalchuk
 
Practical Exploitation - Webappy Style
Practical Exploitation - Webappy StylePractical Exploitation - Webappy Style
Practical Exploitation - Webappy Style
Rob Fuller
 
Web Security - Cookies, Domains and CORS
Web Security - Cookies, Domains and CORSWeb Security - Cookies, Domains and CORS
Web Security - Cookies, Domains and CORS
Perfectial, LLC
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketbrent bucci
 

What's hot (20)

Hacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorruHacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorru
 
Buried by time, dust and BeEF
Buried by time, dust and BeEFBuried by time, dust and BeEF
Buried by time, dust and BeEF
 
Security talk: Fortifying your Joomla! website
Security talk: Fortifying your Joomla! websiteSecurity talk: Fortifying your Joomla! website
Security talk: Fortifying your Joomla! website
 
Defeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security PolicyDefeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security Policy
 
Owning the bad guys
Owning the bad guys Owning the bad guys
Owning the bad guys
 
Demystifying REST
Demystifying RESTDemystifying REST
Demystifying REST
 
Google chrome presentation
Google chrome presentationGoogle chrome presentation
Google chrome presentation
 
CodeIgniter i18n Security Flaw
CodeIgniter i18n Security FlawCodeIgniter i18n Security Flaw
CodeIgniter i18n Security Flaw
 
.htaccess Cheatsheet
.htaccess Cheatsheet.htaccess Cheatsheet
.htaccess Cheatsheet
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)
 
Open edx developing x-blocks @ upvalencia (4)
Open edx   developing x-blocks @ upvalencia (4)Open edx   developing x-blocks @ upvalencia (4)
Open edx developing x-blocks @ upvalencia (4)
 
Word press security checklist
Word press security checklistWord press security checklist
Word press security checklist
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek
4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek
4Developers 2015: Bypassing Same-Origin Policy - Jakub Żoczek
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
 
Web vulnerabilities
Web vulnerabilitiesWeb vulnerabilities
Web vulnerabilities
 
Practical Exploitation - Webappy Style
Practical Exploitation - Webappy StylePractical Exploitation - Webappy Style
Practical Exploitation - Webappy Style
 
Web Security - Cookies, Domains and CORS
Web Security - Cookies, Domains and CORSWeb Security - Cookies, Domains and CORS
Web Security - Cookies, Domains and CORS
 
Cookie
CookieCookie
Cookie
 
V2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocketV2 peter-lubbers-sf-jug-websocket
V2 peter-lubbers-sf-jug-websocket
 

Viewers also liked

[Utsoa] Enews 4.11.2008
[Utsoa] Enews 4.11.2008[Utsoa] Enews 4.11.2008
[Utsoa] Enews 4.11.2008duanehutson
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessionssalissal
 
Agenda 21 eu cookie seminar - david naylor - field fisher waterhouse
Agenda 21   eu cookie seminar - david naylor - field fisher waterhouseAgenda 21   eu cookie seminar - david naylor - field fisher waterhouse
Agenda 21 eu cookie seminar - david naylor - field fisher waterhouseagenda21
 
Php file upload, cookies & session
Php file upload, cookies & sessionPhp file upload, cookies & session
Php file upload, cookies & sessionJamshid Hashimi
 
2014 troop cookie manager training power point
2014 troop cookie manager training power point2014 troop cookie manager training power point
2014 troop cookie manager training power point
Teresa Stephens
 
The Cookie Jar Theatre and Milton Parsons Chatsworth California
The Cookie Jar Theatre and Milton Parsons Chatsworth CaliforniaThe Cookie Jar Theatre and Milton Parsons Chatsworth California
The Cookie Jar Theatre and Milton Parsons Chatsworth California
Chatsworth Historical Society
 

Viewers also liked (6)

[Utsoa] Enews 4.11.2008
[Utsoa] Enews 4.11.2008[Utsoa] Enews 4.11.2008
[Utsoa] Enews 4.11.2008
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 
Agenda 21 eu cookie seminar - david naylor - field fisher waterhouse
Agenda 21   eu cookie seminar - david naylor - field fisher waterhouseAgenda 21   eu cookie seminar - david naylor - field fisher waterhouse
Agenda 21 eu cookie seminar - david naylor - field fisher waterhouse
 
Php file upload, cookies & session
Php file upload, cookies & sessionPhp file upload, cookies & session
Php file upload, cookies & session
 
2014 troop cookie manager training power point
2014 troop cookie manager training power point2014 troop cookie manager training power point
2014 troop cookie manager training power point
 
The Cookie Jar Theatre and Milton Parsons Chatsworth California
The Cookie Jar Theatre and Milton Parsons Chatsworth CaliforniaThe Cookie Jar Theatre and Milton Parsons Chatsworth California
The Cookie Jar Theatre and Milton Parsons Chatsworth California
 

Similar to Http only cookie

Ce hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsersCe hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsers
Vi Tính Hoàng Nam
 
APEX & Cookie Monster
APEX & Cookie MonsterAPEX & Cookie Monster
APEX & Cookie Monster
Christian Rokitta
 
Building Secure User Interfaces With JWTs
Building Secure User Interfaces With JWTsBuilding Secure User Interfaces With JWTs
Building Secure User Interfaces With JWTs
robertjd
 
Php 07-cookies-sessions
Php 07-cookies-sessionsPhp 07-cookies-sessions
Php 07-cookies-sessions
YUSRA FERNANDO
 
Cookies & Session
Cookies & SessionCookies & Session
HTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implicationsHTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implications
Priyanka Aash
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessionsSukrit Gupta
 
Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud Developers
Brian Huff
 
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Ivo Andreev
 
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Codemotion
 
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Thijs Feryn
 
Flashack
FlashackFlashack
Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5DefconRussia
 
[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers
OWASP
 
Peter lubbers-html5-offline-web-apps
Peter lubbers-html5-offline-web-appsPeter lubbers-html5-offline-web-apps
Peter lubbers-html5-offline-web-appsSkills Matter
 
PHP COOKIES AND SESSIONS
PHP COOKIES AND SESSIONSPHP COOKIES AND SESSIONS
PHP COOKIES AND SESSIONS
Degu8
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJS
robertjd
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
chuckbt
 

Similar to Http only cookie (20)

Ce hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsersCe hv6 module 53 hacking web browsers
Ce hv6 module 53 hacking web browsers
 
APEX & Cookie Monster
APEX & Cookie MonsterAPEX & Cookie Monster
APEX & Cookie Monster
 
Building Secure User Interfaces With JWTs
Building Secure User Interfaces With JWTsBuilding Secure User Interfaces With JWTs
Building Secure User Interfaces With JWTs
 
Php 07-cookies-sessions
Php 07-cookies-sessionsPhp 07-cookies-sessions
Php 07-cookies-sessions
 
Cookies & Session
Cookies & SessionCookies & Session
Cookies & Session
 
HTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implicationsHTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implications
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 
Top 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud Developers
 
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
Going Beyond Cross Domain Boundaries (jQuery Bulgaria)
 
Internet test
Internet testInternet test
Internet test
 
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Thijs Feryn - Codemotion Rome 2018
 
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
Leverage HTTP to deliver cacheable websites - Codemotion Rome 2018
 
Flashack
FlashackFlashack
Flashack
 
Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5Krzysztof Kotowicz - Hacking HTML5
Krzysztof Kotowicz - Hacking HTML5
 
[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers
 
Peter lubbers-html5-offline-web-apps
Peter lubbers-html5-offline-web-appsPeter lubbers-html5-offline-web-apps
Peter lubbers-html5-offline-web-apps
 
PHP COOKIES AND SESSIONS
PHP COOKIES AND SESSIONSPHP COOKIES AND SESSIONS
PHP COOKIES AND SESSIONS
 
Browsers
BrowsersBrowsers
Browsers
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJS
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
 

Recently uploaded

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 

Recently uploaded (20)

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 

Http only cookie

  • 1. HttpOnly Cookie Something You Don’t Know About HTTP RDSS Team 2012-04
  • 2. Author 兰七 yuxia0025@gmail.com
  • 3. About RDSS Research on Domain Specific Solution We focus on existed specification, solution, production etc. We put our research into practice.
  • 4. Contents • Cookie Definition • HttpOnly Cookie • Browsers Supporting • Cross-site Scripting • XMLHTTPRequest • Finally
  • 6. • A cookie, also known as an HTTP cookie, web cookie, or browser cookie, is a piece of data stored by a website within a browser, and then subsequently sent back to the same website by the browser Refer: http://en.wikipedia.org/wiki/Http_cookie#HttpOnly_cookie 6
  • 8. Definition • HttpOnly is an additional flag included in a Set-Cookie HTTP response header.an HttpOnly session cookie will be used only when transmitting HTTP (or HTTPS) requests. Refer: http://en.wikipedia.org/wiki/Http_cookie#HttpOnly_cookie
  • 9. Born • HttpOnly cookies were first implemented in 2002 by Microsoft Internet Explorer developers for Internet Explorer 6 SP1 Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When. 9 3F
  • 10. Feather • restricting access from other non- HTTP APIs (such as JavaScript). • restriction mitigates but does not eliminate the threat of session cookie theft via cross-site scripting (XSS). Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When. 10 3F
  • 11. Syntax • Set-Cookie: USER(key)=123(value); expires=Wednesday, 09-Nov-99 23:12:40 GMT; HttpOnly Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When. 11 3F
  • 12. Set httpOnly Using PHP • Permanently. session.cookie_httponly = True (in php.iniPHP) • Setcookie("testcookie", $value, time()+3600, "/", "www.xx.com", 0 , 1); Refer: http://www.php.net/manual/en/function.setcookie.php 12
  • 14. Support • the cookie cannot be accessed through client side script, even if a cross-site scripting (XSS) flaw exists, and a user accidentally accesses a link that exploits this flaw, the browser (primarily Internet Explorer) will not reveal the cookie to a third party. Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When. 3F
  • 15. NOT Support • The HttpOnly flag will be ignored by the browser, thus creating a traditional, script accessible cookie. – document.cookie Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When. 3F
  • 16. Browsers Supporting HttpOnly Cookie ie6 ie7 ie8 ie9 chrome firefox safari prevent write yes yes yes yes yes yes yes prevent read yes yes yes yes yes yes Yes Refer:https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When. 3F
  • 20. Browser • is a server-side vulnerability that is often created when rendering user input as html. • e.g. expose sensitive information about users of the web site Refer: http://msdn.microsoft.com/en-us/library/ms533046.aspx
  • 23. • getResponseHeader • getAllResponseHeaders Refer: http://ha.ckers.org/blog/20070719/firefox-implements-httponly-and- is-vulnerable-to-xmlhttprequest/
  • 24. Set-Cookie && Set-Cookie2 • Set-Cookie defined in RFC 2109 • Set-Cookie2 defined in RFC 2965 • one & more key-value Refer: http://www.ietf.org/rfc/rfc2965.txt
  • 25. Fixed Browsers • FireFox 3.0.0.6 • IE • Safari5 && Chrome12 • FireFox ban all cookie
  • 26. Test Tool • Robert Hansens' HTTPOnly test page now includes set-cookie and set- cookie2 checks for XMLHTTPRequest exposure Refer: http://ha.ckers.org/httponly.cgi.
  • 27. Test Result ie6 ie7 ie8 ie9 chrome firefox safari A not not not not not not not httpOnly httpOnly httpOnly httpOnly httpOnly httpOnly httpOnly B not not not not no no no httpOnly httpOnly httpOnly httpOnly A - document,cookie B - xhr api