Forum: Win32/Win64 API (native code)
Delphi
by Remko,
22. Okt 2007
For more information on the subject of encrypting and decrypting rdp passwords you can look at my site. I have placed the article here: http://remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
29. Mär 2007
Thanks Maribu. I did see the functions in the Help but decided not to use them because of this note in the help:
Note:
The hexadecimal number must use lower-case characters; HexToBind does not recognize upper-case characters.
Using shr brings back an old discussion:
Warning Only use Shr when a bit operation is required - do not use instead of a multiplication or division. First because...
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
27. Mär 2007
*push*
Any thoughts on improving this part:
{***********************************************************}
{ PasswordHashToBlobData: Converts a RDP password Hash to }
{ a DATA_BLOB structure }
{ sPasswordHash : RDP Password Hash (HEX String }
{***********************************************************}
function...
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
20. Mär 2007
Decrypting the string from MSTSC gives me back the password and description 'psw'.
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
20. Mär 2007
I watched what MSTSC does with a debugger, the description is always psw.
Here's the cleaned up function:
uses JwaWinCrypt;
function CryptRDPPassword(sPassword: string): string;
var DataIn: DATA_BLOB;
DataOut: DATA_BLOB;
pwDescription: PWideChar;
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
20. Mär 2007
I agree the code is Spaghetti, I just made it quickly to test it. I will tidy it up and make it more readable.
I checked and rdp file with HEX viewer and indeed it starts with FF FE (although mstsc doesn't bother absence of it).
I already made the plaintext password a WideString but I keep ending with a hash about 350 bytes long while MSTSC always produces 1329 bytes. Also each time I save...