Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2018-6981 PoC — Vmware ESXi、Workstation和Fusion 缓冲区错误漏洞

Source
Associated Vulnerability
Title:Vmware ESXi、Workstation和Fusion 缓冲区错误漏洞 (CVE-2018-6981)
Description:VMware ESXi 6.7 without ESXi670-201811401-BG and VMware ESXi 6.5 without ESXi650-201811301-BG, VMware ESXi 6.0 without ESXi600-201811401-BG, VMware Workstation 15, VMware Workstation 14.1.3 or below, VMware Fusion 11, VMware Fusion 10.1.3 or below contain uninitialized stack memory usage in the vmxnet3 virtual network adapter which may allow a guest to execute code on the host.
Description
Use this tool to prioritize cluster patching for the recent VMware advisory VMSA-2018-0027 related to CVE-2018-6981 and CVE-2018-6982.
Readme
# Limitation
Script does not currently identify which ESXi systems have been patched, and merely relies on major and minor revision numbrer to determine if the hypervisor is vulnerable.  If required we can check patches but this tool will live and die over a short periord of time so it isn't worth the effort.  

# Description:  

This tool enables operations teams to quickly identify and prioritize which vCenter clusters have virtual machines using the VMXNET3 adapter on top of ESXi hypervisors vulnerable to VMSA-2018-0027.  

VMware Advisory: https://www.vmware.com/security/advisories/VMSA-2018-0027.html  
CVE: CVE-2018-6981, CVE-2018-6982  

# Usage

Usage:
  vmxnet3_hunter.py -h | --help
  vmxnet3_hunter.py (--vsphere_list=<vsphere_list> --vsphere_user=<vsphere_user>)
 
Options:
  --vsphere_list=<vsphere_list>     A file containing a single IPv4 address per line
  --vsphere_user=<vsphere_user>     vCenter username ex: administrator@vsphere.local

# Example vsphere_list file
$ cat rhosts  
1.1.1.1  
2.2.2.2  
3.3.3.3  
4.4.4.4  
5.5.5.5  

# Example execution
$ python3 vmxnet3_hunter.py  --vsphere_list rhosts --vsphere_user administrator@sphere.local   
  
Password for user administrator@vsphere.local:  
  
Generating data list from: rhosts    
Description:  
Concurrently executing vCenter enumeration  
Conecting to vCenter: 1.1.1.1  
Enumerating ESXi Host: 1.1.1.1 
Enumerating Virtula Machine: None  
Enumerating Virtula Machine: None  
Enumerating Virtula Machine: None  
Found vm with vmxnet3: None  
Enumerating Virtula Machine: 1.1.1.1  
Found vm with vmxnet3: 1.1.1.1   
Enumerating ESXi Host: 1.1.1.1  
Enumerating Virtula Machine: None  
Enumerating ESXi Host: 1.1.1.1  
Enumerating Virtula Machine: None  
Enumerating vCenter: 1.1.1.1   
Writing our results to vmxnet3_results.log  

# Log output      
$ cat vmxnet3_results.log  
```json
[  
    {  
        "vCenterIP": {  
            "ClusterPatchPriority": [  
                "Lab"  
            ],  
            "ESXiHosts": [  
                {  
                    "Cluster": "Lab",  
                    "Name": "1.1.1.1 ",  
                    "PatchPriority": true,  
                    "Version": "6.5.0",  
                    "VirtualMachines": [  
                        {  
                            "family": null,    
                            "fullname": null,  
                            "hostname": null,  
                            "ip": null,  
                            "name": "ubuntu01",  
                            "nicDevice": "VMXNET3",  
                            "state": "notRunning"  
                        },  
                        {  
                            "family": "linuxGuest",  
                            "fullname": "Other 3.x or later Linux (64-bit)",  
                            "hostname": "debian01",  
                            "ip": "1.1.1.1 ",  
                            "name": "VMware vCenter Server Appliance",  
                            "nicDevice": "VMXNET3",  
                            "state": "running"  
                        }  
                    ],  
                    "VulnerableTo": "CVE-2018-6981, CVE-2018-6982, VMSA-2018-0027"  
                },  
                {  
                    "Cluster": "Lab",  
                    "Name": "1.1.1.1 ",  
                    "PatchPriority": false,  
                    "Version": "6.5.0",  
                    "VirtualMachines": [],  
                    "VulnerableTo": "CVE-2018-6981, CVE-2018-6982, VMSA-2018-0027"  
                },  
                {  
                    "Cluster": "Lab",  
                    "Name": "1.1.1.1 ",  
                    "PatchPriority": false,  
                    "Version": "6.5.0",  
                    "VirtualMachines": [],  
                    "VulnerableTo": "CVE-2018-6981, CVE-2018-6982, VMSA-2018-0027"  
                }  
            ],  
            "vCenterBuild": "8307201",  
            "vCenterIP": "1.1.1.1",  
            "vCenterVersion": "6.5.0"  
        }  
    }  
]  
```
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →