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
脆弱性を作ってみた
Search
Sota Sugiura
December 22, 2016
Technology
1
560
脆弱性を作ってみた
雑兵MeetUp #8@21cafe
Sota Sugiura
December 22, 2016
Tweet
Share
More Decks by Sota Sugiura
See All by Sota Sugiura
内製したSlack Appで頑張るIncident Response@Waroom Meetup #1 / Incident Response with Slack App in 10X
sota1235
0
1.7k
20220926_セキュリティチームの今_for_Drs._Prime_公開用.pdf
sota1235
0
140
再発防止策を考える技術 / #phpconsen
sota1235
10
3.9k
How to choose the best npm module for your team?
sota1235
9
600
Realtime Database for high traffic production application
sota1235
7
4k
Road to migrate JP Web as a microservice
sota1235
4
1.6k
インターフェース再入門 / Think Interface again
sota1235
6
11k
再発防止策を考える技術 #phpconfuk_rej
sota1235
1
1.2k
Update around Firebase #io18
sota1235
3
4.3k
Other Decks in Technology
See All in Technology
Yahoo!広告ビジネス基盤におけるバックエンド開発
lycorptech_jp
PRO
1
260
モノレポにおけるエラー管理 ~Runbook自動生成とチームメンションの最適化
biwashi
0
540
DeNA での思い出 / Memories at DeNA
orgachem
PRO
2
990
いま、あらためて考えてみるアカウント管理 with IaC / Account management with IaC
kohbis
2
680
Product Management Conference -AI時代に進化するPdM-
kojima111
0
210
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
2
20k
Backboneとしてのtimm2025
yu4u
3
1.3k
広島銀行におけるAWS活用の取り組みについて
masakimori
0
120
あなたの知らない OneDrive
murachiakira
0
230
kintone開発チームの紹介
cybozuinsideout
PRO
0
73k
第4回 関東Kaggler会 [Training LLMs with Limited VRAM]
tascj
11
1.6k
ABEMAにおける 生成AI活用の現在地 / The Current Status of Generative AI at ABEMA
dekatotoro
0
630
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Writing Fast Ruby
sferik
628
62k
Unsuck your backbone
ammeep
671
58k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
How GitHub (no longer) Works
holman
315
140k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
How to Ace a Technical Interview
jacobian
279
23k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Transcript
੬ऑੑΛ࡞ͬͯΈͨ !TPUB͖ΓΜ ࡶฌ.FFU6Q
ࣗݾհ w ͖ΓΜͰ͢ w !TPUB w ໌͔Βࢮͷ͕ؒ࢝·Γ· ͕͢Έͳ͞ΜਐḿͲ͏Ͱ͔͢
੬ऑੑΛ࡞ͬͪΌͬͨͰͳ͘ ࡞ͬͯΈͨͰ͢ ̃䯡ՙ☭岩ՙՊլՖ㈕ՙՊլ
߈ܸຊೳͷ w ਓਐԽ͢ΔલԐͩͬͨ w ՐΛ͍ɺಓ۩Λ͍ɺङΓΛߦ͏͜ͱͰੜ͖ Ԇͼ͖ͯͨ w ߈ܸ͢Δ͜ͱͱੜ͖Δ͜ͱͦͷͷ
ਓੜJT ԐͷγϦʔζΑΓ
ϓϩάϥϚʹ͓͚Δ߈ܸຊೳ w ϓϩάϥϚਓؒ w વɺ߈ܸຊೳΛඋ͍͑ͯΔ w ࣮ϓϩάϥϚͱ߈ܸੑີʹؔͯ͠Δͱ ݴΘΕ͍ͯΔ
·͊ӕͳΜͰ͚͢Ͳ IUUQKJHPLVOPDPNFJE@IUNM
·͊ӕͳΜͰ͚͢Ͳ Ͱ૽ͳਓ͕ଟ͍ؾ͠·͢ΑͶ IUUQKJHPLVOPDPNFJE@IUNM
ݱ࣮ݫ͍͠ IUUQTUXJUUFSDPNIULC@TUBUVT
ݱ࣮ݫ͍͠ IUUQTUXJUUFSDPNIULC@TUBUVT
ఘΊΔ͔͠ແ͍ͷ͔ w ߹๏తʹ߈ܸຊೳΛຬͨ͢ํ๏͕ʜ w ͋Γ·͊ SZ
$BQUVSF 5IF 'MBH
$BQUVSF5IF'MBH w ضऔΓ߹ઓ w αʔόʹ৵ೖͨ͠ΓηΩϡϦςΟʹ·ͭΘΔ Λղ͍ͯضΛऔΔ w 4&$$0/ͱ͔༗໊Ͱ͢ΑͶ
ຊ w ઌɺ͚ʹ$5'Λͬͨ w ඍົʹܦݧ͕͋ͬͨͷͰ࡞Γͱ͔ͬͨ
༷ࢠ
༷ࢠ
ग़δϟϯϧΛܾΊΔ w $5'ͷकඋൣғΊͪΌͪ͘Όେ w ҉߸ ϑΝΠϧղੳ ωοτϫʔΫ 8FC 'PSFOTJDT
QXO FUD w ࠓճ8FCͷਓ͕ଟ͔ͬͨͷͰ8FCଟΊʹͨ͠
Λߟ͑Δ w ͱ͍ͬͯࢲॳ৺ऀͳͷͰաڈͱ͔੬ऑੑ Λௐͳ͕Βߟ͑Δ w ͓͠Ζ͔ͬͨΓֶͼʹͳΓͦ͏ͳͷ͕͋Ε ࠾༻͍ͯ͘͠
Λߟ͑Δ
γφϦΦΛҙࣝ͢Δ w ͜Μͳ੬ऑੑ͕͋ͬͨΒ͜Μͳ͜ͱ͕Ͱ͖ͪΌ ͏ΑͶɺΈ͍ͨͳͷΛߟ͑Δ
Կݸ͔հ
ྫ͑ψϧόΠτ߈ܸ w /6--จࣈΛจࣈྻͷऴจࣈͱͯ͠ೝࣝ͢Δ ͜ͱΛར༻ͨ͠߈ܸ w ࠓճ1)1Ͱ࣮ͨ͠
ψϧόΠτ߈ܸ <?php $filename = $_GET['filename'].'png'; echo file_get_contents($filename);
ψϧόΠτ߈ܸ <?php $filename = $_GET['filename'].'png'; echo file_get_contents($filename); // /index.php?filename=/etc/passwd //
Ͱ.png͕अຐͦ͏…
ψϧόΠτ߈ܸ w ͓ΉΖʹJOEFYQIQ pMFOBNFUD QBTTXEʹΞΫηε͢Δ w ͢ΔͱpMF@HFU@DPOUFOUTΛऴจࣈͱ ͯ͠ೝࣝ͢ΔͷͰQOH͕ࣺͯΒΕΔ
ψϧόΠτ߈ܸ <?php $filename = $_GET['filename'].'png'; echo file_get_contents($filename); // /index.php?filename=/etc/passwd%00 //
ϢʔβҰཡൈ͚Δͧʂ
ྫ͑/P42-*OKFDUJPO w υΩϡϝϯτ%#Ͱى͖͏Δ੬ऑੑ w 1)1 NPOHP%#Ͱ࣮Ͱ͖Δ
/P42-ΠϯδΣΫγϣϯ <?php $name = $_GET['name']; return $db->find(['name' => $name]); //
/index.php?name=kirin
/P42-ΠϯδΣΫγϣϯ <?php $name = $_GET['name']; return $db->find(['name' => $name]); //
/index.php?name[$ne]=xͬͯΔͱ…
ྫ͑/P42-*OKFDUJPO w 1)1Ͱ(&5ΫΤϦετϦϯάΛ࿈ྻͰड ͚औΕΔ w OBNF<OF>YͬͯΔͱҎԼͷΑ͏ͳ͕ ͬͯ͘Δ
ྫ͑/P42-*OKFDUJPO w ͜ͷΫΤϦ͕ͦͷ··NPOHPʹΔͱ42-Ͱ ݴ͏ͱ͜Ζͷ8)&3&OBNFbY`ͱ͍͏݅ ཱ͕ͯ͠͠·͏
ͳΜͰ1)1͔ͬΓ͔ͬͯʁ w ؾ͍ͯ͠·ͬͨਓফ͞ΕΔͷͰؾ͔ͮͳ͍ ϑϦΛ͠·͠ΐ͏Ͷ ?Т? w 1)1Yd͓͏ɺܑ͓͞Μͱͷଋͩ ?Т?
ଞʹʜ w ύεϫʔυ͖ͭ;*1ղੳ w %JHFTU#BTJDBVUIFOUJDBUJPO w 944 w ҉߸ղੳ 305ͱ͔୯Ұࣈࣜͱ͔
ਅ໘ͳ w ࡞͢Δʹͭͷࢹ͕ඞཁ w ߈ܸऀࢹ w ։ൃऀࢹ w ʮప໌͚ʹ։ൃͯͨ͠ΒΪϦΪϦ͋Γ͏ΔʯΈ ͍ͨͳͭΛ࡞Δͷָ͍͠͠ษڧʹͳΔΑ
·ͱΊɿ$5'͠Α͏ w ߹๏తʹ߈ܸຊೳΛຬͨͤΔͷͰΦεεϝ w 8FCʹݶΒͣ෯͍ࣝΛٻΊΒΕΔͷͰษڧ ʹͳΔ w ৗறܕ$5'͋ΔͷͰڵຯ͕͋Δํͥͻ