SlideShare a Scribd company logo
\ちょっと待ってね!/

ヽ(・ω・)ノ
おいしいオムレツの作り方
Presenter: やぎはしゅ
セキュリティキャンプフォーラム2014 卒業生LT
2014/02/15

2
セッション管理のお話
Presenter: やぎはしゅ
セキュリティキャンプフォーラム2014 卒業生LT
2014/02/15

3
やぎはしゅ #とは

• セキュキャン2013卒業生
-

Web組のクソ雑魚

• チョコよりはalertが好き
-

'saaa/sとか'scriptalert(1)/scriptとか辞書登録してて

キャンプでドン引かれた(むしろみんなやってないの?

• 某KO大学の僻地の人(KOじゃないという説あり)
-

就活中なのでおいしいお話待ってます

• SECCON CTFとか(お茶汲み係)
• アホな発表とチープな図に定評あり(俺調べ)
4
今までのLTなど

• 「筋トレの話」
-

筋トレしたらXSSたくさん見つけられるようになった話
大学で血迷ってやらかした

• 「効果的宅配テロ行為のための攻撃手法の提案」
-

如何にして標的に宅配テロでより大きなダメージを与えるかという話
セキュキャン2013グループワーク(最優秀賞)

• 「キャベツとレタス、どっちがセキュア?」
-

セキュアなワードとそうでないワードとその未来の話
OWASP Nightにて勢いに任せて(はせがわさんにはウケたっぽい)

5
今日のLT

• セッション管理とHTTPの話
• この分野のざっくりした話
• 先達の話
• 俺の話
• 悲しいお知らせ
6
ユーザからの入力は信用しない

• Webセキュリティの大原則
• 世の中には危ない人がいっぱいいる
• ユーザから受け取るものは基本的に信用しない
• エスケープ はとても大事
(とバリデーション)

じゃあ、セッションIDは…?

7
そのセッションは守られていることから始まる

• ベーシックなセッション管理は通信経路の安全性に依存
-

SSLなどなど
ただしBEASTやCRIMEなどのSSLに対する攻撃手法も…
CSRFの対策などと違って、セッションIDの正当性を検証する仕組みはない

→ セッションIDを窃取されたらアウト!という実装がほとんど?

• この問題を解決する試みはけっこう多い
-

先行研究はいっぱいあった
でもどれも導入面での障壁が大きく、実現性に乏しい(てか誰も求めてなry)

8
狙われるセッションID
PHPSESSID

XSSとか


(����)

通信経路上の脅威

(盗聴・BEAST・CRIME)
チープな図
9
狙われるセッションID
PHPSESSID

SSL(非ブロック暗号・圧縮機能オフ)
httponlyなCookie

XSSとか


(����)

通信経路上の脅威

(盗聴・BEAST・CRIME)
チープな図
10
めんどうくさい
もっと簡単にしようよ

• そもそもの原因って何?
-

偉い人「HTTPはステートレスなプロトコルなので…」
俺「なんでそんなもんでセッション管理してんだよ…」

• じゃあどうすんだよ
-

いろんな人「セッションIDの正当性を担保するような実装をHTTP上でやろう」

→ 実現性に乏しいしあんまりイケてない

-

割と近いところにセッション管理してくれてる優秀なプロトコルが…。
そのプロトコルのセッションをマネージしてくれる速くてイケてるプロトコルが…。

12
俺達は頑張った(先行研究)

• TLSを拡張しようぜ!
-

話がでかすぎ

• location.hashなら通信経路に流れないじゃん!
-

はせがわさんXSSで無双されかねない

• Diffie-Hellman鍵交換プロトコルで全て解決!
-

HTTPにこだわるならこれが一番イケてるっぽい
鍵交換して、以降はHMACつけてリクエストの正当性検証可能に(神

13
俺「この最強の提案手法、実現しよう」

• Chromeの拡張機能化して実装して動かして検証して…
-

拡張機能化にあたってより現実味のある手法に落としこんだり

• 大学での研究として取り組んでいたりしました
-

最終的にはこの領域に取り組み続けて卒論までやりたい感あった

• これに取り組んでいる中でさっきの話が出てくる
-

TCPではちゃんとステート管理してる
そのコネクションをごにょごにょしてくれるSPDYというイケてるプロトコルがある
俺「あれ、SPDYのセッションとHTTPの認証済ユーザを結びつければ最強じゃね」

14
俺「卒論、これで書きたいなぁ」

• HTTPで行われた認証とSPDYセッションを紐付け
-

現状SPDYはHTTPS必須なので、圧縮機能オフならほぼ間違いなく安全
!

• セッション管理をHTTPから引きずり下ろせる
-

ステートレスなプロトコルでセッション管理をするというおかしな状況を解決
なんかいろいろ難しいことをHTTP上で考えなくてもよくなる

15
現実は厳しい

• 「SPDYを用いたHTTPのセッション管理方式の提案と実装」

2014, 暗号と情報セキュリティシンポジウム(SCIS) / 桐生 直輝, 磯 侑斗, 齋藤 孝道

-

やろうと思っていたのに先越されちゃったよ\(^o^)/
まぁあるあるなんだけど結構ツラい
!

• 現実は厳しいけどセッション管理の未来は明るい
-

「当たり前」になりつつある技術にも変なところはけっこうある
より便利でより安全なWebを目指して日々頑張ることが大事

16
つまりこういうこと
HTTP

HTTP

HTTP

HTTP

ここで認証して

SPDY
ここで管理する

SSL
TCP

チープな図
17
まとめ

• はせがわさん強い
• Webめんどうくさい
• HTTPうざい
• 真面目なネタにくだらないネタ混ぜるの難しい
• このスライド作ってるの発表当日の4時(眠い
• ↑結局寝る機を逸して一睡もしていない(アホ
18
以上、解散!

More Related Content

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Campforum2014