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
XSSについて説明します
Search
hirari123
March 18, 2021
Programming
0
60
XSSについて説明します
非エンジニアがXSS(クロスサイトスクリプティング)について調べてみて説明しました。
hirari123
March 18, 2021
Tweet
Share
Other Decks in Programming
See All in Programming
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
260
命名をリントする
chiroruxx
1
410
KubeCon + CloudNativeCon NA 2024 Overviewat Kubernetes Meetup Tokyo #68 / amsy810_k8sjp68
masayaaoyama
0
250
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
190
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
550
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
Zoneless Testing
rainerhahnekamp
0
120
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
3
280
快速入門可觀測性
blueswen
0
370
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
470
良いユニットテストを書こう
mototakatsu
8
2.5k
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Designing Experiences People Love
moore
138
23k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Code Review Best Practice
trishagee
65
17k
Being A Developer After 40
akosma
87
590k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
What's in a price? How to price your products and services
michaelherold
243
12k
Transcript
ฏɹଠ XSSʹ͍ͭͯઆ໌͠·͢ɻ
XSSͬͯԿͧ🤔 • XSS(ΫϩεαΠτεΫϦϓςΟϯά) ܝࣔ൘αΠτTwitterͷΑ͏ͳɺϢʔβʔ͔Βͷೖྗ༰ʹΑͬͯද͕ࣔಈతʹมΘΔ WebϖʔδWebΞϓϦέʔγϣϯʹ͓͍ͯɺWebαΠτʢඪతαΠτʣͷ੬ऑੑ ʢXSS੬ऑੑʣΛར༻ͨ͠߈ܸख๏Λࢦ͢ɻ
߈ܸͷྲྀΕ ᶄϢʔβʔ͕ܝࣔ൘αΠτBΛӾཡ͢Δɻ ᶃ߈ܸऀC͕XSSʹରͯ͠੬ऑੑͷ͋ΔAࣾΛൃݟ͠ɺAࣾʹ ڵຯΛ࣋ͪͦ͏ͳϢʔβʔͷ͍Δܝࣔ൘αΠτBʹ᠘Λֻ͚Δ (ྫɿεΫϦϓτ͖ϦϯΫΛషΔͳͲ) ᶅܝࣔ൘αΠτBͰεΫϦϓτ࣮ߦ ᶆϢʔβʔεΫϦϓτใΛ࣋ͬͨ··AࣾͷϖʔδʹҠಈ ʢΫϩεαΠτʣ͢Δɻ ᶇεΫϦϓτͷޮՌʹΑΓʮAࣾͷαΠτͱͯ͠ʯදࣔ͞Εͨ ِαΠτʹδϟϯϓ͢Δɻὃ͞ΕͨϢʔβʔ͕ใΛೖྗͨ͠
݁ՌɺεΫϦϓτ͕ѱ͞Λ͢Δ ᶈ߈ܸऀCͷखʹΑΓɺϢʔβʔʹର༷ͯ͠ʑͳඃ͕ൃੜ ʢϚϧΣΞײછɾ߈ܸऀCͷใ࿙ӮͳͲʣ ࣹܕXSS
߈ܸͷݪҼ XSSͷࠜຊతͳݪҼɺ߈ܸऀ͕ෆਖ਼ͳεΫϦϓτΛૠೖ͢Δ͜ ͱ͕Ͱ͖ΔڥΛ༩͑ͯ͠·͏͜ͱʹ͋Δɻ XSSʹରͯ͠੬ऑੑΛ࣋ͭಈతαΠτͷ์ஔͰ͋Δɻ ͜ͷεΫϦϓτจষʹɺΤϯυϢʔβʔଆ͕อ༗͢Δݸਓใ ΛඪతαΠτͱผͷαΠτʹૹ৴͢ΔΑ͏ʹઃఆ͞Ε͓ͯΓɺ ͜Ε͕తͳඃΛੜΈग़͢ݪҼͱͳ͍ͬͯΔɻ
߈ܸඃͷӨڹ XSSʹΑΔ߈ܸɺඪతαΠτͷΤϯυϢʔβʔ͕ඃΛड͚Δ͜ ͱͰൃੜ͢Δɻදతͳඃྫͱͯ͠ɺ •CookieใΛར༻ͨ͠ɺͳΓ͢·͠ͷෆਖ਼ΞΫηε (ηογϣϯϋΠδϟοΫ) •HTMLλάΛͬͨೖྗϑΥʔϜʹΑΔใऩू •ِαΠτΛͬͨϑΟογϯάٗ
ඃࣄྫ YouTubeෆਖ਼ΞΫηεࣄ݅ (2010/7/4ʙ7/5) ถYouTubeΛૂͬͨ߈ܸ͕ൃੜ͠ɺγϣοΫͳ σϚ͕ྲྀΕͨΓɺίϝϯτ͕දࣔ͞Εͳ͘ͳΔ ͳͲͷӨڹ͕͕ͬͨɻ χϡʔεใ!! ՎखͷδϟεςΟϯɾϏʔόʔ͕ ަ௨ࣄނͰࢮ
ඃࣄྫ ͜ͷ߈ܸͰYouTubeͷίϝϯτγεςϜʹଘࡏ͢ΔXSSͷ੬ऑੑ͕ ѱ༻͞Εͨɻ ۩ମతʹɺίϝϯτΞϓϦέʔγϣϯͷग़ྗσʔλͷ҉߸Խॲཧʹ ͕ଘࡏ͓ͯ͠Γɺ͜ΕΛಥ͍ͯ߈ܸऀ͕CookieΛ౪Έɺ JavaScriptίʔυΛࠐΜͰϢʔβʔͷWebϒϥβͰ࣮ߦ͞ΕΔ͜ ͱ͕Ͱ͖ͯ͠·ͬͨͱݟΒΕΔɻ ͦͷଞʹෆਖ਼ͳϙοϓΞοϓ͕ग़ͨΓɺѱझຯͳWEBαΠτʹϦμ ΠϨΫτ͞ΕͨΓ͢Δέʔε͕૬͍࣍Ͱ͍ͨͱݴΘΕ͍ͯΔɻ
WebαΠτͷ੬ऑੑͷछྨผͷಧग़ঢ়گ 2019ୈ4࢛ظ(10݄ʙ12݄)
߈ܸ͞Εͳ͍ͨΊͷରࡦ 1.ೖྗͷ੍ݶ ྫɿIDύεϫʔυΛೖྗ͢ΔϑΥʔϜͰʮ֯ӳࣈ◦จࣈ·Ͱʯ ͳͲ੍ݶ͢Δ αʔόʔଆͰͷೖྗͷ੍ݶΛ͢ΔͨΊʹJavaScriptΛͬͯϢʔβʔଆͷ ϒϥβͰߦΘͤΔํ๏͋Δ͕ɺϢʔβʔ͕JavaScriptΛແޮʹ͍ͯ͠Ε ೖྗͷ੍ݶ͕ߦΘΕͳ͍ͷͰXSS߈ܸͷରʹͳΒͳ͍ɻ
߈ܸ͞Εͳ͍ͨΊͷରࡦ 2.αχλΠδϯά(Τεέʔϓ) αΠτͷϑΥʔϜͳͲεΫϦϓτͷߏʹඞཁͱͳΔจࣈ͕ೖྗ͞Εͨ߹ʹɺ ͦͷจࣈΛผͷจࣈॻ͖͑ͯ͠·͏ख๏ͷ͜ͱɻ ͜ΕʹΑΓɺԾʹ߈ܸऀ͕εΫϦϓτΛຒΊࠐ͏ͱͯ͠ແޮԽ͢Δ͜ͱ͕Ͱ͖ Δɻ ରͷจࣈ ฦؐޙͷจࣈྻ < <
> > & & “ " ‘ #39; αχλΠδϯά͖͢จࣈڥʹΑͬͯҟͳΔ͕ɺ ӈͷද͕දతͳྫͰ͢ɻ
߈ܸ͞Εͳ͍ͨΊͷରࡦ 3.WAF(Web Application Firewall)ͷઃఆ WebΞϓϦέʔγϣϯઐ༻ͷϑΝΠΞΥʔϧͰ͋Δɻ ϑΝΠΞΥʔϧͱ͍͏ͱɺϙʔτ൪߸IPΞυϨεͳͲʹΑΓ߈ܸΛޚ͢Δ ωοτϫʔΫϨϕϧͷํ͕Α͘ΒΕ͍ͯΔɻ͕ͩɺܝࣔ൘ͳͲͰೖྗ͞Εͨ ༰·ͰνΣοΫ͠ͳ͍ɻͦ͜Ͱ͜ͷWAF͕ඞཁʹͳΔɻ WAFɺWebΞϓϦέʔγϣϯʹର͢Δ௨৴༰ΛνΣοΫ͠ɺٙΘ͍͠༰͕ ͋ΕϒϩοΫ͢Δ͜ͱ͕ՄೳͰ͋Δɻ
੬ऑੑΛѲ͓ͯ͜͠͏ • XSSͷ੬ऑੑɺ։ൃऀଆ͕ιʔείʔυΛ֬ೝ͢Δ͜ͱͰ੬ऑੑΛνΣοΫ͢Δ͜ ͱՄೳͰ͋Δɻ • ੬ऑੑΛ࡞Γࠐ·ͳ͍Α͏։ൃ͢ΔͨΊʹɺIPA(ಠཱߦ๏ਓɹใॲཧਪਐػߏ) ͕ެ։͍ͯ͠Δʮ҆શͳΣϒαΠτͷ࡞ΓํʯʮIPA ISEC ηΩϡΞɾϓϩάϥ ϛϯάߨ࠲ʯΛࢀߟʹ্ͨ͠ɺඞཁͳ҆શରࡦΛ࣮ࢪͯ͠ɺ։ൃΛҕୗ͢Δ߹ʹ
ࣗࣾͰ։ൃ͢Δ߹ͱಉ༷ʹ͜ΕΒͷରࡦΛ࣮ࢪ͢Δ͜ͱΦεεϝͰ͢ɻ
·ͱΊ • XSS͕ඇৗʹةݥͳαʔόʔ߈ܸͰ͋Δ͜ͱɺաڈͷେنͳෆਖ਼ΞΫηεࣄ͔݅ Β໌Β͔Ͱ͋Δɻ • ݸਓใͷऩूΛతͱͨ͠߈ܸऀʹΑΓ࣮ߦ͞ΕΔͱɺଟେͳΔඃΛٴ΅͢͜ͱ ʹͳͬͯ͠·͏ɻ • ࠜຊతͳରࡦઃܭ࣌ͷεΫϦϓτ͔Βݟ͢ඞཁ͕͋ΔͨΊʹඇৗʹ͍͠ͳ ͷͰɺαΠτͷ੍࡞ऀ͔ͬ͠ΓͱใΛௐ͔ࠪͯ͠Βͷ࡞͕ඞཁͰ͋Δɻ
• ϢʔβʔଆΤϯυϙΠϯτͷηΩϡϦςΟιϑτΛಋೖ͢ΔͳͲɺجຊతͳηΩϡ ϦςΟରࡦߦ͓ͬͯ͘͜ͱ͕ॏཁͰ͋Δɻ
ࢀߟʹͨ͠αΠτɾॻ੶ • αΠτ ɹCyber security.com ʮΫϩεαΠτεΫϦϓςΟϯάͱ?ʯΈࣄྫ͔Βߟ͑Δରࡦ • ॻ੶ ʰ҆શͳWebΞϓϦέʔγϣϯͷ࡞Γํʱ120ʙ149ϖʔδ
🙇͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠🙇