Coder Social home page Coder Social logo

rdgscanner's Introduction

Scanner for CVE-2020-0609 & CVE-2020-0610

A proof-of-concept scanner to check an RDP Gateway Server for vulnerabilities CVE-2020-0609 & CVE-2020-0610.

Tested on:

  • Windows Server 2012 x64
  • Windows Server 2016 x64
  • Windows Server 2019 x64

Disclaimer

Scanning for memory corruption vulnerabilities is dangerous and can potentially crash systems. Whilst this tool has been designed to avoid causing a crash, stability can't be 100% guaranteed. Use at your own risk and only scan systems you have permission to test.

Usage

python3 RDGScanner.py <ip> <port>

How it works

To understand the vulnerabilities, you can read my writeup here: https://www.kryptoslogic.com/blog/2020/01/rdp-to-rce-when-fragmentation-goes-wrong/

The CONNECT_PKT_FRAGMENT message allows a connect message to be fragmented across multiple packets. Each packet has a field specifying the position of the packet in the sequence (fragment_id) and the total number of packets in the sequence (num_fragments).

CVE-2020-0610 is an OOB write vulnerability which occurs when fragment_id is greater than 64. To mitigate the vulnerability, checks have been added to fail if either fragment_id or num_packets is greater than 64.

By setting num_fragments (but not fragment_id) to a value greater than 64, we fail the security check without risking exploiting the bug. On a patched system we will be disconnected with an error code of 0x8000ffff, whereas on an unpatched system nothing will happen.

rdgscanner's People

Contributors

malwaretech avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.