Submit Search
Upload
[Sqlap]リーダブルパスワード
•
1 like
•
1,167 views
Naoya Ishii
Follow
2014年5月28日 SQLアンチパターン読書会「リーダブルパスワード」の回で発表したスライド資料です。
Read less
Read more
Software
Report
Share
Report
Share
1 of 21
Download now
Download to read offline
Recommended
Password security 2
Password security 2
Joe_noh
XP祭り関西2014 LT やってみよう!スクラ○
XP祭り関西2014 LT やってみよう!スクラ○
Takahiro Kaihara
DBFluteを用いて開発されている全文検索システムFess
DBFluteを用いて開発されている全文検索システムFess
Shinsuke Sugaya
リーダー諸君!アジャイル開発を学び未来への道を切り開こう(XP祭り関西LT)
リーダー諸君!アジャイル開発を学び未来への道を切り開こう(XP祭り関西LT)
Makoto SAKAI
リーダブルパスワード - SQLアンチパターンより抜粋 -
リーダブルパスワード - SQLアンチパターンより抜粋 -
hiro345
COBOL技術者のためのJava勉強会
COBOL技術者のためのJava勉強会
naka hide
Java EE7 䛸㻌JCache
Java EE7 䛸㻌JCache
maruyama097
2011/12/3 わんくま同盟
2011/12/3 わんくま同盟
貴仁 大和屋
Recommended
Password security 2
Password security 2
Joe_noh
XP祭り関西2014 LT やってみよう!スクラ○
XP祭り関西2014 LT やってみよう!スクラ○
Takahiro Kaihara
DBFluteを用いて開発されている全文検索システムFess
DBFluteを用いて開発されている全文検索システムFess
Shinsuke Sugaya
リーダー諸君!アジャイル開発を学び未来への道を切り開こう(XP祭り関西LT)
リーダー諸君!アジャイル開発を学び未来への道を切り開こう(XP祭り関西LT)
Makoto SAKAI
リーダブルパスワード - SQLアンチパターンより抜粋 -
リーダブルパスワード - SQLアンチパターンより抜粋 -
hiro345
COBOL技術者のためのJava勉強会
COBOL技術者のためのJava勉強会
naka hide
Java EE7 䛸㻌JCache
Java EE7 䛸㻌JCache
maruyama097
2011/12/3 わんくま同盟
2011/12/3 わんくま同盟
貴仁 大和屋
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI 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 Code
Skeleton Technologies
PEPSICO 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)
contently
How 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 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 2024
Search Engine Journal
5 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
Clark Boyd
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 Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time 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 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...
RachelPearson36
More Related Content
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI 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 Code
Skeleton Technologies
PEPSICO 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)
contently
How 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 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 2024
Search Engine Journal
5 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
Clark Boyd
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 Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time 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 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...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO 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)
How 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 Insights
Trends 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 summary
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
Google'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
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The 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...
[Sqlap]リーダブルパスワード
1.
SQLアンチパターン 19章 リーダブルパスワード (読み取り可能パスワード)
2.
Name : Naoya
ISHII Twitter :@naopi TAG: SIer(), JAVA, Father, Frontale supporter
3.
アジェンダ 目的 パスワードのリカバリーとリセットを行う アンチパターン パスワードを平文(復号可能な形)で格納する 解決策 ソルトをつけてパスワードハッシュを格納する
4.
パスワードのリカバリとリセットを行う とある認証付きシステムを利用しているユーザが パスワードを忘れてしまった。 利用ユーザ自身でパスワードの再通知やリセットを行えるよう にしたい
5.
アンチパターン パスワードを平文で格納する
6.
パスワードの格納で想定されるリスク ● ネットワークパケット上のSQL文を傍受することが容易に行わ れる。 ● データベースサーバやアプリケーションログのSQLクエリログ を探しだされてしまう。 ●
データベースのバックアップファイルやバックアップメディアか らデータを読み込まれてしまう。
7.
ID、パスワードが正しければ1以上!! 〃 が無い(誤り)なら0 IDが存在しなくても0!!! SELECT COUNT(*)
as password_mathes FROM Account WHERE account_id = '1234' AND password = 'opensesame' ; パスワードの認証時の問題
8.
認証の失敗した原因が パスワードの誤りなのか? ID自体が存在しないのか? (´・ω・`)ワカラン
9.
ログインを複数失敗したらロックをかけたい パスワードの誤りならロックかける けど? (´・ω・`)ドッチヤネン
10.
パスワードの認証時の問題 SELECT CASE WHEN
password = 'opensesame' THEN 1 ELSE 0 END as password_mathes FROM Account WHERE account_id = '1234'; 指定したpasswordがあれば1を、無い(誤り)であれば0 を、アカウントが存在しなければNotFoundを返すSQL
11.
ログインエラーのメッセージについて 「ユーザが存在しません」 「パスワードに誤りがあります」 参考:9-3. エラーメッセージからの情報暴露 :
https://www.ipa.go. jp/security/awareness/vendor/programmingv1/b09_03.html 「ユーザまたはパスワードに誤りが あります」
12.
パスワードを電子メールで送信する From: deamon To: bill@example.com Subject:
パスワードのリクエスト いつもお世話に〜〜〜〜 アカウント「bill」の再通知リクエストに回答します。 新しいパスワードは「 xhsyd0ak」です。 よろしく 論外!! メールは傍受される危険性 が非常に高い。
13.
アンチパターンを用いてもいい場合 (平文パスワード格納してもいい場合) ● アプリケーションが外部のサービスにアク セスする (パスワードを内部に持つ) ● イントラネット内で少人数で使う 「そのシステム、ウチ(外部)でも使えるようにしてよ」案件
14.
解決策 ソルトを付けてパスワードハッシュを格納す る ハッシュ関数 入力内容を識別不可能なハッシュと呼ばれる文字列に 変換する SHA2('xyzzy', 256) =
‘1184828a00……….’
15.
vsレインボークラック 速いCPUを使うことによって総当たりでハッシュ値の 検索をかけるよりもさらに高速にパスワードの解読を 行う方法がある。 レインボーテーブルの参照
16.
レインボーテーブル ハッシュ値の逆引き辞書 そこから高速にパスワードを求める
17.
解決策 暗号化前のパスワードにソルトを付ける ソルトあり SHA2(‘password’ || ‘G0y6cf3’,
256) = ‘0c4dd4eea2d53306a0d11e31e1a28cf339ec6113’ ソルト(赤字)の文字列はパスワードごとに用意し攻撃者の用意 するレインボーテーブルを複雑化させる。
18.
解決策 SQLからパスワードを隠す ログファイルの漏洩 SQL上では平文として利用せずに アプリケーションでハッシュ計算 ネットワークパケットの傍受 セキュアHTTP(HTTPS)の利用
19.
リカバリーではなくリセットする 一時パスワードを電子メールで送付 記載しているパスワードは短時間で無効化する 初回ログイン時に強制的に更新させる 一意のトークンを生成し送付する そのトークンをキー(識別子)としてパスワード管理テーブルのアカウ ントと紐付ける
20.
さいごに 教諭になりすまし成績など入手 クラス編成をLINEで流す 滋賀の高校 県教委と学校によると、男子生徒は当時2年だった2月、卒業式の準備でほかの生徒が教諭の パソコンを使用した際に メモされたパスワードと画面表示されたIDを暗記
。3月中旬にコンピュー ター教室のパソコンから校務用サーバーにアクセスし、入手した情報をUSBメモリーに保存し た。 つい最近こんな事件も・・・・
21.
「あなたが読み取れるものは、 攻撃者にも読み取れます」 おしまい
Download now