GoSecure / pyrdp

RDP monster-in-the-middle (mitm) and library for Python with the ability to watch connections live or after the fact
https://www.gosecure.net/blog/2020/10/20/announcing-pyrdp-1/
GNU General Public License v3.0
1.5k stars 242 forks source link

pyrdp error #434

Closed jdlive07 closed 10 months ago

jdlive07 commented 1 year ago

Fairly new to all of this. So please bear with me. I followed all of the required steps and extracted the certificates from my target server. When I run:

pyrdp-mitm.py -k private_key.pem -c certificate.pem

I get this error: "- ERROR - GLOBAL - pyrdp - An error occurred when creating the server TLS context. There may be a problem with your private key or certificate (e.g: signature algorithm too weak). Here is the exception: [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'file_ctrl', 'system lib'), ('SSL routines', 'SSL_CTX_use_certificate_file', 'system lib')]"

A few things I need clarification on. In the above command line, is there a typo? Is it supposed to be "private_key.pem" or "private_key.key"

In the documentation you provided "Extracting Windows Server Remote Desktop Certificate", the command is "-k privkey.key -c pubkey.pem".

Just an fyi, I have extracted the private key and certificate from the target server using mimikatz. That part seemed fine.

I am using python 3.8.10 on Ubuntu 20.04

Please advise.

jdlive07 commented 1 year ago

Got the issue resolved. I was running the command from a different directory than where I put that privkey.key and pubkey.pem.

Pyrdp is running, but I am not seeing any of my activity. The target server is a Windows Server 2012.

Please advise.

obilodeau commented 1 year ago

This sounds like a networking configuration problem. Are you sure your port forwarding is right?

obilodeau commented 10 months ago

Closing due to lack of information. Feel free to re-open!