Lucene search
K

QNAP Command Injection Vulnerability

🗓️ 17 Jun 2012 00:00:00Reported by Sense of SecurityType 
zdt
 zdt
🔗 0day.today👁 21 Views

QNAP Turbo NAS command injection vulnerability in firmware 3.6.1 Build 0302T & earlie

Code
QNAP Turbo NAS with firmware versions 3.6.1 Build 0302T and below suffer from a command injection vulnerability that allows for remote code execution.

Product.                   QNAP
Platform.                  Turbo NAS (verified) and possibly others
Affected versions.         Firmware Version: 3.6.1 Build 0302T and prior
Severity Rating.           High
Impact.                    Exposure of sensitive information
                           Exposure of system information
                           Privilege escalation
                           System access
Attack Vector.             Remote with authentication
Solution Status.           Currently no software update;
                           vendor has elected not to fix at this time
CVE reference.             CVE - not yet assigned

Details.
QNAP provide NAS technology solutions to consumers and enterprises.
Multiple vulnerabilities have been identified in the web management 
interface.

1. Command Injection:
The QNAP Download Station (QDownload) is vulnerable to command injection 
as the application executes user-controllable data that is processed by 
a shell command interpreter.

The following resources, accessible post authentication are affected:
/cgi-bin/Qdownload/DS_RSS_Option.cgi [keyword parameter]
/cgi-bin/Qdownload/DS_RSS_Option.cgi [title parameter]
Commands are executed with the context of the admin user [uid=0(admin) 
gid=0(administrators] on the QNAP device.

Proof of Concept.
/cgi-bin/Qdownload/DS_RSS_Option.cgi?_dc=1331164660690&url=http%3A%2F%2F
google.com&title=test&keyword=`touch%20%2ftesto%2etxt`&todo=add&sid=i9
nonapr&ver=2.0

2. Cryptography:
The QNAP login page stores persistent cookies (including the administrator 
username and password) as base64 encoded strings inside the cookie 
parameter nas_p. These cookies are not protected with either the HTTPOnly 
or Secure flags allowing theft via one of the many cross-site scripting 
vulnerabilities which exist within the application (disclosed previously 
by another researcher, but never fixed).

Proof of Concept.
Cookie: qnap_admin_style=default; nas_save_u=1; nas_u=bGFicw==; 
nas_address=10.1.1.2; nas_save_p=1; nas_p= YWRtaW5UMG1iJTI0dDBuMw==; 
nas_tree_x=240; nas_tree_y=370
YWRtaW5UMG1iJTI0dDBuMw== decodes to admin123qweasd

Solution.
No vendor solution.

Discovered by.
Nadeem Salim and Phil Taylor from Sense of Security Labs.



#  0day.today [2018-03-05]  #

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