当前位置:网站首页>[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}边栏推荐
- MySql的索引学习和使用;(本人觉得足够详细)
- Redis1: Introduction to Redis, basic features of Redis, relational database, non-relational database, database development stage
- JeeSite新建报表
- Ffmpeg - sources analysis
- 达梦8数据库导出导入
- SkiaSharp 之 WPF 自绘 粒子花园(案例版)
- bytebuffer 使用demo
- UE4 通过与其它Actor互动开门
- Detailed and comprehensive postman interface testing practical tutorial
- UI自动化测试 App的WebView页面中,当搜索栏无搜索按钮时处理方法
猜你喜欢

Android 面试题——如何徒手写一个非阻塞线程安全队列 ConcurrentLinkedQueue?

Dive into how it works together by simulating Vite
![[GYCTF2020]EasyThinking](/img/40/973411c69d1e4766d22f6a4a7c7c01.png)
[GYCTF2020]EasyThinking

MRTK3 develops Hololens application - gesture drag, rotate, zoom object implementation

UE4 通过与其它Actor互动开门

UE4 通过重叠事件开启门

UE4 通过互动(键盘按键)开门

UE4 后期处理体积 (角色受到伤害场景颜色变淡案例)

Use CH341A to program external Flash (W25Q16JV)

MySql index learning and use; (I think it is detailed enough)
随机推荐
How to discover a valuable GameFi?
XMjs cross-domain problem solving
MySql的索引学习和使用;(本人觉得足够详细)
Call Alibaba Cloud oss and sms services
public static
List asList(T... a) What is the prototype? bytebuffer put flip compact clear 方法演示
[BJDCTF2020]EasySearch
cross domain solution
Spark基础【介绍、入门WordCount案例】
不看后悔,appium自动化环境完美搭建
ffmpeg 像素格式基础知识
工业级远距离无线传输装置的功能有哪些?
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals
队列题目:最近的请求次数
iMedicalLIS listener (2)
This year's Qixi Festival, "love vegetables" are more loving than gifts
UE4 通过互动(键盘按键)开门
How to wrap markdown - md file
UE4 更改组件变量 (以修改第一人称角色模板的最大行走速度和跳跃高度为例)
Spark Basics [Introduction, Getting Started with WordCount Cases]