Exploit database

GH-0beb2f8cd430f81f376be214b7eed830

jasonlou/cve-2019-0708

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-0708

115 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files4
jasonlou/cve-2019-0708Revision b40ef793775c

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

cve-2019-0708.py

Python · 1,175 bytes
# _*_ coding: utf-8 _*_


"""
auth: bigger.wing
version: v1.0
function: cve-2019-0708漏洞检测
usage:
note: 借助于poc做检测, 3389_hosts为IP地址清单,0708detector.exe为poc
"""


import os
import subprocess
from multiprocessing.dummy import Pool as ThreadPool


current_abs_path = os.path.abspath(__file__)
current_abs_path_dir = os.path.dirname(current_abs_path)
poc = os.path.abspath(current_abs_path_dir) + '/0708detector.exe'
hosts_file = os.path.abspath(current_abs_path_dir) + '/3389_hosts'


def cve_2019_0708(ip, port='3389'):
    command = poc + ' -t ' + ip + ' -p ' + port
    result = subprocess.getoutput(command)

    # print(command, '\n', result)

    if 'WARNING: SERVER IS VULNERABLE' in result:
        result = '%s 存在CVE-2019-0708漏洞' % ip
    else:
        result = '%s 不存在CVE-2019-0708漏洞' % ip

    print(result)


if __name__ == '__main__':
    rdp_hosts = []
    with open(hosts_file, 'r') as f:
        data = f.readlines()
        for x in data:
            ip = x.strip()
            rdp_hosts.append(ip)

    pool = ThreadPool(20)
    pool.map(cve_2019_0708, rdp_hosts)