module

PlaySMS index.php Unauthenticated Template Injection Code Execution

Disclosed
2020-02-05
Created
2020-04-03

Description

This module exploits a preauth Server-Side Template Injection vulnerability that leads to remote code execution
in PlaySMS before version 1.4.3. This issue is caused by double processing a server-side template with a custom
PHP template system called 'TPL' which is used in the PlaySMS template engine at
`src/Playsms/Tpl.php:_compile()`. The vulnerability is triggered when an attacker supplied username with a
malicious payload is submitted. This malicious payload is then stored in a TPL template which when rendered a
second time, results in code execution.
The TPL(https://github.com/antonraharja/tpl) template language is vulnerable to PHP code injection.

This module was tested against PlaySMS 1.4 on HackTheBox's Forlic Machine.

Authors

Touhid M.Shaikh touhidshaikh22@gmail.com
Lucas Rosevear

Platform

PHP

Architectures

php

Module Options

To display the available options, load the module within the Metasploit console and run the commands ‘show options’ or ‘show advanced’:


msf > use exploit/multi/http/playsms_template_injection
msf exploit(playsms_template_injection) > show targets
...targets...
msf exploit(playsms_template_injection) > set TARGET < target-id >
msf exploit(playsms_template_injection) > show options
...show and set options...
msf exploit(playsms_template_injection) > exploit

Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.