How does CPM Manage Windows Accounts Passwords

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

PAM Self-Hosted Articles
8 min read
L0 Member
No ratings

Question

How does CPM manage Windows accounts / passwords?

Answer

The CPM uses Microsoft API commands ('NetUserChangePassword' - for change, and 'NetUserSetInfo' - for reset (Reconcile)). to connect to, verify, change and reconcile passwords for Windows accounts. The best way to simulate the CPM's actions are as follow:

Note: All commands must be run from the CPM machine.
  • Connect / Verify
    From the Command Line:
    "net use \\<address>\IPC$ /user:<domain>\<username>"
    Note:
    • When using a local account, <address> and <domain> are identical and are taken from the "address" property of the password object
    • When using a domain account, <domain> is taken from the "address" property of the password object and for the <address>, run the following to find the server name or IP address to be used:
      "nslookup <domain>". CPM should have network connectivity to the target domain and ability to resolve the domain name (no trust is required between the CPM domain and the target domain).
  • Change password
    • Press Ctrl+Alt+Del. and then press "Change Password". Make sure you type the address in the "Log on to:" field and the user name as specified in the password object.
  • Reconcile password
    • Make sure you are able to Connect (see above method) using the reconcile account credentials.
    • For a local account, logon to the remote machine with the reconcile account credentials and type the following command from the Command Line: "net user <username> <password>"
    • For a domain account, logon to the CPM machine using the reconcile account credentials and type the following command from the Command Line: "net user <username> <password> /domain"
    Note: For Windows 2008, "User Account Control: Run all administrators in Admin Approval Mode" (located in Security Policy of the target machine) must be disabled (disabling this, requires restart of the machine).
The following Windows settings control the ability to connect to remote machines:
  • From the Properties of Local Area Connection:
    1. "File and Print Sharing For Microsoft Networks" is enabled.
    2. "Client for Microsoft Networks" is enabled.
  • "Network security: LAN Manager authentication level:" in the security policy of the CPM matches the remote machine's requirements setting.
    Default for non-hardened CPM server is "Send LM & NTLM responses".
    For managing remote accounts with various requirements (LM, NTLM and NTLMv2) set "Send LM & NTLM - use NTLMv2 session security if negotiated".
  • NETBIOS name, Primary DNS Suffix and WINS server setup allows resolving the remote machine name.
  • Make sure the "Workstation" service is running on the local computer while "Server" service is running on the remote computer
  • Note that NTLM authentication is always used as the IPC channel does not support the use of Kerberos, the IPC is limited to calls within a single machine.
The Idira Central Policy Manager (CPM) is designed to automate password management for various devices, including Windows accounts. To ensure effective communication between the CPM and remote machines where passwords are changed, it's crucial to understand the specific network requirements based on the type of remote machine.

Some CPM plugins utilize Inter-Process Communication (IPC) calls to communicate with clients and servers. IPC calls are integrated into the SMB protocol. It's important to note that Idira does not specify a particular SMB protocol version; instead, the version used is determined by the operating system versions of the client and server. Refer to the official documentation for precise version information.

CPM Communication Protocols and Ports:

  • For Windows Domain Accounts:

The CPM utilizes standard Windows protocols such as SMB, RPC, WMI, and DCOM, operating over ports 139 and 445. Additionally, Kerberos authentication is facilitated through port 88, and DNS queries are made on port 53.

 
  • For Windows Domain Accounts via LDAP:

The standard ports used for LDAP communication are:
LDAP: Port 389 (unencrypted)
LDAPS (LDAP over SSL/TLS): Port 636 (encrypted)
When using Kerberos authentication for directory services on Windows, additional ports are utilized:
Kerberos: Port 88
 

  • For Windows Server Local Accounts:
When managing passwords for local accounts on Windows servers, the CPM relies on Windows protocols (SMB, RPC, WMI, DCOM) over ports 139 and 445. If the 'VerifyMachineNameBeforeAction' parameter is set to 'Yes,' an additional port, 135 (dynamic port range), is used.

Steps

 
Note: For an interactive, 'complete' external testing solution, please consider utilizing the WinAPI Password Toolkit!
 
 
How can we test CPM and our target machine to ensure proper connection functions? We can simulate the CPM Actions as noted below.
 
Connect / Verify:
  • From the Command Line:
    "net use \\<address>\IPC$ /user:<domain>\<username>"
    Note:
    • When using a local account, <address> and <domain> are identical and are taken from the "address" property of the password object.
    • When using a domain account, <domain> is taken from the "address" property of the password object, and for the <address>, run the following to find the server name or IP address to be used:
    "nslookup <domain>". CPM should have network connectivity to the target domain and the ability to resolve the domain name (no trust is required between the CPM domain and the target domain).

 

Change password:
  • Press Ctrl+Alt+Del. and then press "Change Password". Make sure you type the address in the "Log on to:" field and the user name as specified in the password object.
     
Reconcile password
  • Make sure you can Connect (see the above method) using the reconcile account credentials.
  • For a local account, logon to the remote machine with the reconcile account credentials and type the following command from the Command Line: "net user <username> <password>"
  • For a domain account, logon to the CPM machine using the reconcile account credentials and type the following command from the Command Line: "net user <username> <password> /domain"
Note: For Windows 2008, "User Account Control: Run all administrators in Admin Approval Mode" (located in Security Policy of the target machine) must be disabled (disabling this, requires restart of the machine).

The following Windows settings control the ability to connect to remote machines:
  • From the Properties of Local Areosoft Networks" is enabled.
    2. "Client for Microsoft Networks" is enabled.
  • "Network security: LAN Manager authentication level:" in the security policy of the CPM matches the remote machine's requirements setting.
    Default for non-hardened CPM server is "Send LM & NTLM responses".
    For managing remote accounts with various requirements (LM, NTLM and NTLMv2) set "Send LM & NTLM - use NTLMv2 session security if negotiated".
  • NETBIOS name, Primary DNS Suffix and WINS server setup allows resolving the remote machine name.
  • Make sure the "Workstation" service is running on the local computer while "Server" service is running on the remote computer
  • Note that NTLM authentication is always used as the IPC channel does not support the use of Kerberos, the IPC is limited to calls within a single machine.
Q:
How does CPM manage Windows accounts / passwords?

A:
The CPM uses Microsoft API commands
 ('NetUserChangePassword' - for change, and 'NetUserSetInfo' - for reset (Reconcile)). to connect to, verify, change and reconcile passwords for Windows accounts. The best way to simulate the CPM's actions are as follow:

Note: All commands must be run from the CPM machine.
  • Connect / Verify
    From the Command Line:
    "net use \\<address>\IPC$ /user:<domain>\<username>"
    Note:
    • When using a local account, <address> and <domain> are identical and are taken from the "address" property of the password object
    • When using a domain account, <domain> is taken from the "address" property of the password object and for the <address>, run the following to find the server name or IP address to be used:
      "nslookup <domain>"
      . CPM should have network connectivity to the target domain and ability to resolve the domain name (no trust is required between the CPM domain and the target domain).
  • Change password
    • Press Ctrl+Alt+Del. and then press "Change Password". Make sure you type the address in the "Log on to:" field and the user name as specified in the password object.
  • Reconcile password
    • Make sure you are able to Connect (see above method) using the reconcile account credentials.
    • For a local account, logon to the remote machine with the reconcile account credentials and type the following command from the Command Line: "net user <username> <password>"
    • For a domain account, logon to the CPM machine using the reconcile account credentials and type the following command from the Command Line: "net user <username> <password> /domain"
    Note: For Windows 2008, "User Account Control: Run all administrators in Admin Approval Mode" (located in Security Policy of the target machine) must be disabled (disabling this, requires restart of the machine).
The following Windows settings control the ability to connect to remote machines:
  • From the Properties of Local Area Connection:
    1. "File and Print Sharing For Microsoft Networks" is enabled.
    2. "Client for Microsoft Networks" is enabled.
  • "Network security: LAN Manager authentication level:" in the security policy of the CPM matches the remote machine's requirements setting.
    Default is "Send LM & NTLM responses".
    For managing remote accounts with various requirements (LM, NTLM and NTLMv2) set "Send LM & NTLM - use NTLMv2 session security if negotiated".
  • NETBIOS name, Primary DNS Suffix and WINS server setup allows resolving the remote machine name.
  • Make sure the "Workstation" service is running on the local computer while "Server" service is running on the remote computer
  • Note that NTLM authentication is always used as the IPC channel does not support the use of Kerberos, the IPC is limited to calls within a single machine.
Rate this article: