当前位置:网站首页>[CISCN2019 South China Division]Web11
[CISCN2019 South China Division]Web11
2022-08-05 03:59:00 【pakho_C】
[CISCN2019 South China Division]Web11
headerSee the question of smarty ssti once
smart ssti:
smart is the template engine of php. The function of the template engine is to separate the front-end page and data. The URL of the API displayed in the title cannot be used due to environmental reasons, but our IP is still displayed on the page., and according to its prompt XFF, we can easily think of constructing ssti:payload in X-Forwarded-For.
Here's another image:
According to the hint on the page, it is likely to be constructed in the XFF header:
Test:
Smarty ssti does exist
Saw another master's wp:
Smarty supports the use of {php}{/php} tags to execute the php instructions wrapped in them, then we can use the {php}{/php} tags to construct the payload, but this question will report an error
Because the current smartThis label is no longer used.
You can check the version with {$smarty.version}.
Tested it and it did
This version no longer supports php tags
Although the php tag cannot be used, there is an {if} tag.Smarty's {if} conditional judgment is very similar to PHP's if
, but with some additional features.Each {if} must have a matching {/if}. {else} and {elseif} can also be used.
All PHP conditional expressions and functions can be used inside if, such as *||*,or,&&,and,is_array(), etc.Since all PHP conditional expressions and functions can be used inside if, we can also write PHP code inside.{if phpinfo()}{/if}
Execute {if phpinfo()}{/if}try
Successful echo
Execute the command directly: {if system('cat /flag')}{/if}
Principle introduction, refer to In another master’s wp:
require_once('./smarty/libs/' . 'Smarty.class.php');$smarty = new Smarty();$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];//Get XFF$smarty->display("string:".$ip);//This is not in the smart template format, but in the form of a string, so our tag will be parsed, that is, if, and the content will be echoed to the corresponding position on the page after parsing}
边栏推荐
- Developing Hololens encountered The type or namespace name 'HandMeshVertex' could not be found..
- Fifteen. Actual combat - MySQL database building table character set and collation
- 2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto
- presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer
- 【8.2】代码源 - 【货币系统】【硬币】【新年的问题(数据加强版)】【三段式】
- 惨遭打脸:字节某部门竟有这么多测试员
- 【测量学】速成汇总——摘录高数帮
- Getting Started with Kubernetes Networking
- MySql的索引学习和使用;(本人觉得足够详细)
- [SWPU2019]Web1
猜你喜欢
运维监控系统之Open-Falcon
多御安全浏览器 V10.8.3.1 版正式发布,优化多项内容
MySql的索引学习和使用;(本人觉得足够详细)
用Unity发布APP到Hololens2无坑教程
[SWPU2019]Web1
Acid (ACID) Base (BASE) Principles for Database Design
今年七夕,「情蔬」比礼物更有爱
Ice Scorpion V4.0 attack, security dog products can be fully detected
public static
List asList(T... a) What is the prototype? [TA-Frost Wolf_may-"Hundred Talents Project"] Graphics 4.3 Real-time Shadow Introduction
随机推荐
[TA-Frost Wolf_may-"Hundred Talents Project"] Graphics 4.3 Real-time Shadow Introduction
presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer
DEJA_VU3D - Cesium功能集 之 059-腾讯地图纠偏
MRTK3开发Hololens应用-手势拖拽、旋转 、缩放物体实现
Web3.0 Dapps——通往未来金融世界的道路
DEJA_VU3D - Cesium功能集 之 056-智图Arcgis地图纠偏
Walter talked little knowledge | "remote passthrough" that something
Android interview question - how to write with his hands a non-blocking thread safe queue ConcurrentLinkedQueue?
Confessing the era of digital transformation, Speed Cloud engraves a new starting point for value
[论文笔记] MapReduce: Simplified Data Processing on Large Clusters
2022软件测试工程师最全面试题
【8.4】代码源 - 【数学】【历法】【删库】【不朴素的数列(Bonus)】
Haproxy搭建Web群集
2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto
关于#SQL#的迭代、父子结构查询问题,如何解决?
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals
UE4 第一人称角色模板 添加冲刺(加速)功能
Mathematics - Properties of Summation Symbols
Index Mysql in order to optimize paper 02 】 【 10 kinds of circumstances and the principle of failure
token、jwt、oauth2、session解析