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
550
脆弱性を作ってみた
雑兵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.3k
20220926_セキュリティチームの今_for_Drs._Prime_公開用.pdf
sota1235
0
92
再発防止策を考える技術 / #phpconsen
sota1235
10
3.7k
How to choose the best npm module for your team?
sota1235
9
560
Realtime Database for high traffic production application
sota1235
7
3.9k
Road to migrate JP Web as a microservice
sota1235
4
1.5k
インターフェース再入門 / Think Interface again
sota1235
6
10k
再発防止策を考える技術 #phpconfuk_rej
sota1235
1
1.2k
Update around Firebase #io18
sota1235
3
4.3k
Other Decks in Technology
See All in Technology
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
840
ドメイン駆動設計の実践により事業の成長スピードと保守性を両立するショッピングクーポン
lycorptech_jp
PRO
9
860
2024年活動報告会(人材育成推進WG・ビジネスサブWG) / 20250114-OIDF-J-EduWG-BizSWG
oidfj
0
130
Amazon Route 53, 待ちに待った TLSAレコードのサポート開始
kenichinakamura
0
150
RubyでKubernetesプログラミング
sat
PRO
4
160
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
180
My small contributions - Fujiwara Tech Conference 2025
ijin
0
1.4k
今年一年で頑張ること / What I will do my best this year
pauli
1
220
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
6
6.3k
エンジニアリングマネージャー視点での、自律的なスケーリングを実現するFASTという選択肢 / RSGT2025
yoshikiiida
4
3.6k
AWSマルチアカウント統制環境のすゝめ / 20250115 Mitsutoshi Matsuo
shift_evolve
0
100
2025年に挑戦したいこと
molmolken
0
150
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
GitHub's CSS Performance
jonrohan
1030
460k
Thoughts on Productivity
jonyablonski
68
4.4k
Gamification - CAS2011
davidbonilla
80
5.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
How to train your dragon (web standard)
notwaldorf
89
5.8k
A Philosophy of Restraint
colly
203
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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'͋ΔͷͰڵຯ͕͋Δํͥͻ