SlideShare a Scribd company logo
AVTOKYO2014
HASEMUNEA (Nishimunea & Yosuke HASEGAWA)
Future of Web Security
Opened up by CSP
Nishimunea (Muneaki Nishimura)
Firefox OS Community, Japan
Lecturer of Security Camp 2014
Yosuke HASEGAWA
Shibuya.XSS / utf-8.jp
Lecturer of Security Camp 2014
Content Security Policy (CSP)
• Browser feature to mitigate common attacks, e.g., XSS
• Set Content-Security-Policy header in HTTP responses
• W3C candidate recommendation, as of 2012
• Next generation, CSP Level 2, is under development
Browser Support
• Supported by all major browsers except IE
– IE is in development for future release
• Forms of expressions
– Content-Security-Policy : the W3C specs.
– X-Content-Security-Policy : for Firefox 4-22, removed on 33
– X-WebKit-CSP : for earlier ver. of WebKit
4+ 4+ 6+5+ 25+ 4.4+N/A
Syntax
• When you allow to load sub resources from any origin
• If you allow loading of scripts only from jQuery's CDN
• And if you ignore any plugins
default-src *
default-src *; script-src https://code.jquery.com
default-src *; script-src https://code.jquery.com; object-src 'none'
CSP Directives
default-src Default policy for resources that have no specific policy
script-src Policy for script execution
object-src Policy for plugins
style-src Policy for stylesheets
img-src Policy for image files
media-src Policy for media files, e.g., <audio> and <video>
frame-src Policy for frame contents
font-src Policy for web fonts
connect-src Policy for async. connections, e.g., XMLHttpRequest
CSP Level2 Directives
base-uri Policy for base[href]
form-action Policy for form[action]
plugin-types Policy for executable plugin MIME types
referrer Nearly identical to meta[name=referrer]
frame-ancestors Nearly identical to X-Frame-Options
xss-protection Nearly identical to X-XSS-Protection
child-src Policy for child contents e.g., frames and workers
sandbox Sandbox that is applied to the document
Violation Report
• If 'report-uri' is set in CSP, browser lets the webmaster
know violation of CSP including attempts of attack
script-src 'self'; report-uri report.php
• In the report, some details of violations are included.
With them, webmaster can find causes of violation
{"csp-report":{
"original-policy":"script-src 'self'; report-uri report.php",
"script-sample":"alert(1);",
"source-file":"http://example.com/login.php" }}
Abusing CSP Violation Report
• In some parts of a report, HTML tags can be included
without proper escaping
• Or, with a proxy tool, attacker can send malformed reports to
webmaster's console
{"csp-report":{
"document-uri":"http://%3Cauth@example.com/%3Cpath/?q=%3Cquery,
"referrer":"http://example.com/redirector/%3Cpath/?q=%3Cquery",
"blocked-uri":"data:text/html,<script>alert(1)</script>",
"script-sample":"javascript:alert('<script>alert(1);</script>')" }}
DEMO

More Related Content

What's hot

Web Development Security
Web Development SecurityWeb Development Security
Web Development Security
Rafael Monteiro
 
Flash Security
Flash SecurityFlash Security
Flash Security
Ferruh Mavituna
 
Content Security Policy (CSP)
Content Security Policy (CSP)Content Security Policy (CSP)
Content Security Policy (CSP)
Arun Kumar
 
Design highly available and secure system
Design highly available and secure systemDesign highly available and secure system
Design highly available and secure system
Andi Pangeran
 
http security response headers for web security
http security response headers for web securityhttp security response headers for web security
http security response headers for web security
Olatunji Adetunji
 
Content Security Policy
Content Security PolicyContent Security Policy
Content Security Policy
Ryan LaBouve
 
Content Security Policy
Content Security PolicyContent Security Policy
Content Security Policy
Austin Gil
 
Introduction to Mod security session April 2016
Introduction to Mod security session April 2016Introduction to Mod security session April 2016
Introduction to Mod security session April 2016
Rahul
 
mod_security introduction at study2study #3
mod_security introduction at study2study #3mod_security introduction at study2study #3
mod_security introduction at study2study #3
Naoya Nakazawa
 
Http security response headers
Http security response headers Http security response headers
Http security response headers
mohammadhosseinrouha
 
Web Application firewall-Mod security
Web Application firewall-Mod securityWeb Application firewall-Mod security
Web Application firewall-Mod security
Romansh Yadav
 
DDoS Attack Network Projects Assistance
DDoS Attack Network Projects AssistanceDDoS Attack Network Projects Assistance
DDoS Attack Network Projects Assistance
Network Simulation Tools
 
HTTP Security Headers
HTTP Security HeadersHTTP Security Headers
HTTP Security Headers
Ismael Goncalves
 
Identity Security - Azure Identity Protection
Identity Security - Azure Identity ProtectionIdentity Security - Azure Identity Protection
Identity Security - Azure Identity Protection
Eng Teong Cheah
 
Meteor Meets Mallory
Meteor Meets MalloryMeteor Meets Mallory
Meteor Meets Mallory
Emily Stark
 
Physical data security &amp; security of data over network by team netnepz- A...
Physical data security &amp; security of data over network by team netnepz- A...Physical data security &amp; security of data over network by team netnepz- A...
Physical data security &amp; security of data over network by team netnepz- A...
SandipAryal5
 
VMware ESX 3.5
VMware ESX 3.5VMware ESX 3.5
VMware ESX 3.5
Mehdi Poustchi Amin
 

What's hot (18)

Web Development Security
Web Development SecurityWeb Development Security
Web Development Security
 
Flash Security
Flash SecurityFlash Security
Flash Security
 
Content Security Policy (CSP)
Content Security Policy (CSP)Content Security Policy (CSP)
Content Security Policy (CSP)
 
Design highly available and secure system
Design highly available and secure systemDesign highly available and secure system
Design highly available and secure system
 
http security response headers for web security
http security response headers for web securityhttp security response headers for web security
http security response headers for web security
 
Content Security Policy
Content Security PolicyContent Security Policy
Content Security Policy
 
Matriux
MatriuxMatriux
Matriux
 
Content Security Policy
Content Security PolicyContent Security Policy
Content Security Policy
 
Introduction to Mod security session April 2016
Introduction to Mod security session April 2016Introduction to Mod security session April 2016
Introduction to Mod security session April 2016
 
mod_security introduction at study2study #3
mod_security introduction at study2study #3mod_security introduction at study2study #3
mod_security introduction at study2study #3
 
Http security response headers
Http security response headers Http security response headers
Http security response headers
 
Web Application firewall-Mod security
Web Application firewall-Mod securityWeb Application firewall-Mod security
Web Application firewall-Mod security
 
DDoS Attack Network Projects Assistance
DDoS Attack Network Projects AssistanceDDoS Attack Network Projects Assistance
DDoS Attack Network Projects Assistance
 
HTTP Security Headers
HTTP Security HeadersHTTP Security Headers
HTTP Security Headers
 
Identity Security - Azure Identity Protection
Identity Security - Azure Identity ProtectionIdentity Security - Azure Identity Protection
Identity Security - Azure Identity Protection
 
Meteor Meets Mallory
Meteor Meets MalloryMeteor Meets Mallory
Meteor Meets Mallory
 
Physical data security &amp; security of data over network by team netnepz- A...
Physical data security &amp; security of data over network by team netnepz- A...Physical data security &amp; security of data over network by team netnepz- A...
Physical data security &amp; security of data over network by team netnepz- A...
 
VMware ESX 3.5
VMware ESX 3.5VMware ESX 3.5
VMware ESX 3.5
 

Similar to Future of Web Security Opened up by CSP

[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
 
Evolving web security model v1.1 - Portland OWASP May 29 2014
Evolving web security model v1.1 - Portland OWASP May 29 2014Evolving web security model v1.1 - Portland OWASP May 29 2014
Evolving web security model v1.1 - Portland OWASP May 29 2014
imelven
 
HTTP_Header_Security.pdf
HTTP_Header_Security.pdfHTTP_Header_Security.pdf
HTTP_Header_Security.pdf
ksudhakarreddy5
 
Rails and Content Security Policies
Rails and Content Security PoliciesRails and Content Security Policies
Rails and Content Security Policies
Matias Korhonen
 
W3C Content Security Policy
W3C Content Security PolicyW3C Content Security Policy
W3C Content Security Policy
Markus Wichmann
 
Supply Chain Security for Containerised Workloads - Lee Chuk Munn
Supply Chain Security for Containerised Workloads - Lee Chuk MunnSupply Chain Security for Containerised Workloads - Lee Chuk Munn
Supply Chain Security for Containerised Workloads - Lee Chuk Munn
NUS-ISS
 
10X More Secure with Content Security Policy
10X More Secure with Content Security Policy10X More Secure with Content Security Policy
10X More Secure with Content Security Policy
chw
 
Ignite content security policy
Ignite content security policyIgnite content security policy
Ignite content security policy
jstack
 
On demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_aws
On demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_awsOn demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_aws
On demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_aws
Sumit Arora
 
Running Java Applications on Cloud Foundry
Running Java Applications on Cloud FoundryRunning Java Applications on Cloud Foundry
Running Java Applications on Cloud Foundry
VMware Tanzu
 
USENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response Headers
USENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response HeadersUSENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response Headers
USENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response HeadersAditya K Sood
 
Analysis of HTTP Security Headers in Turkey
Analysis of HTTP Security Headers in TurkeyAnalysis of HTTP Security Headers in Turkey
Analysis of HTTP Security Headers in Turkey
Dr. Emin İslam Tatlı
 
Browser Wars 2019 - Implementing a Content Security Policy
Browser Wars 2019 - Implementing a Content Security PolicyBrowser Wars 2019 - Implementing a Content Security Policy
Browser Wars 2019 - Implementing a Content Security Policy
George Boobyer
 
Security trend analysis with CVE topic models
Security trend analysis with CVE topic modelsSecurity trend analysis with CVE topic models
Security trend analysis with CVE topic models
Thomas Zimmermann
 
Devopsdays london: Let’s talk about security
Devopsdays london:  Let’s talk about securityDevopsdays london:  Let’s talk about security
Devopsdays london: Let’s talk about security
Justin Cormack
 
CMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer SystemCMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer System
Editor IJCATR
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Teamstudio
 
AppSec California 2017 CSP: The Good, the Bad and the Ugly
AppSec California 2017 CSP: The Good, the Bad and the UglyAppSec California 2017 CSP: The Good, the Bad and the Ugly
AppSec California 2017 CSP: The Good, the Bad and the Ugly
Eli Nesterov
 

Similar to Future of Web Security Opened up by CSP (20)

[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers
 
Evolving web security model v1.1 - Portland OWASP May 29 2014
Evolving web security model v1.1 - Portland OWASP May 29 2014Evolving web security model v1.1 - Portland OWASP May 29 2014
Evolving web security model v1.1 - Portland OWASP May 29 2014
 
HTTP_Header_Security.pdf
HTTP_Header_Security.pdfHTTP_Header_Security.pdf
HTTP_Header_Security.pdf
 
Rails and Content Security Policies
Rails and Content Security PoliciesRails and Content Security Policies
Rails and Content Security Policies
 
W3C Content Security Policy
W3C Content Security PolicyW3C Content Security Policy
W3C Content Security Policy
 
Supply Chain Security for Containerised Workloads - Lee Chuk Munn
Supply Chain Security for Containerised Workloads - Lee Chuk MunnSupply Chain Security for Containerised Workloads - Lee Chuk Munn
Supply Chain Security for Containerised Workloads - Lee Chuk Munn
 
10X More Secure with Content Security Policy
10X More Secure with Content Security Policy10X More Secure with Content Security Policy
10X More Secure with Content Security Policy
 
Web Security - CSP & Web Cryptography
Web Security - CSP & Web CryptographyWeb Security - CSP & Web Cryptography
Web Security - CSP & Web Cryptography
 
Content security policy
Content security policyContent security policy
Content security policy
 
Ignite content security policy
Ignite content security policyIgnite content security policy
Ignite content security policy
 
On demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_aws
On demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_awsOn demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_aws
On demand video_streaming_apps_and_its_server_side_cloud_infrastructure_at_aws
 
Running Java Applications on Cloud Foundry
Running Java Applications on Cloud FoundryRunning Java Applications on Cloud Foundry
Running Java Applications on Cloud Foundry
 
USENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response Headers
USENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response HeadersUSENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response Headers
USENIX CollSec 2010 - Conundrum of Declarative Security in HTTP Response Headers
 
Analysis of HTTP Security Headers in Turkey
Analysis of HTTP Security Headers in TurkeyAnalysis of HTTP Security Headers in Turkey
Analysis of HTTP Security Headers in Turkey
 
Browser Wars 2019 - Implementing a Content Security Policy
Browser Wars 2019 - Implementing a Content Security PolicyBrowser Wars 2019 - Implementing a Content Security Policy
Browser Wars 2019 - Implementing a Content Security Policy
 
Security trend analysis with CVE topic models
Security trend analysis with CVE topic modelsSecurity trend analysis with CVE topic models
Security trend analysis with CVE topic models
 
Devopsdays london: Let’s talk about security
Devopsdays london:  Let’s talk about securityDevopsdays london:  Let’s talk about security
Devopsdays london: Let’s talk about security
 
CMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer SystemCMS Website Security Threat Protection Oriented Analyzer System
CMS Website Security Threat Protection Oriented Analyzer System
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
AppSec California 2017 CSP: The Good, the Bad and the Ugly
AppSec California 2017 CSP: The Good, the Bad and the UglyAppSec California 2017 CSP: The Good, the Bad and the Ugly
AppSec California 2017 CSP: The Good, the Bad and the Ugly
 

More from Muneaki Nishimura

Find Blue Oceans - Through the Competitive World of Bug Bounty
Find Blue Oceans - Through the Competitive World of Bug BountyFind Blue Oceans - Through the Competitive World of Bug Bounty
Find Blue Oceans - Through the Competitive World of Bug Bounty
Muneaki Nishimura
 
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
Muneaki Nishimura
 
Firefoxの倒し方
Firefoxの倒し方Firefoxの倒し方
Firefoxの倒し方
Muneaki Nishimura
 
Webプラットフォームのセキュリティ
WebプラットフォームのセキュリティWebプラットフォームのセキュリティ
Webプラットフォームのセキュリティ
Muneaki Nishimura
 
Firefoxの日和見暗号がカジュアルに無効化された話
Firefoxの日和見暗号がカジュアルに無効化された話Firefoxの日和見暗号がカジュアルに無効化された話
Firefoxの日和見暗号がカジュアルに無効化された話
Muneaki Nishimura
 
Mozillaの報奨金制度で200万円ほど稼いだ話
Mozillaの報奨金制度で200万円ほど稼いだ話Mozillaの報奨金制度で200万円ほど稼いだ話
Mozillaの報奨金制度で200万円ほど稼いだ話
Muneaki Nishimura
 
HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)
HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)
HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)
Muneaki Nishimura
 
Mozillaの報奨金制度で100万円ほど稼いだ話
Mozillaの報奨金制度で100万円ほど稼いだ話Mozillaの報奨金制度で100万円ほど稼いだ話
Mozillaの報奨金制度で100万円ほど稼いだ話
Muneaki Nishimura
 
Welcome to the Black Hole of Bug Bounty Program Rebooted
Welcome to the Black Hole of Bug Bounty Program RebootedWelcome to the Black Hole of Bug Bounty Program Rebooted
Welcome to the Black Hole of Bug Bounty Program Rebooted
Muneaki Nishimura
 
そろそろ押さえておきたい AngularJSのセキュリティ
そろそろ押さえておきたい AngularJSのセキュリティそろそろ押さえておきたい AngularJSのセキュリティ
そろそろ押さえておきたい AngularJSのセキュリティ
Muneaki Nishimura
 
Welcome to the Black Hole of Bug Bounty Program
Welcome to the Black Hole of Bug Bounty ProgramWelcome to the Black Hole of Bug Bounty Program
Welcome to the Black Hole of Bug Bounty Program
Muneaki Nishimura
 
Webアプリ開発者のためのHTML5セキュリティ入門
Webアプリ開発者のためのHTML5セキュリティ入門Webアプリ開発者のためのHTML5セキュリティ入門
Webアプリ開発者のためのHTML5セキュリティ入門
Muneaki Nishimura
 
GeckoのLocal Storageについて調べてみた
GeckoのLocal Storageについて調べてみたGeckoのLocal Storageについて調べてみた
GeckoのLocal Storageについて調べてみた
Muneaki Nishimura
 
Firefox OS パッケージ型アプリ インストールの仕組みを調べてみた
Firefox OS パッケージ型アプリ インストールの仕組みを調べてみたFirefox OS パッケージ型アプリ インストールの仕組みを調べてみた
Firefox OS パッケージ型アプリ インストールの仕組みを調べてみた
Muneaki Nishimura
 
Firefox OS 起動の仕組みを調べてみた
Firefox OS 起動の仕組みを調べてみたFirefox OS 起動の仕組みを調べてみた
Firefox OS 起動の仕組みを調べてみた
Muneaki Nishimura
 

More from Muneaki Nishimura (15)

Find Blue Oceans - Through the Competitive World of Bug Bounty
Find Blue Oceans - Through the Competitive World of Bug BountyFind Blue Oceans - Through the Competitive World of Bug Bounty
Find Blue Oceans - Through the Competitive World of Bug Bounty
 
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
 
Firefoxの倒し方
Firefoxの倒し方Firefoxの倒し方
Firefoxの倒し方
 
Webプラットフォームのセキュリティ
WebプラットフォームのセキュリティWebプラットフォームのセキュリティ
Webプラットフォームのセキュリティ
 
Firefoxの日和見暗号がカジュアルに無効化された話
Firefoxの日和見暗号がカジュアルに無効化された話Firefoxの日和見暗号がカジュアルに無効化された話
Firefoxの日和見暗号がカジュアルに無効化された話
 
Mozillaの報奨金制度で200万円ほど稼いだ話
Mozillaの報奨金制度で200万円ほど稼いだ話Mozillaの報奨金制度で200万円ほど稼いだ話
Mozillaの報奨金制度で200万円ほど稼いだ話
 
HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)
HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)
HPKP Supercookies (公開鍵ピンニングによるユーザ追跡)
 
Mozillaの報奨金制度で100万円ほど稼いだ話
Mozillaの報奨金制度で100万円ほど稼いだ話Mozillaの報奨金制度で100万円ほど稼いだ話
Mozillaの報奨金制度で100万円ほど稼いだ話
 
Welcome to the Black Hole of Bug Bounty Program Rebooted
Welcome to the Black Hole of Bug Bounty Program RebootedWelcome to the Black Hole of Bug Bounty Program Rebooted
Welcome to the Black Hole of Bug Bounty Program Rebooted
 
そろそろ押さえておきたい AngularJSのセキュリティ
そろそろ押さえておきたい AngularJSのセキュリティそろそろ押さえておきたい AngularJSのセキュリティ
そろそろ押さえておきたい AngularJSのセキュリティ
 
Welcome to the Black Hole of Bug Bounty Program
Welcome to the Black Hole of Bug Bounty ProgramWelcome to the Black Hole of Bug Bounty Program
Welcome to the Black Hole of Bug Bounty Program
 
Webアプリ開発者のためのHTML5セキュリティ入門
Webアプリ開発者のためのHTML5セキュリティ入門Webアプリ開発者のためのHTML5セキュリティ入門
Webアプリ開発者のためのHTML5セキュリティ入門
 
GeckoのLocal Storageについて調べてみた
GeckoのLocal Storageについて調べてみたGeckoのLocal Storageについて調べてみた
GeckoのLocal Storageについて調べてみた
 
Firefox OS パッケージ型アプリ インストールの仕組みを調べてみた
Firefox OS パッケージ型アプリ インストールの仕組みを調べてみたFirefox OS パッケージ型アプリ インストールの仕組みを調べてみた
Firefox OS パッケージ型アプリ インストールの仕組みを調べてみた
 
Firefox OS 起動の仕組みを調べてみた
Firefox OS 起動の仕組みを調べてみたFirefox OS 起動の仕組みを調べてみた
Firefox OS 起動の仕組みを調べてみた
 

Recently uploaded

DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 

Recently uploaded (20)

DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 

Future of Web Security Opened up by CSP

  • 1. AVTOKYO2014 HASEMUNEA (Nishimunea & Yosuke HASEGAWA) Future of Web Security Opened up by CSP
  • 2. Nishimunea (Muneaki Nishimura) Firefox OS Community, Japan Lecturer of Security Camp 2014
  • 3. Yosuke HASEGAWA Shibuya.XSS / utf-8.jp Lecturer of Security Camp 2014
  • 4. Content Security Policy (CSP) • Browser feature to mitigate common attacks, e.g., XSS • Set Content-Security-Policy header in HTTP responses • W3C candidate recommendation, as of 2012 • Next generation, CSP Level 2, is under development
  • 5. Browser Support • Supported by all major browsers except IE – IE is in development for future release • Forms of expressions – Content-Security-Policy : the W3C specs. – X-Content-Security-Policy : for Firefox 4-22, removed on 33 – X-WebKit-CSP : for earlier ver. of WebKit 4+ 4+ 6+5+ 25+ 4.4+N/A
  • 6. Syntax • When you allow to load sub resources from any origin • If you allow loading of scripts only from jQuery's CDN • And if you ignore any plugins default-src * default-src *; script-src https://code.jquery.com default-src *; script-src https://code.jquery.com; object-src 'none'
  • 7. CSP Directives default-src Default policy for resources that have no specific policy script-src Policy for script execution object-src Policy for plugins style-src Policy for stylesheets img-src Policy for image files media-src Policy for media files, e.g., <audio> and <video> frame-src Policy for frame contents font-src Policy for web fonts connect-src Policy for async. connections, e.g., XMLHttpRequest
  • 8. CSP Level2 Directives base-uri Policy for base[href] form-action Policy for form[action] plugin-types Policy for executable plugin MIME types referrer Nearly identical to meta[name=referrer] frame-ancestors Nearly identical to X-Frame-Options xss-protection Nearly identical to X-XSS-Protection child-src Policy for child contents e.g., frames and workers sandbox Sandbox that is applied to the document
  • 9. Violation Report • If 'report-uri' is set in CSP, browser lets the webmaster know violation of CSP including attempts of attack script-src 'self'; report-uri report.php • In the report, some details of violations are included. With them, webmaster can find causes of violation {"csp-report":{ "original-policy":"script-src 'self'; report-uri report.php", "script-sample":"alert(1);", "source-file":"http://example.com/login.php" }}
  • 10. Abusing CSP Violation Report • In some parts of a report, HTML tags can be included without proper escaping • Or, with a proxy tool, attacker can send malformed reports to webmaster's console {"csp-report":{ "document-uri":"http://%3Cauth@example.com/%3Cpath/?q=%3Cquery, "referrer":"http://example.com/redirector/%3Cpath/?q=%3Cquery", "blocked-uri":"data:text/html,<script>alert(1)</script>", "script-sample":"javascript:alert('<script>alert(1);</script>')" }}
  • 11. DEMO