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

目标: 1000 元 · 已筹: 1336

100%

CVE-2018-2879 PoC — Oracle Fusion Middleware Access Manager组件安全漏洞

来源
关联漏洞
标题:Oracle Fusion Middleware Access Manager组件安全漏洞 (CVE-2018-2879)
Description:Oracle Fusion Middleware(Oracle融合中间件)是美国甲骨文(Oracle)公司的一套面向企业和云环境的业务创新平台,该平台提供了中间件、软件集合等功能。Access Manager是其中的一个访问管理组件。 Oracle Fusion Middleware中的Access Manager组件11.1.2.3.0版本和12.2.1.3.0版本的Authentication Engine子组件存在安全漏洞。攻击者可利用该漏洞控制组件,影响数据的可用性、保密性和完整性。
介绍
# Oracle-OAM-Padding-Oracle-CVE-2018-2879-Exploit

### Introduction
This exploit was developed during pentesting activity against oracle OAM 11.1.2.3.0. It was developed based on the technical description by sec-consult
```
https://www.sec-consult.com/en/blog/2018/05/oracle-access-managers-identity-crisis/
```

### Requirments
The exploit depend on python-paddingoracle it can be downloaded from here
```
https://github.com/mwielgoszewski/python-paddingoracle
```
### How the exploit works
```
# python oracle-oam-exploit.py -h

#######    #    #     #    #######
#     #   # #   ##   ##    #       #    # #####  #       ####  # #####
#     #  #   #  # # # #    #        #  #  #    # #      #    # #   #
#     # #     # #  #  #    #####     ##   #    # #      #    # #   #
#     # ####### #     #    #         ##   #####  #      #    # #   #
#     # #     # #     #    #        #  #  #      #      #    # #   #
####### #     # #     #    ####### #    # #      ######  ####  #   #
Oracle Padding Oracle
                                coded by: Mostafa Soliman

usage: oracle-oam-exploit.py [-h] [-e ENCRYPT] [-d DECRYPT] [-v] URL

positional arguments:
  URL                   Target resource URL

optional arguments:
  -h, --help            show this help message and exit
  -e ENCRYPT, --encrypt ENCRYPT
                        Encrypt plain text data
  -d DECRYPT, --decrypt DECRYPT
                        Decrypt base64 encode cipher text
  -v, --verb            Show decrypt block info

```
The exploit recieve the URL of the resource which require oracle OAM authentication. It does the below steps:
1. find the correct length that results in adding new padding block
2. brute-force the correct prefix that will be used in future encryption and decryption (magic block)

The pentester can specify any encrypted value (encquery, encreplay, cookie) he wish to decrypt using the ```-d``` flag.

The pentester can specify any plain text value he wish to encrypt using the ```-e``` flag.

### Constructing a fake cookie
by reversing oracle OAM sdk we can see that the cookie consists of the below structure
```
Salt= ACL= AuthId= Ip= TCT= SessionId= userId= validate=BASE64Encode(MD5(Salt+AuthId+Ip+ACL+TCT+SessionId))

```
So to build a cookie, get a valid plain text one using ```-d``` flag, modify it then encrypt it again using ```-e```.

### Example of decrypting a cookie
![Alt text](example/1.jpg?raw=true "CMD")
![Alt text](example/2.JPG?raw=true "output")
文件快照

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

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