RDP Wrapper Library (works with Home/Core SKUs)

Discussion in 'MDL Projects and Applications' started by binarymaster, Jul 26, 2014.

  1. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    Allright, here is pre-release version.

    To install it try these steps:
    1. Install official version with RDPWInst
    2. Take DLL file from the attached archive, according to your OS
    3. Find rdpwrap.dll file in \Program Files\RDP Wrapper\
    4. Rename it somehow
    5. Copy rdpw32.dll (or 64) to the directory and rename it rdpwrap.dll
    6. Restart TermService (or reboot)

    Highest supported TS version = 6.4.9841.0 :Egypt:
     
  2. highend

    highend MDL Junior Member

    Oct 5, 2008
    86
    17
    0
    @binarymaster

    Thanks a lot!

    Tried it on Windows Server 10 Enterprise and it's working perfectly fine :)
     
  3. bartolengue

    bartolengue MDL Novice

    Sep 30, 2014
    12
    0
    0
    Great man! Thank you very much.

    Tried it on Windows 10 TP and is working fine.

    Thanks again!
     
  4. demokool

    demokool MDL Novice

    Oct 2, 2009
    1
    0
    0
    Very great tool !
    But I have a problem on KB2984972 using the RDP Wrapper only allow 2 connection. Is this a bug or did I miss step?

    Thank you for help. Sorry for my English.
     
  5. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    Which OS you are using?

    RDP Wrapper allows unlimited concurrent sessions beginning with Windows 8 and later. On Windows Vista and 7 it supports only 2 concurrent sessions, because additional patching is required but not implemented.

    Maybe this will be implemented in the next official release.
     
  6. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    Well, I just downloaded latest versions of termsrv.dll for Win 7, and I'll try to solve this "problem"... :rolleyes:

    UPD:
    I already got all the files -
    termsrv.dll 6.1.7601.18540 x86 (win7sp1_gdr.140716-1508, KB2984972)
    termsrv.dll 6.1.7601.18540 x64 (win7sp1_gdr.140716-1508, KB2984972)
    termsrv.dll 6.1.7601.22750 x86 (win7sp1_ldr.140715-1624, KB2984972)
    termsrv.dll 6.1.7601.22750 x64 (win7sp1_ldr.140715-1624, KB2984972)
    termsrv.dll 6.2.9200.17048 x86 (win8_gdr.140706-1502, KB2973501)
    termsrv.dll 6.2.9200.17048 x64 (win8_gdr.140706-1502, KB2973501)
    termsrv.dll 6.2.9200.21166 x86 (win8_ldr.140706-1506, KB2973501)
    termsrv.dll 6.2.9200.21166 x64 (win8_ldr.140706-1506, KB2973501)

    Latest two files was extracted by plazma247 from .msu package, and it is very strange I think... :thinking:

    UPD 2:
    I finally figured it out, it's two service branches GDR and LDR.
     
  7. plazma247

    plazma247 MDL Novice

    Oct 16, 2014
    7
    3
    0
    Humm, well if you can get the latest versions i should be able to do the original x64 and x86 RTM versions.

    pm me for link
     
  8. Magissia

    Magissia MDL Novice

    Dec 25, 2012
    21
    4
    0
    Thank you very much for the wrapper, one little question, I understand that your files are installed in the subfolder "RDP Wrapper" in the "Program Files" folder, including rdpwrap.dll, you then erase the value of "ServiceDll" registry key inside "HKLM\SYSTEM\CurrentControlSet\Services\TermService\Parameters" to load your dll instead of system's dll, is something there other file/registry interaction i've missed during the installation ?

    From what i understand, by opening the solution file and reading a fragment of it, your dll load system's dll and patch it on the fly inside ram (leaving the original termsrv.dll untouched, as you presented it on first post) is it correct ?

    Are there other operations done ? Could you tell what are they ?

    Regards
     
  9. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    @Magissia

    That's right.

    1. rdpwrap.dll - wrapper library extracts into \Program Files\RDP Wrapper\
    2. It installs to ServiceDll registry parameter to wrap the SCM calls to the Terminal Services
    3. Various Terminal Services parameters in the registry also changed
    4. Adds an exclusion for port 3389/tcp to the Windows Firewall
    5. RDP Wrapper does load termsrv.dll and patch it in the memory
    5.1. Intercepts calls to SLC.dll to override policy values
    5.2. Intercepts calls to internal unexported SLC-like function (beginning from Win 8)
    5.3. Replaces CSLQuery::Initialize function to my own (to rewrite policy values, beginning from Win 8.1)
    5.4. Patches two internal functions to unlimit concurrent sessions:
    - CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
    - CDefPolicy::Query

    If you don't trust the compiled binaries, you can build it on your own - the source code is fully available and open.
    - x86 version can be built with Embarcadero Delphi 2010 or Microsoft Visual Studio 2013.
    - x64 version can be built with Microsoft Visual Studio 2013.

    Also you can read the source code to understand how it works.

    And for debugging purposes, you can create rdpwrap.txt in the root folder (C:\rdpwrap.txt for example), so on the next start RDP Wrapper will log all its actions to this file.
    _____________________

    By the way... RDP Wrapper has been updated!

    The project link is the same. :rolleyes:
     
  10. Magissia

    Magissia MDL Novice

    Dec 25, 2012
    21
    4
    0
    Hello, i trust the binary, that's just curiosity and the fact my coding skills are rusty and it would take too long for me to figure out everything by reading the code myself.
    Thanks !
     
  11. Mr Whipple

    Mr Whipple MDL Novice

    Oct 20, 2014
    1
    0
    0
    Yes, Thanks much for the wrapper and effort your putting into it!
    Does your latest version support more than 2 multiple concurrent connections to Windows 7 pc?

    Thank again!
     
  12. Magissia

    Magissia MDL Novice

    Dec 25, 2012
    21
    4
    0
    Wrapper build used : 20/10/2014
    Termsrv.dll version : 6.1.7601.18540 (RDP 7.1)
    Windows versions : 7 pro x64 Daz loader, 7 ultimate x64 genuine key

    Issue :
    Current behavior : MSTSC cannot verify computer identity, claims the computer is older than vista or not configured to use the auth server, bypassing it (clicking yes) bring remote computer's logonUI
    Expected behavior : MSTSC show remote computer certificate and ask if you trust it, then proceed to ask for credentials before on the client.
    Solution : The installer should not modify SecurityLayer and UserAuthentification values to 0 and leave them as they are by default on Windows 7. (Untested on other versions of Windows, on Windows 7, second remote user doesn't kick first user and isn't rejected by Windows)


    Suggestion :
    Uninstalling the wrapper doesn't set the settings as they were before installing but revert some back to system default, some untouched. Reverting them back to what they were before installing seems more appropriate (but require the install process to make a back up)



    Thanks for the update !
     
  13. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    Installer sets SecurityLayer and UserAuthentification for backward compatibility.
    If NLA is turned on, RDP Checker will not work and gives an error.

    Well, I think that isn't good, so I'll fix it somehow in the next release. Or I'll find other ways for implementing RDP Checker app.
     
  14. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    Yes, now it supports more than 2 concurrent sessions for Vista, Server 2k8, Win 7 and Server 2k8 R2.

    See supported Terminal Services versions list.
     
  15. SickIcarus

    SickIcarus MDL Novice

    Sep 22, 2009
    3
    0
    0
    Session take-over?

    Hello,
    I found this wrapper while trying to fix the concurrent RDP issues brought about by KB2984972.
    While this wrapper works, is there a way to have an RDP session take-over an existing log-in?

    What I mean is, so I have a user logged in. If I start an RDP session as the same user, it creates an entirely new user session, instead of taking over the session already in progress.
     
  16. SickIcarus

    SickIcarus MDL Novice

    Sep 22, 2009
    3
    0
    0