CPM - unable to discover RHEL 9.x machines with DEFAULT cryptographic policies
Symptom
When performing Accounts discovery scan on RHEL 9.x servers, you will encounter the following error in the machine scan logs (eg. DNA_<ip>.log) :
-----------------------------------
9/15/2023 3:05:42 PM [4480][64] - checkWindowsVersion - DNAPR244I Could not detect Windows version for remote machine 10.xxx.xxx.xxx. If the machine is a unix machine, ignore this message. Error message: System.Runtime.InteropServices.COMException (0x80070035): The network path was not found.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_IsContainer()
at System.DirectoryServices.DirectoryEntries.ChildEnumerator..ctor(DirectoryEntry container)
at System.DirectoryServices.DirectoryEntries.GetEnumerator()
at System.Linq.Enumerable.<OfTypeIterator>d__95`1.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Cyberark.DNA.Common.Services.OSDetectionService.checkWindowsVersion(IMachine machine, IPasswordCredential authorizedAccount).
-----------------------------------------------------------
Upon seeing the above error, the DetectOSVersion method will return no result due to SSH connection to the RHEL server being refused at the server. As a result, no accounts are discovered on the server.
Environment
11.5;12.0;12.1;12.2;12.6;13.0;13.2 Privileged Access Manager (PAM, self-hosted) Discovery and Accounts Feed Discovery and Accounts Feed Discovery Scanner
Cause
RHEL 9.x is not a supported operating system for CPM Accounts discovery feeds :
Scans on RHEL 9.x enabled with DEFAULT system-wide cryptographic policies failed due host keys algorithms compatibility. CPM Scanner uses SHA1-based host keys algorithm (Ssh-rsa,Ssh-dss) which is disabled by default at RHEL 9.x server enabled with DEFAULT system-wide cryptographic policies.
Refer to RHEL 9.x system-wide cryptographic policies documentation on supported algorithms,
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening
Resolution
Existing ER : https://community.cyberark.com/s/article/CPM-Scanner-support-for-RHEL-9x--899a-823
Temporary workarounds:
Provision RHEL 9.x servers based on "update-crypto-policies --set DEFAULT:SHA1" which will allow the discovery process to be successfully.
This custom cryptographic policy is slightly lower than DEFAULT but higher than LEGACY.