###########################

# VoipNow v4.0.1 (xajax_handler) Persistent Vulnerability

###########################

Document Title:
===============
VoipNow v4.0.1 - (xajax_handler) Persistent Vulnerability


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


Release Date:
=============
2016-04-26


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


Common Vulnerability Scoring System:
====================================
3.8


Product & Service Introduction:
===============================
A cloud communications platform dedicated to service providers and organizations in need of robust enterprise PBX, video, presence,
instant messaging, contact center features, conferencing, faxing, and mobility. Used by more than 10,000 service providers worldwide.

(Copy of the Homepage: https://www.4psa.com/products-voipnow-spe.html )


Abstract Advisory Information:
==============================
The vulnerability laboratory core research team discovered an application-side input validation vulnerability in the VoipNow v4.0.1 web-application.


Vulnerability Disclosure Timeline:
==================================
2016-03-18: Researcher Notification & Coordination (Benjamin Kunz Mejri - Evolution Security GmbH)
2016-03-19: Vendor Notification (VoipNow Support Team)
2016-04-25: Public Disclosure (Vulnerability Laboratory)


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


Affected Product(s):
====================
4PSA
Product: VoipNow - Online Service (Web-Application) 4.0.1


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


Severity Level:
===============
Medium


Technical Details & Description:
================================
An application-side input validation web vulnerability has been discovered in the official VoipNow v4.0.1 web-application.
The vulnerability allows remote attacker to inject own malicious script codes to the application-side of the vulnerable service.

The persistent vulnerability is located in the `report_block_table_details` and `report_block_table_title` values of the `xajax_handler.php`
file GET method request. Remote attackers are able to inject own malicious script codes to the Notes input field in the invoice template.
Thus allows an attacker to trigger an execution of the payload on edit or active invoice interaction. The request method to inject is POST
via input and the attack vector of the issue is located on the application-side of the service.

The security risk of the application-side vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.8.
Exploitation of the persistent 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 Module(s):
[+] Invoice - Template

Vulnerable File(s):
[+] xajax_handler.php

Vulnerable Inputs(s):
[+] Add Note

Vulnerable Parameter(s):
[+] report_block_table_details
[+] report_block_table_title


Proof of Concept (PoC):
=======================
The persistent input validation web vulnerability can be exploited by remote attackers with low privileged web-application user account and low 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. Open the main website
2. Login to the application
3. Open Invoices Management - Invoice Number as Template
4. Inject to the Note description input field on buttom the malicious payload
5. Save the request via POST method
6. Watch the printed site or the edit invoice formular to trigger the persistent script code execution
7. Successful reproduce of the application-side vulnerability!


PoC: (report_block_table_details)
<div class="report_block_unit"><div class="report_block_table_title">By <b>VoipNow</b> at <b>Apr 16, 2016 16:45:19</b></div>
<div class="report_block_table_details">&gt;"&gt;<[PERSISTENT INJECTED SCRIPT CODE!]></div></div></iframe></div></div>


--- PoC Session Logs [POST] ---
Status: 200[OK]
POST https://voipnow.localhost:8080/xajax_handler.php?screen=automation/invoices/invoice_info&invoice_id=01010&screenid=527&xajax=1
Load Flags[LOAD_BACKGROUND LOAD_BYPASS_LOCAL_CACHE ] GröÃe des Inhalts[-1] Mime Type[text/xml]
Request Header:
Host[voipnow.localhost:8080]
User-Agent[Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[de,en-US;q=0.7,en;q=0.3]
Accept-Encoding[gzip, deflate, br]
DNT[1]
If-Modified-Since[Sat, 1 Jan 2000 00:00:00 GMT]
Content-Type[application/x-www-form-urlencoded]
Referer[https://voipnow.localhost:8080/content.php?screen=automation/invoices/invoice_info&invoice_id=01010]
Content-Length[229]
Cookie[kvcd=1460824516829; km_ai=uubTjGyeQvqS%2BPBB4hrLW%2FUPfRU%3D; km_uq=1460824517%20%2Fe%3FViewed%2520URL%3Dhttps%253A%252F%252Fwww.4psa.com%252Fproducts-voipnow-demo.html%26Referrer%3Dhttps%253A%252F%252Fencrypted.google.com%252Furl%253Fsa%253Dt%2526rct%253Dj%2526q%253D%2526esrc%253Ds%2526source%253Dweb%2526cd%253D4%2526cad%253Drja%2526uact%253D8%2526ved%253D0ahUKEwjY5YSqy5PMAhXLBZoKHXNQDNcQFghEMAM%2526url%253Dhttps%25253A%25252F%25252Fwww.4psa.com%25252Fproducts-voipnow-demo.html%2526usg%253DAFQjCNHHdvPmOEq5zR_OKtFHWI5t8LZSEg%2526bvm%253Dbv.119745492%252Cd.bGs%26_n%3DPage%2520View%26_k%3Dea4dff44a3d1499af906924518ac2d7dfba264e2%26_p%3DuubTjGyeQvqS%252BPBB4hrLW%252FUPfRU%253D%26_t%3D1460824517%7C1460824517%20%2Fe%3FURL%3Dhttps%253A%252F%252Fwww.4psa.com%252Fproducts-voipnow-demo.html%26Referrer%3Dhttps%253A%252F%252Fencrypted.google.com%252Furl%253Fsa%253Dt%2526rct%253Dj%2526q%253D%2526esrc%253Ds%2526source%253Dweb%2526cd%253D4%2526cad%253Drja%2526uact%253D8%2526ved%253D0ahUKEwjY5YSqy5PMAhXLBZoKHXNQDNcQFghEMAM%2526url%253Dhttps%25253A%25252F%25252Fwww.4psa.com%25252Fproducts-voipnow-demo.html%2526usg%253DAFQjCNHHdvPmOEq5zR_OKtFHWI5t8LZSEg%2526bvm%253Dbv.119745492%252Cd.bGs%26KM%2520Screen%2520Resolution%3D1366x768%26_n%3DVisited%2520Site%26_k%3Dea4dff44a3d1499af906924518ac2d7dfba264e2%26_p%3DuubTjGyeQvqS%252BPBB4hrLW%252FUPfRU%253D%26_t%3D1460824517%7C1460824517%20%2Fe%3FSearch%2520Engine%3DGoogle%26Search%2520Terms%3Dnot%2520provided%26_n%3DSearch%2520Engine%2520Hit%26_k%3Dea4dff44a3d1499af906924518ac2d7dfba264e2%26_p%3DuubTjGyeQvqS%252BPBB4hrLW%252FUPfRU%253D%26_t%3D1460824517; km_vs=1; km_lv=1460824517; __zlcmid=aBfTrXDxwKTQcF; vn=3iugve1e79uv9th2skmk3koca4ne240ko0s7d3689s8p0s0bo191]
Connection[keep-alive]
POST-Daten:
xjxfun[object_add_note]
xjxr[1460825295424]
xjxargs[][Sinvoice]
Response Header:
Server[nginx]
Date[Sat, 16 Apr 2016 16:48:14 GMT]
Content-Type[text/xml ; charset="utf-8"]
p3p[CP="NON COR CURa ADMa OUR NOR UNI COM NAV STA"]
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]
Strict-Transport-Security[max-age=63072000; includeSubdomains]
X-Frame-Options[SAMEORIGIN]
X-XSS-Protection[1; mode=block]
x-content-type-options[nosniff]
X-Firefox-Spdy[3.1]
-
Status: 200[OK]
POST https://voipnow.localhost:8080/xajax_handler.php?screen=automation/invoices/invoice_info&invoice_id=01010&screenid=527&xajax=1
Load Flags[LOAD_BACKGROUND LOAD_BYPASS_LOCAL_CACHE ] GröÃe des Inhalts[-1] Mime Type[text/xml]
Request Header:
Host[voipnow.localhost:8080]
User-Agent[Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0]
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
Accept-Language[de,en-US;q=0.7,en;q=0.3]
Accept-Encoding[gzip, deflate, br]
DNT[1]
If-Modified-Since[Sat, 1 Jan 2000 00:00:00 GMT]
Content-Type[application/x-www-form-urlencoded]
Referer[https://voipnow.localhost:8080/content.php?screen=automation/invoices/invoice_info&invoice_id=01010]
Content-Length[249]
Cookie[kvcd=1460824516829; km_ai=uubTjGyeQvqS%2BPBB4hrLW%2FUPfRU%3D; km_uq=1460824517%20%2Fe%3FViewed%2520URL%3Dhttps%253A%252F%252Fwww.4psa.com%252Fproducts-voipnow-demo.html%26Referrer%3Dhttps%253A%252F%252Fencrypted.google.com%252Furl%253Fsa%253Dt%2526rct%253Dj%2526q%253D%2526esrc%253Ds%2526source%253Dweb%2526cd%253D4%2526cad%253Drja%2526uact%253D8%2526ved%253D0ahUKEwjY5YSqy5PMAhXLBZoKHXNQDNcQFghEMAM%2526url%253Dhttps%25253A%25252F%25252Fwww.4psa.com%25252Fproducts-voipnow-demo.html%2526usg%253DAFQjCNHHdvPmOEq5zR_OKtFHWI5t8LZSEg%2526bvm%253Dbv.119745492%252Cd.bGs%26_n%3DPage%2520View%26_k%3Dea4dff44a3d1499af906924518ac2d7dfba264e2%26_p%3DuubTjGyeQvqS%252BPBB4hrLW%252FUPfRU%253D%26_t%3D1460824517%7C1460824517%20%2Fe%3FURL%3Dhttps%253A%252F%252Fwww.4psa.com%252Fproducts-voipnow-demo.html%26Referrer%3Dhttps%253A%252F%252Fencrypted.google.com%252Furl%253Fsa%253Dt%2526rct%253Dj%2526q%253D%2526esrc%253Ds%2526source%253Dweb%2526cd%253D4%2526cad%253Drja%2526uact%253D8%2526ved%253D0ahUKEwjY5YSqy5PMAhXLBZoKHXNQDNcQFghEMAM%2526url%253Dhttps%25253A%25252F%25252Fwww.4psa.com%25252Fproducts-voipnow-demo.html%2526usg%253DAFQjCNHHdvPmOEq5zR_OKtFHWI5t8LZSEg%2526bvm%253Dbv.119745492%252Cd.bGs%26KM%2520Screen%2520Resolution%3D1366x768%26_n%3DVisited%2520Site%26_k%3Dea4dff44a3d1499af906924518ac2d7dfba264e2%26_p%3DuubTjGyeQvqS%252BPBB4hrLW%252FUPfRU%253D%26_t%3D1460824517%7C1460824517%20%2Fe%3FSearch%2520Engine%3DGoogle%26Search%2520Terms%3Dnot%2520provided%26_n%3DSearch%2520Engine%2520Hit%26_k%3Dea4dff44a3d1499af906924518ac2d7dfba264e2%26_p%3DuubTjGyeQvqS%252BPBB4hrLW%252FUPfRU%253D%26_t%3D1460824517; km_vs=1; km_lv=1460824517; __zlcmid=aBfTrXDxwKTQcF; vn=3iugve1e79uv9th2skmk3koca4ne240ko0s7d3689s8p0s0bo191]
Connection[keep-alive]
POST-Daten:
xjxfun[object_add_note]
xjxr[1460825323027]
xjxargs[][Sinvoice]
Response Header:
Server[nginx]
Date[Sat, 16 Apr 2016 16:48:42 GMT]
Content-Type[text/xml ; charset="utf-8"]
p3p[CP="NON COR CURa ADMa OUR NOR UNI COM NAV STA"]
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]
Strict-Transport-Security[max-age=63072000; includeSubdomains]
X-Frame-Options[SAMEORIGIN]
X-XSS-Protection[1; mode=block]
x-content-type-options[nosniff]
X-Firefox-Spdy[3.1]


Reference(s):
https://voipnow.localhost:8080/xajax_handler.php
https://voipnowdemo.localhost:8080/content.php
https://voipnowdemo.localhost:8080/index.php


Solution - Fix & Patch:
=======================
The vulnerability can be patched by a secure parse and encode of the vulnerable Notes input field in the invoice POST method request.
Disallow the usage of special chars and restrict the input to prevent further script code injection attacks.
Encode the vulnerable
`report_block_table_details` and `report_block_table_title` output values to fix the issue.


Security Risk:
==============
The security risk of the application-side validation web vulnerability in the voipnow web-application is estimated as medium. (CVSS 3.8)


Credits & Authors:
==================
Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (research@vulnerability-lab.com) [www.vulnerability-lab.com]


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 © 2016 | Vulnerability Laboratory - [Evolution Security GmbH]â¢


###########################

# Iranian Exploit DataBase = http://IeDb.Ir [2016-04-29]

###########################