Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
その正規表現、異議あり! 〜 ReDoSについて
Search
Shu OGAWARA
April 24, 2019
Technology
6.7k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
その正規表現、異議あり! 〜 ReDoSについて
2019/04/24の銀座Rails#8での発表資料です。
スライド中で紹介している拙作gemはこちら
https://github.com/expajp/reredos
Shu OGAWARA
April 24, 2019
More Decks by Shu OGAWARA
See All by Shu OGAWARA
人生を変えた一冊「独学大全」のはなし / Self-study ENCYCLOPEDIA: The Book Which Change My Life #独学大全 #EM推し本
expajp
0
210
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
190
入門 FormObject / An Introduction to FormObject #kaigionrails
expajp
2
7.9k
あなたの「仮説検証」、ゆがんでいませんか? / Isn't Your "Hypothesis Verification" Distorted? #emoasis
expajp
2
600
Rubyはなぜ「たのしい」のか? / Why is Ruby a programmers' best friend? #tqrk15
expajp
5
2.2k
エンジニアリングマネージャーはどう学んでいくのか #devsumi / How Do Engineering Managers Continue to Learn and Grow?
expajp
9
6k
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
3
660
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
560
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
2.5k
Other Decks in Technology
See All in Technology
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
1
490
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
160
Code4Lib JAPANカンファレンス2026 開会挨拶 / Code4Lib JAPAN Conference 2026: Opening Remarks
ykiyota
0
330
Screen Lens - 今見てる画面を翻訳する
komagata
0
240
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
150
2026/09/10 Spring Bootから Jakarta EE/MicroProfileへの移行
megascus
0
300
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
150
20260906 「AWS運用入門」著者が教える、運用業務への生成AI活用入門
masaruogura
0
260
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
3
970
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
600
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
190
ASTを使って影響範囲を特定する
nealle
0
140
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
270
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Practical Orchestrator
shlominoach
191
12k
A designer walks into a library…
pauljervisheath
211
25k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
780
Documentation Writing (for coders)
carmenintech
77
5.5k
Transcript
ͦͷਖ਼نදݱɺҟٞ͋Γʂ ʙ ReDoSʹ͍ͭͯ Shu OGAWARA(@expajp) 2019/04/24 ۜ࠲Rails #8
ਖ਼نදݱͬͯ·͔͢ʁ
ϝΞυͷόϦσʔγϣϯʹ ਖ਼نදݱΛ͍ͬͯΔਓ
ͦΕ͔ͯ͜͠͠ΜͳͷͰʁ 2019/04/24 4
ͳͦ͞͏ 2019/04/24 5
ग़యɿχίχɾίϞϯζ http://commons.nicovideo.jp/material/nc38409
͜ͷਖ਼نදݱʹɺ ੬ऑੑ͕͋Δ
࣮ࡍʹ͝ཡ͍ͩ͘͞
ςετεΫϦϓτ 2019/04/24 9 ग़యɿਖ਼نදݱͰͷϝʔϧΞυϨενΣοΫݟ͖͢ – ReDoS – yohgaki's blog https://blog.ohgaki.net/redos-must-review-mail-address-validation
࣮ߦ݁Ռ 2019/04/24 10
ݪҼ • ਖ਼نදݱΤϯδϯʹѱຐͷূ໌ΛΒ͍ͤͯΔ • ʮҙͷจࣈྻʯදݱ͕ଓ͘ͱ Ε͕Θ͔Βͳ͍ͷͰɺશύλʔϯΛௐΔ – શύλʔϯΛௐͳ͍ͱ Ϛον͠ͳ͍͜ͱ֬ఆͰ͖ͳ͍ –
Έ߹Θ͕ͤരൃ͍ͯ͠Δ 2019/04/24 11
࣮ࡍʹΈ߹Θ͕ͤ രൃ͍ͯ͠Δ༷ࢠΛ ͝ཡ͍ͩ͘͞
؆୯ͷͨΊ • ݟͤΔͷ͜ͷ෦ͷνΣοΫͷΈ 2019/04/24 13
Έ߹Θͤരൃ • host. ·ͰϚονͯ͠ɺ࣍ 2019/04/24 14
Έ߹Θͤരൃ • . (υοτ) ·ͰϚον͕ͨ͠ 2019/04/24 15
Έ߹Θͤരൃ • ͦͷޙΖ͕ҧ͏ͷͰΔ 2019/04/24 16
Έ߹Θͤരൃ • ͬͺΓҧ͏ͷͰ1ͭΔɺΛ܁Γฦ͠ 2019/04/24 17
Έ߹Θͤരൃ • ͜͜·ͰΔ 2019/04/24 18
Έ߹Θͤരൃ • ࠷ޙ·ͰͬͯɺͬͺΓϚον͠ͳ͍ 2019/04/24 19
Έ߹Θͤരൃ • * Λ0ճͱղऍͯ࣍͠ΛௐΔ 2019/04/24 20
Έ߹Θͤരൃ • ͬͺΓϚον͠ͳ͍ͷͰ1ͭͣͭޙΖʹ 2019/04/24 21
Έ߹Θͤരൃ • 1ݸͣͭͬͯͬͱϚον͠ͳ͍ͷ͕֬ఆ 2019/04/24 22
͜Ε͕ԿΛҙຯ͢Δ͔ʁ
ԿΛҙຯ͢Δ͔ • લ·ͰҰகͯ͠ɺ ࠷ޙͷ1จࣈ͚ͩϚον͠ͳ͍จࣈྻΛ ϝʔϧΞυϨεཝʹ์ΓࠐΉ͚ͩͰ DoS߈ܸ͕Ͱ͖Δ 2019/04/24 24
DoS߈ܸ • ϦιʔεʹҙਤతʹաͳෛՙΛ͔͚ͨΓ ੬ऑੑΛ͍ͭͨΓ͢ΔࣄͰ αʔϏεΛ͢Δ߈ܸख๏ͷ͜ͱ – F5ΞλοΫͱ͔ • ਖ਼نදݱΛͬͨDoSReDoSͱݺΕΔ 2019/04/24
25
͞Βʹ൵͍͜͠ͱʹɺ ϝΞυͷ͞Ͱ͚ͳ͍
࣮ߦ݁Ռ 2019/04/24 27
ϝʔϧΞυϨεͷఆٛ • RFC1035, 5321ΑΓ – ϝʔϧΞυϨεશମ256จࣈҎ – Ϣʔβ໊ʢ@ͷલʣ64จࣈҎ – υϝΠϯ255จࣈҎ
– υϝΠϯͷϥϕϧ63จࣈҎ • test.example.com <- ྫ͑͜͜ – ଞɺ͑Δจࣈܾ·͍ͬͯΔ 2019/04/24 28
Ͳ͏͢ΕΑ͍ͷ͔ʁ
จࣈྻΛ۠ͬͯ͘͠ γϯϓϧͳਖ਼نදݱͰఆ
ͱ͍͑ɺ ͍͍࣮ͪͪ͢Δͷ໘
ͱ͍͏Θ͚Ͱ (FNΛ࡞Γ·ͨ͠
reredos 2019/04/24 33
reredos • ReDoSʹڧ͍ϝΞυͷόϦσʔγϣϯΛߦ͍ɺ true/false Ͱฦ͢γϯϓϧͳgem • ࠓޙͷ༧ఆ – ଘࡏ͠ͳ͍TLDΛ͘ –
URLʹରԠ͢Δ • PR͓ͪͯ͠·͢ 2019/04/24 34
·ͱΊ • ਖ਼نදݱͰDoS߈ܸΛ͔͚Δख๏͕͋Δ – ReDoSͱ͍͏ • ෳࡶͳਖ਼نදݱආ͚Δ͖ – ༷ΛͪΌΜͱಡΜͰɺ͍୯ҐͰνΣοΫΛ͢ Δ͜ͱΛ৺͕͚Α͏
• ϝΞυͰόϦσʔγϣϯ͔͚ΔgemΛ࡞ͬͨ 2019/04/24 35
ฏ͕ऴΘΔલʹରԠ͠Α͏
ࣗݾհ • Shu OGAWARA (@expajp ) – ϦϯΧʔζגࣜձࣾ – Ruby/Railsྺ2ऑ
– ग़ௗऔɺେֶਆށ – झຯΫϥγοΫܥͷ߹এ 2019/04/24 37