Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HTTP Security
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
RJ Zaworski
September 05, 2014
Technology
200
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HTTP Security
RJ Zaworski
September 05, 2014
More Decks by RJ Zaworski
See All by RJ Zaworski
Computing Lessons from the Atomic Age: Complexity, Safety, and Ethics
rjz
0
120
Beyond the Single-Page App: React and the Servers that Serve it
rjz
0
110
Typesafe(ish) React
rjz
1
700
Front-end optimization
rjz
1
480
Technical Interviewing
rjz
0
270
Interop! Building a better Backbone.View
rjz
0
110
Front-end optimization
rjz
4
290
Other Decks in Technology
See All in Technology
私がブラウザを自作したくなった理由
supurazako
1
230
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
PLATEAU で バーチャル花火大会
tatsuya1970
0
160
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
【Google Cloud Next Tokyo'26】Gemini Enterprise と Oracle AI Database で実現する、業務データ活用を実現する AI エージェント実装
shisyu_gaku
0
250
Model Studio CLI × Token Plan
maigo999
0
180
【CEDEC2026】専門性の高いデフォルメチームが挑んだ人材育成戦略 〜Cygames Academiaの企画から実施まで〜
cygames
PRO
0
610
猫付きpingコマンドを自作
uyuki234
0
230
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
150
Bits AI を制するものは Datadog を制す / The player that controls Bits AI, controls Datadog
kaminashi
0
100
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
570
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
1
4.8k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Marketing to machines
jonoalderson
1
5.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
490
Un-Boring Meetings
codingconduct
0
390
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
200
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
First, design no harm
axbom
PRO
2
1.2k
Transcript
HTTP Security A matter of trust rj zaworski, versal inc.
· @rjzaworski · github.com/rjz
Browsers ★ Do what servers tell them to ★ Respect
standards (mostly) ★ Render as much of the server response as they can
Trust is a Big Deal ★ Servers can be compromised,
impersonated, or simply misconfigured ★ How can we tell if content is trustworthy? The short answer is, “we can’t”.
HTTP can help $ curl https://twitter.com -I status: 200 OK
# ... strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block
Transport Security $ curl https://twitter.com -I status: 200 OK #
... strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (https://tools.ietf.org/html/rfc6797)
Transport Security ★ Ensure the browser never visits the http
version of a website ★ Force transport-layer security (TLS)
Transport Security Why bother? ★ eavesdropping ★ man in the
middle (data tampering, host spoofing, etc)
Transport Security ★ Protects from common wireless attacks (spoofing, sniffing,
e.g. SSLStrip + Firesheep) ★ Protects from mixed-content errors (CSS, SWF)
Content Security Policies $ curl https://twitter.com -I status: 200 OK
# ... strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (https://w3c.github.io/webappsec/specs/content-security-policy/)
Content Security Policies ★ Helps detect/prevent XSS, mixed-content, and other
classes of attack ★ Whitelist what is or isn't allowed on a page ★ Describe access to specific types of content in terms of directives
Content Security Policies ★ Implemented via HTTP header ★ or
a <META> tag <meta http-equiv="Content-Security-Policy" content="script-src 'self'">
Content Security Policies Some directives: ★ default-src - define base
policy ★ script-src - define valid origins for <script> tags ★ connect-src - XHRs, WebSocket and EventSource ★ form-action - form actions
Content Security Policies ★ Policies may be layered ★ Policies
are restrictive A request must pass all announced policies to be served!
Content Security Policies Report-Only: log without enforcing Content-Security-Policy-Report-Only: \ default-src
'self'; \ report-uri https://test.versal.com/csp-reports Looks familiar...
Content Security Policies Risks: ★ CSS Parsing is still vulnerable
★ Browser support is incomplete
X-Content-Type-Options $ curl https://twitter.com -I status: 200 OK # ...
strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (http://msdn.microsoft.com/en-us/library/ie/gg622941(v=vs.85).aspx)
X-Content-Type-Options ★ <SCRIPT> and <STYLE> reject responses with incorrect content-types
★ Prevent MIME confusion ★ Implemented in Chrome, IE
X-Frame-Options $ curl https://twitter.com -I status: 200 OK # ...
strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (http://msdn.microsoft.com/en-us/library/ie/gg622941(v=vs.85).aspx)
X-Frame-Options ★ Prevents content from being framed ★ Protects from
external clickjacking ★ Three choices: DENY , SAMEORIGIN , or ALLOW-FROM
X-XSS-Protection $ curl https://twitter.com -I status: 200 OK # ...
strict-transport-security: max-age=631138519 content-security-policy-report-only: default-src https:; #... x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block (http://msdn.microsoft.com/en-us/library/dd565647(v=vs.85).aspx)
X-XSS-Protection ★ Browser’s best guess about blocking XSS attempts ★
On by default in Chrome, IE
Further Reading On OWASP: ★ List of Useful Headers ★
HTTP Strict Transport Security ★ Content Security Policy
Thank you! rj zaworski · @rjzaworski · github.com/rjz