クロスサイトスクリプティング 12 - yujitounai/helloworld GitHub Wiki

クロスサイトスクリプティング(XSS)攻撃 11

strip_tagのXSS

脆弱なソースコード (PHP)

<div class="box">
<form method="get" action="">enter url
<input name="word" type="text">
<input type="submit">
</form>
</div>
<?php
	$word=filter_input(INPUT_GET, 'word');
    echo "<img src='".strip_tags($word)."'>";
?>

攻撃方法

?word=1'onmouseover=alert(1)//

⚠️ **GitHub.com Fallback** ⚠️