PSMP connection failing and showing socket error
Symptom
When trying to connect to the target via PSMP it will fail with the following error:
PSPSD072E Perform session error occurred. Reason: PDKTCSocket closed [7]. (Codes: -1, -1)
Environment
12.0;12.1;12.2;12.4;12.3;12.5;12.6 Privileged Access Manager (PAM, self-hosted) PSMP RHEL
CentOS
Cause
Microsoft Defender for Endpoint on Linux is installed on the PSMP server and prevents PSMP to run.
You can check the protection history with:
mdatp threat list
It will show psmp processes were quarantined:
Id: "69fa7d30-0905-417c-9add-c51051f8a9cd" Name: Behavior:Linux/ExecutionFromSuspLocation.B Type: "behavior" Detection time: Wed Nov 17 15:21:54 2021 Status: "quarantined" Process ID: 8431 Path: /opt/CARKpsmp/bin/psmpserver Sha256 hash: db97f8c6744d34cdc04bfec4150325a8758fc843397abc1149fe7b51d6ef9da4 Sha1 hash: 83d99607ab92dc3c8a68d3cd2ab406edeb778522 Process ID: 10105 Path: /opt/CARKpsmp/components/ssh Sha256 hash: 466a0a50117cd04995affd315d1910918f4ce2e865a96da6f666e984911e7a6d Sha1 hash: 2c58f0aaacb01f5977b45250bb2d7f3bb28984d1
Resolution
You must add PSMP environment to the exclusion list as follows:
mdatp exclusion file add --path /opt/CARKpsmpadb/bin/psmpadbserver
mdatp exclusion file add --path /opt/CARKpsmp/bin/psmpserver
mdatp exclusion folder add --path /opt/CARKpsmpadb/
mdatp exclusion folder add --path /opt/CARKpsmp/
mdatp exclusion folder add --path /var/opt/CARKpsmp/
mdatp exclusion folder add --path /var/opt/CARKpsmpadb/
mdatp exclusion process add --path '/opt/CARKpsmp/bin/psmpserver -mode SERVICE'
mdatp exclusion process add --path '/opt/CARKpsmpadb/bin/psmpadbserver -mode SERVICE'
mdatp exclusion process add --path /opt/CARKpsmp/bin/psmpserver
mdatp exclusion process add --path /opt/CARKpsmp/bin/psmpadbserver
mdatp exclusion file add --path /var/lock/subsys/psmpsrv
mdatp exclusion process add --path /var/lock/subsys/psmpsrv
mdatp exclusion folder add --path /etc/opt/CARKpsmp
mdatp exclusion folder add --path /etc/opt/CARKpsmpadb/
mdatp threat policy set --action audit --type behavior
mdatp threat allowed add --name Behavior:Linux/ExecutionFromSuspLocation.B