扫描二维码关注官方公众号
12下一页
返回列表 发布新帖

[讨论/分享] DSM的安全问题!4.3及以前版本统统有隐患。

3604 30
发表于 2013-9-18 03:38:59 | 显示全部楼层 阅读模式

来吧兄弟,一起玩一起讨论!

您需要 登录 才可以下载或查看,没有账号?注册

×
从Xpenology看到的链接。http://www.securityfocus.com/archive/1/528543内容如下,懒得翻译,自己有兴趣的慢慢研究。看似挺严重的。
时间: Sep 10 2013 08:43PM
**************************************************************
Title: Synology DSM multiple vulnerabilities
Version affected: <= 4.3-3776
Vendor: Synology
Discovered by: Andrea Fabrizi
Email: andrea.fabrizi (at) gmail (dot) com [email concealed]
Web: http://www.andreafabrizi.it
Twitter: @andreaf83
Status: unpatched
**************************************************************

Synology DiskStation Manager (DSM) it's a Linux based operating
system, used for the DiskStation and RackStation products.

1] ======== Remote file download ========
Any authenticated user, even with the lowest privilege, can download
any system file, included the /etc/shadow, samba password files and
files owned by the other DSM users, without any restriction.

The vulnerability is located in "/webman/wallpaper.cgi". The CGI takes
as parameter the full path of the image to download, encoded in ASCII
Hex format.
The problem is that any file type can be downloaded (not only images)
and the path validation is very poor. In fact the CGI checks only if
the path starts with an allowed directory (like
/usr/syno/synoman/webman), and this kind of protection can be easily
bypassed using the ../ attack.

For example to access the /etc/shadow:
2f7573722f73796e6f2f73796e6f6d616e2f7765626d616e2f2e2e2f2e2e2f2e2e2f2e2e
2f6574632f736861646f77
(/usr/syno/synoman/webman/../../../../etc/shadow)

------------------------------------------
GET /webman/wallpaper.cgi?path=AABBCCDDEEFF11223344 HTTP/1.1
Host: 127.0.0.1:5000
Cookie: stay_login=0; id=XXXXXXXXXXX
------------------------------------------

2] ======== Command injection ========
A command injection vulnerability, present on the
"/webman/modules/ControlPanel/ modules/externaldevices.cgi" CGI,
allows any administrative user to execute arbitrary commands on the
system, with root privileges.

------------------------------------------
POST /webman/modules/ControlPanel/modules/externaldevices.cgi HTTP/1.1
Host: 127.0.0.1:5000
User-Agent: ls
Cookie: stay_login=0; id=XXXXXXXXXXX
Content-Length: 128

action=apply&device_name=aa&printerid=1.1.1.1-aa';$HTTP_USER_AGENT>/tmp/
output+%23&printer_mode=netPrinter&eject_netprinter=true
------------------------------------------

Putting the command to execute as the User Agent string, after the
request the output will be ready into the /tmp/output file.

3] ======== Partial remote content download ========
For the localization DSM uses some CGI, that takes the lang parameter
(e.g. "enu" for english) and returns a Json object containing the
localized strings in a dictionary format.

The strings are taken from a local file with the following path:
[current_dir]/texts/[lang_parameter_value]/strings

The "/strings" appended at the end of the path prevents a path
injection, because any value injected using the "lang" parameter will
be invalidated (in other words, it's possible to read only files named
"strings"). But, the interesting thing is that the full path of the
strings files is built using a snprintf function like that:

snprintf(&s, 0x80u, "texts/%s/strings", lang)

This means that putting a lang value big enough, it's possible to
overflow the 128 byte allowed by the snprintf and take out the
"/strings" from the built path.

For example, the lang value
"./////////////////////////////////////////////////////////////////////
///////////////////../../../../../etc/synoinfo.conf" allow to get the
/etc/synoinfo.conf file content.

The second problem is that the input file taken by the CGI must be
formatted in a key/value way: key1=string1

In other words, to get some content from a generic file it's necessary
that the file contains at least an "=" for each line (this is the
reason why I called the vulnerability "Partial remote content
download").

At first glance it may seems very limiting, but, seen that it's
possible to read directly from the disk block device (e.g.
/dev/vg1000/lv), the amount of data dumped is very huge. In my tests I
was able to dump around the 25/30% of the drive (tested with mixed
content, like documents, images, generic files). It's possible to dump
data from any drive connected. Interesting data can be also dumped
from the /proc vfs.

This vulnerability impacts two different CGI and is exploitable
without authentication by any remote user:

/scripts/uistrings.cgi
/webfm/webUI/uistrings.cgi

------------------------------------------
GET /scripts/uistrings.cgi?lang=XXXXXXXXX HTTP/1.1
Host: 127.0.0.1:5000
------------------------------------------

In the system there are two other uistrings.cgi, but are not affected.

4] XSS
A classic Cross-site scripting affects the following CGI:
/webman/info.cgi?host=XXXX&target=XXXX&add=XXXX





评论30

yht2002Lv.6 发表于 2013-9-18 07:41:18 | 显示全部楼层
鸟语,看不懂
google翻一下看啊,应该也就差不多看懂了!!!  详情 回复
发表于 2013-9-18 08:06
回复 点赞

使用道具 举报

smcsdkLv.5 发表于 2013-9-18 08:06:23 | 显示全部楼层

google翻一下看啊,应该也就差不多看懂了!!!
回复 点赞

使用道具 举报

iloveplLv.3 发表于 2013-9-18 08:41:22 | 显示全部楼层
google翻一下去。
回复 点赞

使用道具 举报

windowsxpLv.5 发表于 2013-9-18 09:18:45 | 显示全部楼层
洋文啊。。。。。
回复 点赞

使用道具 举报

morning_2001Lv.4 发表于 2013-9-18 09:21:51 | 显示全部楼层
所以现在攒丝瓜等4.3  估计到时也还会有4.4之前都有隐患之说
回复 点赞

使用道具 举报

alfredLv.5 发表于 2013-9-18 10:18:39 | 显示全部楼层
看起来有点累。。。坐等翻译
回复 点赞

使用道具 举报

nizhengfengLv.5 发表于 2013-9-18 11:08:58 | 显示全部楼层
感谢分享
回复 点赞

使用道具 举报

hacking2000Lv.3 发表于 2013-9-18 11:37:23 | 显示全部楼层
看不懂,严重吗?
回复 点赞

使用道具 举报

hsl667Lv.3 发表于 2013-9-18 12:45:42 | 显示全部楼层
怎办啊
回复 点赞

使用道具 举报

cmac2007Lv.2 发表于 2013-9-18 13:34:37 | 显示全部楼层
慢慢看下文
回复 点赞

使用道具 举报

晓李匪盗Lv.5 发表于 2013-9-18 14:25:00 | 显示全部楼层
黑群只有4.2啊
回复 点赞

使用道具 举报

js3000Lv.10 发表于 2013-9-18 14:28:16 | 显示全部楼层
这非常严重,有点都看不懂,太严重了。要学学鸟语了。
回复 点赞

使用道具 举报

roycityLv.5 发表于 2013-9-18 14:32:58 | 显示全部楼层
学习学习,谢谢分享!
回复 点赞

使用道具 举报

linux147Lv.6 发表于 2013-9-18 15:06:07 | 显示全部楼层
看到标题进来的,,,,没看明白1
回复 点赞

使用道具 举报

karlLv.3 发表于 2013-9-18 15:19:44 | 显示全部楼层
低級漏洞...
對DSM太失望了
回复 点赞

使用道具 举报

akaLv.5 发表于 2013-9-18 15:31:59 | 显示全部楼层
比较感兴趣
回复 点赞

使用道具 举报

jackygurui楼主Lv.10 发表于 2013-9-18 17:30:55 | 显示全部楼层
问题确实有点低级。。失望。
回复 点赞

使用道具 举报

wuchsnLv.5 发表于 2013-9-18 18:01:10 | 显示全部楼层

学习学习,谢谢分享!
回复 点赞

使用道具 举报

wm1245Lv.4 发表于 2013-9-18 19:32:50 | 显示全部楼层
看一下,学习。。
回复 点赞

使用道具 举报

回复

懒得打字嘛,点击右侧快捷回复 【本站酷狼4T,750元】
您需要登录后才可以回帖 登录 | 注册

本版积分规则

投诉/建议联系

support@gebi1.cn

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2024 隔壁网 版权所有 All Rights Reserved. 粤ICP备14056481号-1
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表