pyrdp
pyrdp copied to clipboard
Enable forwarding of unparsed Client Data Blocks in the GCC negociation.
Following discussion in #233 with @obilodeau, here are my changes to allow the CLIENT (I didnt do the server part) to send other data blocks in the negociation phase. The unparsed data blocks are sent to the server, which should in turn send its extended data blocks (ex. to negociate UDP connection). Currently the unparsed Server Data Blocks will be thrown away by PyRDP.
Bonus: Parse the client Monitor Data block and forward it to the server. This enables PyRDP to allow multiple monitors (like in a normal RDP connection) instead of forcing it to one. This information could be logged as it could be helpful to fingerprint the client. Not included: PyRDP-player changes to see the other monitors.
I will leave this as a draft PR if you ever want to continue/test/get inspiration from those changes, but I don't plan to further work on this (it was for a CTF challenge), so feel free to close the PR if you don't need this!
The list of data blocks that can be sent is here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/8a36630c-9c8e-4864-9382-2ec9d6f368ca