Is Enter-PSSession secure when using domain administrator account?

Юрий Белковский 41 Reputation points
2021-05-14T14:45:59.86+00:00

Sometimes I need to open a remote power shell session on workstations for administration. It is convenient for me to do this on a domain controller under a domain administrator account. To do this, I run the command: "Enter-PSSession -ComputerName someWorkstation". But is it safe? What are the consequences if, for example, I connect to a workstation infected with viruses in this way? Can a malware use my session to access other workstations or a domain controller? Can malware steal domain administrator credentials?

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,808 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,744 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,714 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,346 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vadims Podāns 8,866 Reputation points MVP
    2021-05-14T17:00:46.8+00:00

    Can malware steal domain administrator credentials?

    When you do Enter-PSSession, your credentials aren't sent to remote machine. PowerShell remoting uses Kerberos and your credentials are available to KDC only, remote system doesn't see them. Of course, as long as you do not use CredSSP, which will pass your credentials to remote host and is subject for credential compromise.

    Can a malware use my session to access other workstations or a domain controller?

    no. When you are authenticated to remote server you present session ticket that is intended only for that specific host. No other host would accept it.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vicky Wang 2,646 Reputation points
    2021-05-17T08:16:53.027+00:00

    Hi,
    Glad your problem has been solved
    Best wishes
    Vicky

    0 comments No comments