RDP Wrapper Library (works with Home/Core SKUs)

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

  1. orev

    orev MDL Novice

    Aug 24, 2009
    4
    2
    0
    For sessions that close immediately, make sure you have passwords on your accounts (default settings do not allow network logins to passwordless accounts, and this is something you really don't want to change), and also that you have firewall port 3389 open. While troubleshooting, you can try to disable the firewall and see if that fixes it, but make sure to re-enable it after you have narrowed it down.

    I never got RDPCheck to work either, and given the default setting that connections to localhost are not allowed, I think this tool creates more confusion than it's worth. I seem to remember reading somewhere that some other security checks had to be disabled just to get RDPCheck to work, which I think is a bad approach just to allow a testing tool to function correctly.

    So far the hack itself is working for me and I really like this approach instead of directly patching the DLL file. However, I have seen that it needs to be updated for different versions of the termsrv.dll file, so is it really as resilient to Windows Updates? Is this expected to work when a new termsrv.dll file is released as an update, or would rdpwrap and need to be updated for each new termsrv.dll version?
     
  2. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    #82 binarymaster, Nov 4, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Of course, you need to log in multiple user accounts to enjoy concurrent sessions.

    But, you can also use the same user account for concurrent sessions, using this command:
    Code:
    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f

    RDP Wrapper mainly uses two techniques:
    1) Hooking exported DLL WinAPI function
    used in: only Vista and Windows 7
    2) Hooking / replacing internal functions
    used in: Vista, 7, 8, 8.1, 10 and higher

    The first point allows remote connections and two concurrent sessions (as on Windows Server without Application Terminal Server role). It's fully automated and will work with new updates.
    The second point allows unlimited concurrent sessions and multiple sessions per one user. This part can't be easily automated, it requires to research each termsrv.dll version in IDA Pro to find appropriate offsets for functions, assembly instructions and variables in the memory.

    So, actually RDP Wrapper is really strong against updates for Vista and Windows 7 (except some extended features). For Windows 8 terminal services updates it isn't so adaptive, but it still remains in the system.

    Immunity against Windows Update means that it will stay in the system registry and will load with newer versions of terminal services though some features will be unavailable partially or entirely. Of course, I can implement autoupdate routine for RDP Wrapper, but this can lead to problems with antivirus software, etc. It is better to leave it to the server administrator.
     
  3. BurningBeard

    BurningBeard MDL Novice

    Nov 4, 2014
    1
    0
    0
    8.1 one language, version of dll is 6.3.9600.17095. Installation log:

    \bin>RDPWInst.exe -i
    RDP Wrapper Library v1.3
    Installer v2.2
    Copyright (C) Stas'M Corp. 2014
    [*] Installing...
    [*] Terminal Services version: 6.3.9600.17095
    [+] TermService found (pid 3332).
    [*] Shared services found: CryptSvc, Dnscache, LanmanWorkstation, NlaSvc
    [*] Extracting files...
    [+] Folder created: C:\Program Files\RDP Wrapper\
    [+] Extracted rdpw64 -> C:\Program Files\RDP Wrapper\rdpwrap.dll
    [*] Configuring service library...
    [*] Checking dependencies...
    [*] Checking CertPropSvc...
    [*] Checking SessionEnv...
    [*] Terminating service...
    [*] Starting CryptSvc..
    [*] Starting Dnscache...
    [-] StartService error (code 1056).
    [*] Starting LanmanWorkstation...
    [*] Starting NlaSvc...
    [-] StartService error (code 1056).
    [*] Starting TermService...
    [*] Configuring registry...
    [*] Configuring firewall...
    Ok.

    RDPchecker throws "Network level Authentication is required", telnet to localhost 3389 fails, and the port is not listened on (not sure if should, though). Firewall inbound rules configured.

    Reboot/service restart does not help - RDP to does not work.

    EDIT: Fixed. Turned out termsrv.dll was incorrectly modified before - some binary garbage in place of the strings mentioned. Restored from backup (to do that without reboot - find svchost that holds this dll and kill it), run RDPWinst.exe -u and RDPWInst.exe -i
     
  4. ICanSeeYou7687

    ICanSeeYou7687 MDL Novice

    Nov 4, 2014
    1
    0
    0
  5. fireup6

    fireup6 MDL Novice

    Nov 4, 2014
    4
    0
    0
    Hey binarymaster! I just created this account to let you know how ridiculously awesome this tool is. Thank you for all your hard work.:worthy:
     
  6. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    #86 binarymaster, Nov 12, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  7. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,681
    18,585
    340
  8. plazma247

    plazma247 MDL Novice

    Oct 16, 2014
    7
    3
    0
    Ive sent you a PM with MSU files and termsrv.dll pre extracted from the MSU files where applicable (apart from the arm versions), note as previously the msu contains two versions so ive labelled both versions for you with the right numbers.

    ;)
     
  9. chune

    chune MDL Novice

    Jul 17, 2014
    4
    1
    0
    isnt the whole point of the RDP wrapper project to be immune to windows updates? Did the most current wave up updates break this?
     
  10. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    I think this update may break RDP concurrent sessions on Windows 8 and higher. Windows 7 and older will work with only 2 concurrent sessions.

    I'm already working on RDP Wrapper update.

    UPD:
    According to files information, termsrv.dll will be updated only in Windows Vista SP2 and Windows 7 SP1.
     
  11. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    Wrong! That was just the advertising ploy to get you to try his app. Nothing makes you immune to windows updates except disabling windows updates.
     
  12. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    RDP Wrapper has been updated!

    + bonus: created a new program for RDP user-friendly configuration.
    I think it will be very useful :biggrin:
     
  13. 1radman

    1radman MDL Novice

    Oct 16, 2014
    5
    1
    0
    After hexedting the last termserv only to have this last KB-induced-termsrv-death I broke down and decided to try the RDP wrapper. It's weird--the first dozen times I tried to run the exe or the bat file it didn't run, then I tried again and it worked.

    Like a charm!!

    Thanks binarymaster!!!!:biggrin::biggrin:

    My only suggestion is to provide the 5 files as a zip--I couldn't figure out how to download the bat files from github.
     
  14. binarymaster

    binarymaster MDL Member

    Jul 11, 2014
    101
    122
    10
    It's very simple to download ZIP from GitHub:
    1. Go to the repository root directory
    2. You will see "Download ZIP" button at middle-right on the page
    3. Just click it to download the distribution
    :yes:
     
  15. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,681
    18,585
    340
  16. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,681
    18,585
    340
  17. UnderShadow

    UnderShadow MDL Novice

    Nov 19, 2007
    10
    0
    0
    Great!

    But is it still limited to 2 concurrent connections on Win7?

    If so, well, too bad