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
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
4
550
SREは、MCPとAutopilotをこう使え!
kazumax55
2
630
「守り」で活用するオンデバイスLLM 〜写ってはいけないを総力戦で防ぐ〜 / iOSDC Japan 2026
nakamuuu
0
140
OpenTelemetryのメトリクスをCloudWatchに送ってPromQLで見てみた
ota1022
0
150
安心して変更できるWebフロントエンドの作り方
pirosikick
4
2.1k
GoにおけるFFIのこれまでとこれから
goccy
5
2.6k
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
180
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
270
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
0
1.5k
10分で知る最近のOmarchy
komagata
0
290
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
300
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
200
Featured
See All Featured
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
Technical Leadership for Architectural Decision Making
baasie
3
560
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
900
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
The Cost Of JavaScript in 2023
addyosmani
55
10k
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