Bye๐Ÿ‘‹๐Ÿผ XSS Auditor (X-XSS-Protection)

์ด๋ฒˆ Webkit(Safari 15.4) ์—…๋ฐ์ดํŠธ์—๋Š” ์ค‘์š”ํ•œ ๋ณด์•ˆ ์ •์ฑ… ๋ณ€๊ฒฝ์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. X-XSS-Protection์œผ๋กœ ์ž˜ ์•Œ๋ ค์ง„ XSS Auditor๊ฐ€ ์ œ๊ฑฐ๋ฉ๋‹ˆ๋‹ค.

XSS Auditor๋Š” Refelcted XSS๋ฅผ ์™„ํ™”ํ•˜๊ธฐ ์œ„ํ•œ ๋””์ž์ธ์ด์ž ๋ณด์•ˆ ์ •์ฑ…์œผ๋กœ HTML Parsing ๋‹จ๊ณ„์—์„œ ์›น ์š”์ฒญ์ด response์— ์–ด๋–ป๊ฒŒ ๋ฐ˜์‘ํ•˜๋Š”์ง€ ์ฒดํฌํ•˜๊ณ , XSS์˜ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์œผ๋ฉด ์ฐจ๋‹จํ•˜๋Š” ๊ธฐ๋Šฅ์ž…๋‹ˆ๋‹ค. ๊ฐœ๋ฐœ์ž๊ฐ€ ์ด๋ฅผ Response ๋‚ด X-XSS-Protection ํ—ค๋”๋ฅผ ํ†ตํ•ด ์ปจํŠธ๋กคํ•  ์ˆ˜ ์žˆ๋„๋ก ์ œ๊ณต๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

https://webkit.org/blog/12445/new-webkit-features-in-safari-15-4/#security

์ด๋Š” WebKit์˜ CSP(Content-Security-Policy) ์ง€์› ๋ฒ”์œ„๊ฐ€ Level3์— ๋„๋‹ฌํ•˜์—ฌ CSP๋กœ๋„ ์ถฉ๋ถ„ํžˆ ๋Œ€์‘์ด ๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋ผ๊ณ  ํŒ๋‹จ๋˜์–ด ์ œ๊ฑฐ๋œ๋‹ค๊ณ  ํ•˜๋„ค์š”. Chrome์˜ ๊ฒฝ์šฐ Chrome 78 ๋ฒ„์ „(2019๋…„ 8์›”์ฏค), Firefox ๋˜ํ•œ ์˜ˆ์ „์— ์ข…๋ฃŒ๋˜์—ˆ๋˜ ์ƒํƒœ๋ผ ์ด์ œ ๋ฉ”์ด์ € 3์‚ฌ ๋ธŒ๋ผ์šฐ์ €์—์„  ๋ชจ๋‘ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ๊ธฐ๋Šฅ, ํ—ค๋”๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ด์ œ Safari๋„ X๋กœ...

์ด๋ ‡๊ฒŒ ๋˜ ํ•˜๋‚˜์˜ ๊ธฐ๋Šฅ์ด ์—ญ์‚ฌ์†์œผ๋กœ ์‚ฌ๋ผ์ง‘๋‹ˆ๋‹ค ๐Ÿ‘‹๐Ÿผ

  • https://www.w3.org/TR/CSP3/
  • https://webkit.org/blog/12445/new-webkit-features-in-safari-15-4/#security
  • https://twitter.com/hahwul/status/1503526905080811521
  • https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
  • https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy
  • https://www.chromium.org/developers/design-documents/xss-auditor/
  • https://developer.mozilla.org/ko/docs/Web/HTTP/Headers/X-XSS-Protection