查看: 7439|回复: 30

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

[复制链接]

244

丝瓜

90

回帖

0

精华

贡献会员

Medal No.1Medal No.2Medal No.3Medal No.4Medal No.5

发表于 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





392

丝瓜

1736

回帖

0

精华

普通用户

发表于 2013-9-18 07:41:18 | 显示全部楼层
鸟语,看不懂

点评

google翻一下看啊,应该也就差不多看懂了!!!  详情 回复 发表于 2013-9-18 08:06
回复

使用道具 举报

193

丝瓜

292

回帖

0

精华

普通用户

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

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

使用道具 举报

194

丝瓜

109

回帖

0

精华

普通用户

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

使用道具 举报

684

丝瓜

685

回帖

0

精华

普通用户

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

使用道具 举报

173

丝瓜

216

回帖

0

精华

普通用户

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

使用道具 举报

203

丝瓜

640

回帖

0

精华

普通用户

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

使用道具 举报

356

丝瓜

636

回帖

0

精华

普通用户

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

使用道具 举报

150

丝瓜

216

回帖

0

精华

普通用户

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

使用道具 举报

146

丝瓜

181

回帖

0

精华

普通用户

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

使用道具 举报

118

丝瓜

71

回帖

0

精华

普通用户

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

使用道具 举报

370

丝瓜

471

回帖

0

精华

普通用户

发表于 2013-9-18 14:25:00 | 显示全部楼层
黑群只有4.2啊
回复

使用道具 举报

695

丝瓜

1272

回帖

0

精华

普通用户

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

使用道具 举报

297

丝瓜

606

回帖

0

精华

普通用户

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

使用道具 举报

1478

丝瓜

1661

回帖

0

精华

普通用户

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

使用道具 举报

161

丝瓜

78

回帖

0

精华

普通用户

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

使用道具 举报

197

丝瓜

718

回帖

0

精华

普通用户

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

使用道具 举报

244

丝瓜

90

回帖

0

精华

贡献会员

Medal No.1Medal No.2Medal No.3Medal No.4Medal No.5

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

使用道具 举报

490

丝瓜

368

回帖

0

精华

普通用户

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

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

使用道具 举报

501

丝瓜

313

回帖

0

精华

普通用户

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

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号
Archiver|手机版|小黑屋|第一纳斯网

相关侵权、举报、投诉及建议等,请发 E-mail:admin@discuz.vip

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|粤ICP备19046372号

在本版发帖
关注公众号
QQ客服返回顶部