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
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
120
Front-end optimization
rjz
4
290
Other Decks in Technology
See All in Technology
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
0
130
Azure Cost Management の FOCUS コストデータを迷わず読むための“3つの軸”
tetsuyaooooo
0
150
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
230
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
380
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
580
KAEN Company Deck
kaen
PRO
0
320
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
180
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
250
AndroidでHDRメディアを「壊さずに」扱う
chigichan24
0
410
#jawssonic2026 あの時代が悪かった ~動かなかったSageMakerと共に迎えたイベント当日~
ktkn1129
0
130
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
0
200
Bet AI Day 2026丨Agentは、「金融」という巨大産業の何を変えられるのか
layerx
PRO
0
1k
Featured
See All Featured
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
360
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
320
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
440
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
560
The World Runs on Bad Software
bkeepers
PRO
72
12k
Design in an AI World
tapps
1
300
Designing for humans not robots
tammielis
254
26k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
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