Matt C
Matt C

Reputation: 21

Is it possible to capture the local user (not the remote user) within a RDP Session

I am trying to capture the local user name from a RDP Session. To clarify, see below example:

My local workstation is call WORKSTATION1, I’m logged in to this local workstation as JOHN.DOE.

I make an RDP connection to work using JANE.DOE. Is it possible to capture JOHN.DOE from within the RDP session? I don’t think you can capture it using WTSQuerySessionInformation API.

Any suggestions would be greatly appreciated.

Upvotes: 1

Views: 214

Answers (1)

Anya Shenanigans
Anya Shenanigans

Reputation: 94624

I don't believe there's anywhere in the protocol that would provide for this information - the originating system can quite easily not have a user account in any form that is understood - e.g. a dumb remote terminal.

There may be some ways of getting this information based on the client system (because you get the IP address and client name) and then back-tracking this via a known database of users -> systems; but this would only work if people accessed the system from known origin systems and didn't move around.

Alternatively, if you know the client system and it's domain joined you could interrogate it remotely from an account that can interrogate the client system.

I'm open to being corrected on this, but to the best of my knowledge it's not doable.

Upvotes: 0

Related Questions