Code Monkey home page Code Monkey logo

rdpsign's Introduction

rdpsign

Remote Desktop Protocol (.rdp) File Signing Library & Command Line Application

https://github.com/calw20/rdpsign

In Window Server 2008 Microsoft added the rdpsign.exe utility. This command enables you to digitally sign a Remote Desktop Protocol(.rdp) file. See https://technet.microsoft.com/en-us/library/cc753982.aspx for a detailed description.

To the best of my knowledge the specifications of the rdp signature creation are proprietary and have not been published until today (December 2021).

This python script is the result of reverse engineering the rdpsign.exe internals.

Installation

sudo curl https://raw.githubusercontent.com/calw20/rdpsign/master/rdpsign.py -o /usr/local/bin/rdpsign
sudo chmod a+rx /usr/local/bin/rdpsign

Dependencies

  • python 3.7 or later
  • openssl commandline utility

Usage

rdpsign --help

The refactor also exposes the signRDP function taking the rdp file to sign as a string, the path to the signing certfile, the path to the key file if needed and wether the lib should split the signature into 64 character chunks.

Demo (Tested on Linux, Mac OSX & Windows 10)

First we create a simple openssl.conf file:

[ req ]
prompt = no
distinguished_name = publisher
x509_extensions = extensions

[ publisher ]
commonName = DEADBEEF

[ extensions ]
extendedKeyUsage = serverAuth

Now create a selfsigned test certificate and private key:

openssl req -x509 -newkey rsa:2048 -nodes -out signer.crt -keyout signer.key -config openssl.conf

Sign your rdp file:

rdpsign test.rdp test-signed.rdp signer.crt -k signer.key

Copy test-signed.rdp and signer.crt to your windows machine and import the signer.crt test certificate into your trusted root store:

  • double click signer.crt
  • click the "Install Certificate" button
  • in the Certificate Import Wizard choose the "Trusted Root Certification Authorities" store

If you double click test-signed.rdp now you should get a dialog asking if you trust the DEADBEEF publisher.

rdpsign's People

Contributors

calw20 avatar nfedera avatar

Watchers

Neustradamus 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.