ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

CHALLENGE

XSS Challenges 0

๐ŸŒง: 2020. 12. 2.
์„ค๋ช…(๋ฒˆ์—ญ)

2016๋…„ "nopernik"์— ์˜ํ•ด ๋งŒ๋“ค์–ด์ง„ XSS ์ฑŒ๋ฆฐ์ง€์ž…๋‹ˆ๋‹ค์ƒ๋Œ€์ ์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ ์ง€ ์˜ค๋ž˜๋˜์ง€ ์•Š์•˜๊ธฐ ๋•Œ๋ฌธ์— ํ’€์ด๊ณผ์ •์„ ์ฐพ์•„๋ณด๊ธฐ ํž˜๋“  ๊ฒŒ์ž„์ž…๋‹ˆ๋‹ค. ๋˜ํ•œ ํžŒํŠธ์กฐ์ฐจ ์ œ๊ณต๋˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋„์ „์ž๋“ค์ด ์ ์ฐจ ๋งŽ์•„์งˆ ๊ฒƒ์œผ๋กœ ํŒ๋‹จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

ํ’€์ด ๋ฐฉ๋ฒ•์€ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. javascript ์ฝ”๋“œ๊ฐ€ ํฌํ•จ๋œ ๊ฐ„๋‹จํ•œ HTML ํผ์„ ๋„์›Œ์ฃผ๋ฉฐ Input Output์„ ํ™•์ธํ•ด๊ฐ€๋ฉด์„œ ํŒจํ„ด์„ ํ™•์ธ ํ›„ Escape ์‹œํ‚ค๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

์–ด๋Š ์ฑŒ๋ฆฐ์ง€๋‚˜ ๋งˆ์ฐฌ๊ฐ€์ง€์ง€๋งŒ ์ฒซ๋ฒˆ์งธ ๋‹จ๊ณ„๋Š” ๊ธฐ๋ณธ์ ์ธ ์ฝ”๋“œ๋กœ ์„ฑ๊ณต์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ํ˜„์žฌ ํฌ๋กฌ์„ ๋‹คํฌ ๋ฒ„์ „์œผ๋กœ ์‚ฌ์šฉํ•˜๊ธฐ์— ์ž…๋ ฅ ํผ์ด ์ œ๋Œ€๋กœ ์•ˆ ๋ณด์ด์ง€๋งŒ Subscribel์ด๋ผ๋Š” ๊ณณ์— ์ž…๋ ฅ์„ ํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

javascript๋ฅผ ์„ฑ๊ณต์ ์œผ๋กœ ์‹คํ–‰์‹œํ‚ฌ ๊ฒฝ์šฐ ํ•˜๋‹จ์˜ ์ด๋ฏธ์ง€์ฒ˜๋Ÿผ alert๊ฒฝ๊ณ ์ฐฝ์ด ๋œจ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. nopernik์˜ xss ์ฑŒ๋ฆฐ์ง€๋Š” ๋ฌธ์ œ๋งˆ๋‹ค ์กฐ๊ธˆ์”ฉ ๋‹ค๋ฅด์ง€๋งŒ alert ์ฐฝ์„ ์„ฑ๊ณต์ ์œผ๋กœ ๋„์›Œ๋„ ์„ฑ๊ณตํ–ˆ๋‹ค๋Š” ๋ณ„๋‹ค๋ฅธ ๋ฌธ๊ตฌ๊ฐ€ ์•ˆ ๋‚˜ํƒ€๋‚˜๋Š” ๋ถ€๋ถ„์ด ์กด์žฌํ•˜๊ธฐ์— ๊ฒฝ๊ณ ์ฐฝ์„ ๋„์šฐ์…จ๋‹ค๋ฉด ๊ณผ๊ฐํžˆ ๋‹ค๋ฅธ ๋ฌธ์ œ๋กœ ๋„˜์–ด๊ฐ€์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

์„ฑ๊ณตํ•˜์‹  ํ›„์—๋Š” ํŽ˜์ด์ง€ ์†Œ์Šค๋ฅผ ํ™•์ธํ•ด๊ฐ€๋ฉด์„œ ์–ด๋–ค ์‹์œผ๋กœ Input ์ด ๋œ ๊ฒƒ์ธ์ง€ ๋น„๊ตํ•ด๊ฐ€๋ฉด์„œ ์ดํ•ดํ•˜๋Š” ๊ฒŒ ์ค‘์š”ํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

'CHALLENGE' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

XSS Challenges 2  (0) 2020.12.04
XSS Challenges 1  (0) 2020.12.03
XSS-Game Level 6  (0) 2020.12.01
XSS-Game Level 5  (0) 2020.11.30
XSS-Game Level 4  (0) 2020.11.29
๊ณต์œ ํ•˜๊ธฐ ๋งํฌ
Comment