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
2.2k
攻撃と防御で実践するプロダクトセキュリティ演習
2023年度リクルート エンジニアコース新人研修の講義資料です
Recruit
PRO
August 10, 2023
Tweet
Share
More Decks by Recruit
See All by Recruit
Browser
recruitengineers
PRO
5
690
JavaScript 研修
recruitengineers
PRO
4
420
TypeScript入門
recruitengineers
PRO
26
7.9k
モダンフロントエンド 開発研修
recruitengineers
PRO
4
1k
Webアクセシビリティ入門
recruitengineers
PRO
2
470
攻撃と防御で実践するプロダクトセキュリティ演習~導入パート~
recruitengineers
PRO
3
440
モバイルアプリ研修
recruitengineers
PRO
4
500
事業価値と Engineering
recruitengineers
PRO
3
1.1k
制約理論(ToC)入門
recruitengineers
PRO
5
910
Other Decks in Technology
See All in Technology
新規案件の立ち上げ専門チームから見たAI駆動開発の始め方
shuyakinjo
0
140
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
2
20k
Goでマークダウンの独自記法を実装する
lag129
0
220
ZOZOTOWNフロントエンドにおけるディレクトリの分割戦略
zozotech
PRO
18
5.5k
あなたの知らない OneDrive
murachiakira
0
240
ドキュメントはAIの味方!スタートアップのアジャイルを加速するADR
kawauso
3
410
[CVPR2025論文読み会] Linguistics-aware Masked Image Modelingfor Self-supervised Scene Text Recognition
s_aiueo32
0
210
.NET開発者のためのAzureの概要
tomokusaba
0
230
Goss: New Production-Ready Go Binding for Faiss #coefl_go_jp
bengo4com
0
1.1k
生成AI利用プログラミング:誰でもプログラムが書けると 世の中どうなる?/opencampus202508
okana2ki
0
190
GitHub Copilot coding agent を推したい / AIDD Nagoya #1
tnir
4
4.7k
R-SCoRe: Revisiting Scene Coordinate Regression for Robust Large-Scale Visual Localization
takmin
0
430
Featured
See All Featured
Designing for humans not robots
tammielis
253
25k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
Thoughts on Productivity
jonyablonski
69
4.8k
Producing Creativity
orderedlist
PRO
347
40k
Building Adaptive Systems
keathley
43
2.7k
Writing Fast Ruby
sferik
628
62k
Building Applications with DynamoDB
mza
96
6.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Code Reviewing Like a Champion
maltzj
525
40k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
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