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
Recruit
PRO
August 10, 2023
Technology
1
1.8k
攻撃と防御で実践するプロダクトセキュリティ演習
2023年度リクルート エンジニアコース新人研修の講義資料です
Recruit
PRO
August 10, 2023
Tweet
Share
More Decks by Recruit
See All by Recruit
Balancing Revenue Goals and Off-Policy Evaluation Performance in Coupon Allocation
recruitengineers
PRO
1
14
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
VPC Traffic Mirroring とOSS を利⽤した ネットワークフォレンジック基盤の構築・運⽤
recruitengineers
PRO
1
45
スタサプ ForSCHOOLアプリのシンプルな設計
recruitengineers
PRO
3
1.1k
リクルート流データ基盤塾~鶴谷と学ぶ~
recruitengineers
PRO
5
250
『SUUMO』 スマホサイト デザインリニューアルへの挑戦
recruitengineers
PRO
5
340
『リクルートダイレクトスカウト』 のリニューアルから振り返る: ビジョンドリブンの可能性
recruitengineers
PRO
3
310
負債あるモノリスのオブザーバビリティに組織で向き合う
recruitengineers
PRO
9
400
あなたの知らないiOS開発の世界
recruitengineers
PRO
4
330
Other Decks in Technology
See All in Technology
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
220
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
The Rise of LLMOps
asei
9
1.7k
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
0
160
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
2
310
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
920
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
710
"とにかくやってみる"で始めるAWS Security Hub
maimyyym
2
100
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Documentation Writing (for coders)
carmenintech
65
4.4k
Adopting Sorbet at Scale
ufuk
73
9.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
The World Runs on Bad Software
bkeepers
PRO
65
11k
Docker and Python
trallard
40
3.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Transcript
߈ܸͱޚͰ࣮ફ͢ΔϓϩμΫτηΩϡϦςΟԋश ʙಋೖύʔτʙ ๎ Ճ౻ࠤ೭ี
ߨࢣͷհ
ߨࢣͷհ ๎ / Tomoya Nakanishi 2022ೖࣾ 2 झຯɿ
࠷ۙͬͨ͜ͱɾΓ͍ͨ͜ͱɿ өըؑɺ ͨ·ʹཱྀߦɺͨ·ʹCTF ɾSECCON 2022ຊબग़ ɾΫϥυܥͷηΩϡϦςΟษڧ ɾηΩϡϦςΟܥͷࢿ֨औಘʢOSCPऔಘࡁɺ࣍OSEPʣ
ߨࢣͷհ Ճ౻ ࠤ೭ี /Sanosuke Kato 2021ೖࣾ 3 झຯɿ ࠷ۙͬͨ͜ͱɾΓ͍ͨ͜ͱɿ
ήʔϜʢRocket Leagueʣɺͨ·ʹυϥΠϒɺԻָؑɺF1؍ઓ ɾCAPTCHAύζϧͷ༗ޮੑݕূ ɾLinuxͷ࣮ߦόΠφϦʹର͢Δ߈ܸख๏ͷΩϟονΞοϓ
ϓϩμΫτηΩϡϦςΟʹ͍ͭͯ
ϓϩμΫτͱηΩϡϦςΟ ϓϩμΫτར༻Λ௨༷ͯ͡ʑͳใࢿ࢈͕ू·Δ ۚ༥ࢿ࢈ ΫϥΠΞϯτͷใ ΧελϚʔͷใ
ϓϩμΫτར༻Λ௨༷ͯ͡ʑͳใࢿ࢈͕ू·Δ ۚ༥ࢿ࢈ ΧελϚʔͷใ ΫϥΠΞϯτͷใ ੬ऑੑ ੬ऑੑ ηΩϡϦςΟΛߟྀ͠ͳ͍࣮ ੬ऑੑΛੜΈग़͢ݪҼʹ ϓϩμΫτͱηΩϡϦςΟ
ϓϩμΫτར༻Λ௨༷ͯ͡ʑͳใࢿ࢈͕ू·Δ ۚ༥ࢿ࢈ ΧελϚʔͷใ ΫϥΠΞϯτͷใ ੬ऑੑΛѱ༻͞ΕΔͱɺ ͜ΕΒΛૂΘΕΔϦεΫ ੬ऑੑ ੬ऑੑ ϓϩμΫτͱηΩϡϦςΟ
ϓϩμΫτͷηΩϡϦςΟΛͲ͏֬อ͢Δʁ
ઈରʹ߈ܸ͞Εͳ͍࠷ڧͷํ๏
ϓϩμΫτΛఏڙ͠ͳ͕Βɺ ηΩϡϦςΟͷʹରॲ͠ͳ͚ΕͳΒͳ͍ ઈରʹ߈ܸ͞Εͳ͍࠷ڧͷํ๏
զʑͷۀ ཁ݅ఆٛઃܭࢿྉʹର͠ɺ ηΩϡϦςΟ؍ͰͷϦεΫ ΛϨϏϡʔɺૣظʹରࡦͰ͖ ΔΑ͏ʹ͢Δ ։ൃࡁΈͷϓϩμΫτͷ੬ऑੑ Λൃݟͯ͠ɺमਖ਼ͷͨΊͷࢧԉ Λ͢Δ αʔυύʔςΟͷ੬ऑੑΛ
ϞχλϦϯάͯ͠ɺࣾͷӨ ڹௐࠪͱରԠґཔΛ͢Δ ੬ऑੑݕࠪ ্ྲྀఔࢧԉ ૣظܯռ ϓϩμΫτͷηΩϡϦςΟΛʮ͔֬ͳͷʹ͢Δʯ͜ͱΛతʹɺ ༷ʑͳఔͰ։ൃऀΛࢧԉ͢Δۀ
ࠓճͷߨٛ߈ܸͱޚͰ࣮ફ͢ΔϓϩμΫτηΩϡϦςΟԋशͰɺ ߈ܸऀ͕ͲͷΑ͏ʹ੬ऑੑΛѱ༻͢Δͷ͔ΛΔ͜ͱͰɺ ਖ਼͘͠੬ऑੑΛमਖ਼͢ΔͨΊͷࣝͱํ๏ Λʹ͚ͭ·͢
ࠓճͷߨٛ༰
ࠓճʮCTFʯͱݺΕΔܗࣜͰνʔϜ͝ͱͷԋश CTFͱʁ Capture The Flag νʔϜ͝ͱʹ֫ಘͨ͠ϙΠϯτΛڝ͏ ઐٕࣝज़Λۦͯ͠Ӆ͞Ε͍ͯΔFlagʢ͑ʣΛݟ͚ͭग़͠ɺ ࣌ؒʹ֫ಘͨ͠߹ܭΛڝ͏ϋοΩϯάίϯςετ
WebΞϓϦέʔγϣϯͷ࣮Ͱ ҰൠతʹΑ͘ݟΒΕΔ੬ऑੑΛࡐʹग़ ʹ͍ͭͯ ‣ ΞΫηε੍ޚෆඋ ‣ ೝূೝՄػೳͷෆඋ ‣ ҙϑΝΠϧΞοϓϩʔυ
‣ SQLΠϯδΣΫγϣϯ ‣ OSίϚϯυΠϯδΣΫγϣϯ ‣ σΟϨΫτϦτϥόʔαϧ ‣ XSS ‣ CSRF ‣ ΦʔϓϯϦμΠϨΫτ ੬ऑੑ ࣮
ʹ͍ͭͯ ओʹ3छྨ ੬ऑੑΛѱ༻ͯ͠ൿີͷFlagΛऔಘ͠ ͯɺૹ৴͢Δ͜ͱͰϙΠϯτΛ֫ಘͰ ͖Δ ߈ܸʢattackʣ ѱ༻Մೳͳ੬ऑੑΛཁ݅ʹԊͬͯमਖ਼ ͯ͠ϦϙδτϦʹίϛοτޙɺߨࢣʹ ֬ೝͯ͠Β͏͜ͱͰϙΠϯτΛ֫ಘ
Ͱ͖Δ ޚʢdefenseʣ ੬ऑੑʹؔ͢Δ࣭ʹର͢Δਖ਼͍͠ ͑Λૹ৴͢Δ͜ͱͰϙΠϯτΛ֫ಘ Ͱ͖Δ ࣭ʢquestionʣ
νʔϜ͚ ඇެ։
ߨٛͷεέδϡʔϧ ඇެ։
ҙࣄ߲ ‣ଞͷडߨੜߨٛͷਐߦΛ͛ΔߦҝΛ͠ͳ͍͜ͱ - ߨٛͷ߹্ɺҙਤ͠ͳ͍ܗͰ͜ͷΑ͏ͳߦҝʹͳΔ߹͋ΔͷͰɺͦͷࡍߨࢣͷࢦࣔʹ ै͍ͬͯͩ͘͞ ‣ීஈͷύεϫʔυϝʔϧΞυϨεΛ༻͠ͳ͍͜ͱ - ࣗͷ࣮ࡍͷύεϫʔυͳͲ͕࿙Ӯ͢ΔՄೳੑ͕͋Γ·͢ -
࣮ࡍͷͷΛར༻͠ͳͯ͘ղ͚Δʹͳ͍ͬͯ·͢ ‣ߨٛͷղެ։͠ͳ͍͜ͱ - νʔϜͰͷใڞ༗ɺSlackͷϓϥΠϕʔτνϟϯωϧGHEͷPrivateϦϙδτϦΛར༻ ͍ͯͩ͘͠͞ - Λདྷͷݚमʹ͏Մೳੑ͕͋ΔͷͰɺΠϯλʔωοτ্ʹެ։͠ͳ͍Ͱ͍ͩ͘͞
‣ڐՄ͞ΕͨWebαΠτҎ֎ͷ੬ऑੑΛ߈ܸ͠ͳ͍͜ͱ ʢෆਖ਼ΞΫηεېࢭ๏ʣ ‣ਖ਼ͳཧ༝ͳ͘ϚϧΣΞΛऔಘɾอ༗͠ͳ͍͜ͱ ʢෆਖ਼ࢦྩి࣓తهʹؔ͢Δࡑʣ ‣Πϯλʔωοτ্Ͱ͞ΕΔιϑτΣΞͷར༻࣌ʹɺ ͦΕΒͷ৴པੑΛࣄલʹ֬ೝ͢Δ͜ͱʢใηΩϡϦςΟରࡦج४ʣ - Ұ෦ͷͰΠϯλʔωοτ্Ͱݕࡧͨ͠߈ܸίʔυΛ୳͢ͷ͕͋Γ·͕͢ɺߨࢣͷ֬ೝ ͕औΕΔ·Ͱɺखݩʹμϯϩʔυ͢Δ͜ͱ͕ແ͍Α͏ʹҙ͍ͯͩ͘͠͞
- ѱੑͷ߈ܸπʔϧͷར༻͕ݕ͞Εͨ߹ɺPCͷॳظԽΛ͓ئ͍͢Δ͜ͱ͕͋Γ·͢ ҙࣄ߲ʢຊߨٛதʹݶΒͣؾΛ͚ͭΔ͜ͱʣ
ԋशͷਐΊํ
ԋशͷਐΊํ ‣͔͜͜ΒνʔϜ͝ͱʹ͔Ε࣮ͯࡍʹखΛಈ͔͠ͳ͕ΒਐΊ͍͖ͯ·͢ ‣νʔϜͰΘ͔Βͳ͍ਓ͕͍Εڭ͑߹͏ͳͲɺޓ͍ʹॿ͚߹͍ͳ͕Β ਐΊ͍ͯͩ͘͞ ‣ ΦϯϥΠϯͷਓ͕͍Δ߹ʹɺߨࢣࢀՃͰ͖ΔΑ͏ɺߨࢣ͕ೖ͍ͬͯΔSlack νϟϯωϧͷϋυϧΛ׆༻͍ͯͩ͘͠͞ ‣αʔόʔʹଓͰ͖ͳ͍ͳͲͷτϥϒϧ࣌SlackͰϝϯγϣϯ ʢ@pdo-fye0324bc-product-security-tutors
ʣΛ͚ͯߨࢣʹΒ͍ͤͯͩ͘͞ɺ αʔόʔϦηοτͳͲͷରԠΛߦ͍·͢ ‣ձࣾͷϧʔϧ๏Λक্ͬͨͰ͋Εɺར༻͢ΔπʔϧαΠτʹ੍ݶ͋Γ· ͤΜ
ࣄલ४උ ‣Burp Suite Community Edition: https://portswigger.net/burp/communitydownload ‣Docker Desktop: https://www.docker.com/products/docker-desktop/
‣࠷৽൛ͷChrome ͔ࣗΒࢀՃ͍ͯ͠ΔํɺΤχίω/Πϯίωʹଓͯ͠ ԋशڥʹΞΫηε͍ͯͩ͘͠͞
είΞαʔόʔʹ͍ͭͯ ࠓճͷԋशͰඞཁͳ࣍ͷ͜ͱ͕Ͱ͖ΔαʔόʔͰ͢ ͷճఏग़ ֫ಘͨ͠ ϙΠϯτͷ֬ೝ ॱҐͷ֬ೝ
Check 1: είΞαʔόʔͷΞΫηεͱϩάΠϯ ӈ্ͷ-PHJOΛΫϦοΫ ͞ΕͨείΞαʔόʔͷ63-Λ։͘ʢ͜ͷαʔόʔ߈ܸରͰͳ͍͜ͱʹҙʂʂʣ
Check 1: είΞαʔόʔͷΞΫηεͱϩάΠϯ νʔϜ͝ͱʹ͞Ε͍ͯΔϩάΠϯใͰϩάΠϯ
Check 1: Ұཡϖʔδͷ֬ೝ ˞௨ৗͷ$5'Ͱ͜͜ʹจ͕هࡌ͞Ε͍ͯ·͕͢ɺࠓճνʔϜ͝ͱʹ༻ҙ͞ΕͨυΩϡϝϯτΛࢀর͍ͯͩ͘͠͞
ʹ͍ͭͯ ‣༩ϙΠϯτɺattack͕100ɺdefenseɺᘳͳ߹100ɺෆ શͳ߹ʹ50͕جຊͰ͢ ‣Challenge͝ͱʹ൪߸͕ৼΒΕ͍ͯ·͕͢ɺղ͖͘ॱ൪қʹ ؔແ͍ͷͰɺͲͷॱ൪Ͱղ͍ͯΒͬͯߏ͍·ͤΜ ‣ͦΕͧΕͷChallengeղ͘ॱ൪ʹࢦఆ͋Γ·ͤΜ͕ɺ question→attack→defenseͷॱʹղ͘͜ͱΛఆ͍ͯ͠·͢ ‣֤Ͱͦͷ͕ղ͚ͨνʔϜΛ֬ೝͰ͖ΔͷͰɺଟ͘ͷνʔϜ ͕ղ͚͔ͨΒղ͘ͱɺқ͕͍͔͠Ε·ͤΜ
νϡʔτϦΞϧ
ͷ֬ೝ
Check 2: νϡʔτϦΞϧʢ߈ܸฤʣɿ֬ೝ ֤νʔϜʹ͞ΕͨυΩϡϝϯτ͔Βจ͕֬ೝͰ͖·͢
Check 3: νϡʔτϦΞϧʢ߈ܸฤʣɿ֬ೝ จதͷϦϯΫΛΫϦοΫͯ͠ɺ߈ܸରͷΞϓϦέʔγϣϯʹΞΫηε ϢʔβʔΛొͯ͠ϩάΠϯ͢ΔͱɺϓϩϑΟʔϧ͕දࣔ͞ΕΔγϯϓϧͳ8FCαΠτ
Check 4: νϡʔτϦΞϧʢ߈ܸฤʣɿιʔείʔυͷऔಘ $ git clone https:!" /bootcamp-2023- teamx.git
$ cd bootcamp-2023-teamx/ $ ls … fortune … ֤νʔϜʹ͞ΕͨϦϙδτϦΛΫϩʔϯͯ͠ɺιʔείʔυΛ֬ೝ ࠓճͷʮGPSUVOFʯͱ͍͏໊લͳͷͰɺಉ໊͡લͷʮGPSUVOFʯͱ͍͏ σΟϨΫτϦͷதʹΞϓϦέʔγϣϯͷίʔυ͕֨ೲ͞Ε͍ͯΔ
ΞϓϦέʔγϣϯͱιʔείʔυ͔Β ੬ऑੑΛ୳ͯ͠FlagΛ֫ಘ͠Α͏ʢ߈ܸฤʣ
νϡʔτϦΞϧʢ߈ܸฤʣɿFlagͷॴ 'MBH࠷ॳʹొ͞ΕΔཧऀϢʔβʔͷ lGMBHzΧϥϜʹ֨ೲ͞Ε͍ͯΔ lGMBHzΧϥϜͷɺ Ϣʔβʔ໊͕zBENJOzͷͱ͖ʹදࣔ fortune/src/database/seeders/UserSeeder.php fortune/src/resources/views/user.blade.php ·ͣɺͦΕͧΕͷΞϓϦέʔγϣϯʹ͓͚Δɺ ຊདྷΞΫηεͰ͖ͳ͍ใΛͨ͠z'MBHz͕Ͳ͜ʹ֨ೲ͞Ε͍ͯΔ͔Λ୳͢
Flagʹ͍ͭͯ ‣Flagͷܗࣜ͝ͱʹࢦఆ͕ͳ͍ݶΓɺ ctfRED{[\x20-\x7E]+} ʢ{} දࣔՄೳͳ1จࣈҎ্ͷASCIIจࣈʣͰ͢ ‣dummy{…} ͱ͍ͬͨμϛʔͷFlag͕දࣔ͞ΕΔ͜ͱ͕͋Γ·͕͢ɺ ຊͰͳ͍͜ͱʹҙ͍ͯͩ͘͠͞ ‣͞ΕͨιʔείʔυதͰɺຊͷFlag͕ϚεΫ͞Ε͍ͯ·͢
‣Flagૹ৴ϑΥʔϜ͔ΒԿճૹ৴ͯ͠ϙΠϯτ͕ݮΔ͜ͱ͋Γ· ͤΜ͕ɺਪଌ͕ࠔͳจࣈྻʹͳ͍ͬͯ·͢
੬ऑੑʹ͍ͭͯ ‣࣍ͷ੬ऑੑࠓճͷ߈ܸରͰ͋Γ·ͤΜ • HTTPΛར༻ͯ͠௨৴͍ͯ͠Δ • CookieʹSecureଐੑ͕༩͞Ε͍ͯͳ͍ • DoS߈ܸ͕Մೳ •
ϩάΠϯࢼߦճʹ੍ݶ͕ͳ͍
%PDLFS$PNQPTF ߈ܸରΞϓϦͷߏʢࢀߟʣ ͞Ε͍ͯΔιʔείʔυͷ%PDLFS$PNQPTFΛىಈͨ͠αʔόʔΛ༻ҙ ֤ϙʔτѼͷ&-#͕༻ҙ͞Ε͍ͯΔߏ BQQ DSBXMFS NZTRM OHJOY QIQ
%PDLFS$PNQPTF IUUQMCIPHFBQQDBG FMCBQOPSUIFBTUBNB[POBXTDPN IUUQMCIPHFDSBXMFSEBDBFFFCG FMCBQOPSUIFBTUBNB[POBXTDPN IUUQMCGVHBFCCC FMCBQOPSUIFBTUBNB[POBXTDPN
͜ͷ͋ͱʹ͕͑͋ΔͷͰݟΔࡍҙ
νϡʔτϦΞϧʢ߈ܸฤʣɿ੬ऑੑ ϩάΠϯ͍ͯ͠ΔϢʔβʔͷࣝผΛ͢ΔϩδοΫΛݟͯΈΔͱɺ VTFS@JEͱ͍͏$PPLJF͔Β*%Λऔಘͯ͠ϢʔβʔͷใΛऔಘ͍ͯ͠Δ͜ͱ͕Θ͔Δ
νϡʔτϦΞϧʢ߈ܸฤʣɿ੬ऑੑ ཧऀϢʔβʔΞϓϦέʔγϣϯͷσϓϩΠ࣌ʹ࠷ॳʹొ͞Ε͍ͯΔͷͰɺ ཧऀϢʔβʔͷVTFS@JEͰ͋Δ͜ͱ͕༧Ͱ͖Δ (PPHMF$ISPNF%FWFMPQFS5PPMTΛར༻ͯ͠ɺ$PPLJFΛฤू VTFS@JEΛʹมߋ
νϡʔτϦΞϧʢ߈ܸฤʣɿ੬ऑੑ ͏ҰϦΫΤετΛૹ৴͢Δͱɾɾɾ 'MBH͕දࣔ͞Εͨ
Check 5: νϡʔτϦΞϧʢ߈ܸฤʣͷϑϥάఏग़ ֫ಘͨ͠'MBHΛ ͝ͱͷϑΥʔϜ͔Βૹ৴ ͕৭ʹมԽͯ͠ ϙΠϯτ֫ಘ ˞օ͞Μͷਐḿ۩߹Λ֬ೝ͍ͨ͠ͷͰɺ ϑϥάͳΔ͘ཷΊࠐ·ͣʹఏग़Λ͓ئ͍͠·͢
߈ܸʹར༻Ͱ͖ͨ੬ऑੑΛमਖ਼ͯ͠ΈΑ͏ʢޚฤʣ
मਖ਼ʹ͍ͭͯ ‣੬ऑੑҎ֎ͷ෦ͷಈ࡞Ͱ͖Δ͚ͩอͬͨ··Ͱमਖ਼Λߦͬͯͩ͘ ͍͞ ‣Ұؾʹଟ͘ͷఏग़͕͋Δͱ֬ೝ͕େมʹͳΔͷͰɺमਖ਼ਵ࣌ఏग़͠ ͯΒ͑Δͱॿ͔Γ·͢ αϒϚϦϯઓ๏
Check 6: νϡʔτϦΞϧʢޚฤʣɿमਖ਼ͷಈ࡞֬ೝ $ cd bootcamp-2023-teamx/fortune $ ls docker
docker!entrypoint.sh src docker!compose.yml resources # dockerίϯςφͷىಈͱಉ࣌ʹιʔείʔυΛؚΊͨϏϧυΛ͢Δ # αʔό͕ىಈͯ͠ɺhttp:"#localhost:8000/ ͔ΒΞΫηεͰ͖Δ $ docker compose up "$build ͞ΕͨϦϙδτϦͷίʔυΛमਖ਼ɺEPDLFSDPNQPTFͰαʔόΛىಈͯ͠ಈ࡞֬ೝ
Docker Composeͷجຊૢ࡞ # phpαʔϏεͷίϯςφͰγΣϧΛىಈ $ docker compose exec php
/bin/bash # ίϯςφΛআ $ docker compose down
Check 7: νϡʔτϦΞϧʢޚฤʣɿίʔυͷमਖ਼ ϑϨʔϜϫʔΫʹ༻ҙ͞Εͨηογϣϯؔ࿈ͷ"1*Λར༻ͯ͠ɺ VTFS@JEͷอࢀর͢Δͱ҆શʹमਖ਼Ͱ͖Δ fortune/src/app/Http/Controllers/UserController.php ϩάΠϯ࣌ͷϢʔβʔใऔಘɺηογϣϯ$PPLJFΛར༻͢Δͷ͕Ұൠత
Check 8: νϡʔτϦΞϧʢޚฤʣɿमਖ਼ͷఏग़ NBTUFSϒϥϯνʹमਖ਼ίϛοτΛؚΊͨޙɺ4MBDLͷ֤νʔϜͷνϟϯωϧʹͯɺ ԼهͷΑ͏ͳϝοηʔδͰߨࢣʹ௨͍ͯͩ͘͠͞ ߨࢣ͕֬ೝޙɺείΞαʔόʔ্ͰϙΠϯτΛ༩ͯ͠ɺ݁ՌΛฦ৴͠·͢ ʢNBTUFSϒϥϯνͷΈ͕࠾ରͰ͋Δ͜ͱʹҙʣ
Check 9: είΞαʔόʔ্Ͱͷ֫ಘϙΠϯτͷ֬ೝ 4DPSFCPBSEλϒ͔Βɺ֤νʔϜ͕֫ಘͨ͠Λ֬ೝͰ͖Δ
Λղ͘ࡍʹ༗༻ͳπʔϧͷجຊతͳ͍ํ
Chrome Developer Tools 0QUJPO $PNNBOEʴ*Ͱىಈ ʮιʔεʯλϒ ݱࡏͷϖʔδͷදࣔʹඞཁͳ)5.-ɺ+4ɺ$44ͳͲ ΛӾཡͰ͖Δ +4ͷ߹ɺߦ൪߸ΛΫϦοΫ͢Δ͜ͱͰɺ
ϒϨʔΫϙΠϯτΛઃఆͰ͖ɺ ॲཧ్தͷมͷͳͲΛݟΔ͜ͱ͕Ͱ͖Δ
Chrome Developer Tools ʮΞϓϦέʔγϣϯʯλϒ ද͍ࣔͯ͠Δ8FCαΠτ͕ར༻Ͱ͖Δ $PPLJFMPDBM4UPSBHFͷӾཡฤू͕Մೳ ʮωοτϫʔΫʯλϒ ϒϥβͰൃੜͨ͠ϦΫΤετΛӾཡͰ͖Δ ʮϩάΛอ࣋ʯʹνΣοΫΛ͚Δ͜ͱͰϖʔδભҠ͕
ൃੜͯ͠ɺϦΫΤετ͕আ͞Εͳ͘ͳΔ
BurpSuite ىಈޙʹʮ1SPYZʯˠʮ*OUFSDFQUʯ͔Β ʮ0QFOCSPXTFSʯΛΫϦοΫ͢Δ͜ͱͰɺΈࠐΈϒϥβ͕ىಈ
BurpSuite ʮ*OUFSDFQUJTPOʯͷঢ়ଶʹ͢ΔͱϒϥβͰൃੜͨ͠ϦΫΤετΛதஅ͠ɺ ฤूΛͯ͠ɺૹ৴͢Δ͜ͱ͕Ͱ͖Δ
curl # CookieϔομΛઃఆͯ͠ϦΫΤετ $ curl -H ‘Cookie: user_id=1’ http:!"localhost:8000/
# ϑΥʔϜͷૹ৴ $ curl -X POST #d ‘param=1¶m2=hoge’ http:!"example.com/ # ϑΝΠϧΛΞοϓϩʔυ $ curl -X POST -F upfile=@/path/to/sample.txt http:!"example.com/upload λʔϛφϧ͔Β)551ϦΫΤετΛૹ৴Ͱ͖Δπʔϧ
Pythonͷrequests $ python3 #m pip install requests 1ZUIPOͷ)551ΫϥΠΞϯτϥΠϒϥϦ import
requests r = requests.get(‘http:!"example.com') print(r.text) r = requests.post(‘http:!"example.com', data={‘param1’: ‘value1’}, headers={‘Cookie’: ‘hoge=fuga’}) print(r.text)
webhook.site IUUQTXFCIPPLTJUFʹΞΫηε͢Δͱɺࣗಈతʹ63-͕ൃߦ͞ΕΔ
webhook.site $curl -X POST !d ‘hoge=fuga' https:"# webhook.site/ /
<scri t>fetch(‘htt s:"#webhook.site/ ’) "%script> ϒϥβͰΞΫηε DVSMͰૹ৴͢Δ TDSJQUλάͰϦΫΤετૹ৴ ൃߦ͞Εͨ63-ʹԿΒ͔ͷํ๏ͰϦΫΤετΛૹ৴
webhook.site ൃߦ͞Εͨ63-Ѽͷ)551ϦΫΤετͷதΛ֬ೝͰ͖Δ NFUIPEͱ63- ΫΤϦύϥϝʔλ ϦΫΤετϘσΟ ϦΫΤετϔομ
࠷ޙʹ
ϙΠϯτΛଟ֫͘ಘͨ͠νʔϜ ࠓճͷԋशͷউऀ
ϙΠϯτΛଟ֫͘ಘͨ͠νʔϜ ࠓճͷԋशͷউऀ Ͱͳ͘ɾɾɾ
ϙΠϯτΛଟ֫͘ಘͨ͠νʔϜ ࠓճͷԋशͷউऀ Ͱͳ͘ɾɾɾ Ͱ͖Δ͚ͩଟ͘ͷ͜ͱΛֶͨνʔϜ
ϙΠϯτΛଟ֫͘ಘͨ͠νʔϜ ࠓճͷԋशͷউऀ Ͱͳ͘ɾɾɾ Ͱ͖Δ͚ͩଟ͘ͷ͜ͱΛֶͨνʔϜ νʔϜͷதͰڠྗ͋ͬͯ͠ԋशΛਐΊ͍ͯͩ͘͞ ߨࢣਞ͔Βͷώϯτੵۃతʹ׆༻͍ͯͩ͘͠͞
None