Can I trick windows to "see" a remote tcp session as a console session?

3

At work I'm connecting to our company's portal in order the perform my job. I would like to take some of my work home and do it from there. As I cannot connect from home directly to teh company's portal, I thought the a good idea would be to enable RDP on my work computer. I did that, but the portal is still rejecting my connection because the ssl certificate is not accepted. The difference is that when I'm at work windows see's me at the console of the machine and when I'm at home windows see's me as a tcp session.

So, is there a way to trick windows to see my tcp session to my work computer as a console session?

I tried the first and second option from this post:

  1. Registry : HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\TSAppCompat.
    [This key][1] is missing in a normal session on my desktop.
    You might try to delete it, if you can.
  2. SESSIONNAME environment variable values : Console / "RDP#" / (empty).
    You may try to run your game from the Command Prompt (cmd) after doing
    SET SESSIONNAME=Console (my desktop value) or SET SESSIONNAME= (empty).
    To find out its current value, enter SET SESSIONNAME before changing anything.
  3. The system calls [GetSystemMetrics(SM_REMOTESESSION)][3] and [GetVersionEx][2] ([OSVERSIONINFOEX.wSuiteMask][4]) return the execution context.
    Not much you can do against this one, except writing a system-hook for it.
    If interested see this codeproject.com article : [API hooking revealed][5].

Written by harrymc, found here: Windows: How to make programs think they're not running in a terminal server session?

  1. The registry key is missing, nothing to delete.
  2. I tried "SET SESSIONNAME=Console". The session name changes when I'm interrogating with "SET SESSIONNAME" but in shows tcp-rdp in Task Manager -> Users and the certificate is still rejected by the portal.
  3. The third option is way to complicated for my programing skills.

Because the portal uses ssl certificate and I can only access it from IE, I'm looking for a way to make IE think that I'm logged from the console of the machine and not remotely connected. Hope something works...

user3120048

Posted 2013-12-24T17:36:19.567

Reputation: 41

Answers

3

I am not sure if not being in the console session is the problem or not, but one thing you might want to try is mstsc /admin (on MSTSC version 6.1 and higher) or mstsc /console on older versions. This tells RDP to connect to the console session of your machine. If you do that then you won't need to trick the system into thinking you are in the console session, you will be in the console session.

mageos

Posted 2013-12-24T17:36:19.567

Reputation: 131

1

I am going to say no from built-in MSFT RDP, because you cannot easily alter environmental variables. For instance the one you are being stopped by is the SESSIONNAME variable, it is either set to CONSOLE, for local logons, or RDP-Tcp#1, RDP-Tcp#2 for remote sessions.

To view it from powershell.

[environment]::GetEnvironmentVariable("SESSIONNAME")

or from command prompt.

SET SESSIONNAME 

Knuckle-Dragger

Posted 2013-12-24T17:36:19.567

Reputation: 1 817

But it's plausible that alternative RDP programs do not have this issue, the real answer might be to try something like VNC or Dameware. That or get your companies server team to create a VPN entrance. – Knuckle-Dragger – 2013-12-24T21:22:34.637

I'm using openvpn now. I tried many RDP software, but none really helps. I will learn none about "set sessionname". At least, now I have a new starting point. – user3120048 – 2013-12-24T21:57:19.480

I will learn more* – user3120048 – 2013-12-24T22:34:23.230