Protect Deep Security Agent
To improve security, you can bind Deep Security Agent to a specific Deep Security Manager. The instructions vary depending on if you're using manager-initiated activation or agent-initiated activation. Follow the instructions below, depending on your environment:
During agent-manager communications, Deep Security Agent can authenticate the identity of its manager. It does this by comparing your trusted manager's certificate to the connecting manager's certificate. If they don't match, manager authentication fails and the agent won't connect.
This prevents agents from activating with or connecting to a malicious server that is pretending to be your Deep Security Manager. This is recommended especially if agents connect through an untrusted network such as the Internet.
To do this, you must configure each agent with the trusted manager's server certificate so that they can recognize their authorized manager before they try to connect.
-
On Deep Security Manager, run the command to export its server certificate:
dsm_c -action exportdsmcert -output ds_agent_dsm.crt
where:
-
ds_agent_dsm.crt is the name of the manager's server certificate.
You must use this exact file name. You cannot rename it.
-
-
On each agent's computer, put the ds_agent_dsm.crt file in this folder:
- Windows: %ProgramData%\Trend Micro\ Deep Security Agent\dsa_core
- Linux: /var/opt/ds_agent/dsa_core
During agent activation, Deep Security Agent can authenticate the identity of its Deep Security Manager by pinning the manager's certificate to the agent. It does this by validating the connecting manager’s certificate path and ensuring it is signed by a trusted Certificate Authority (CA). If the certificate path is validated, the manager authentication passes and activates the agents. This prevents agents from activating with a malicious server that is pretending to be your Deep Security Manager.
To protect your agents, you must configure each agent so that they can recognize their authorized manager before they try to activate.
Import a Deep Security Manager certificate chain issued by a public CA
- Prepare a chain.pem file based on the following specifications:
- A private key in PKCS #8 format.
- The X509 certificate that corresponds to the above private key.
- Any other intermediate X509 certificates to build a chain of trust from the above to certificate to a trusted certificate authority (CA) root. Each certificate must sign the certificate that directly precedes it, so the order is important. See certificate_list in the RFC.
- On Deep Security Manager, run the following command to import the certificate chain:
/opt/dsm/dsm_c -action agentHBPublicServerCertificate -set ${path_to_pem_file}
The ${path_to_pem_file} must be an absolute path, not relative.
- Copy the public CA certificate and rename it
ds_agent_dsm_public_ca.crt
. - On the agent computer, place the
ds_agent_dsm_public_ca.crt
file in one of these locations:- Windows:
%ProgramData%\Trend Micro\Deep Security Agent\dsa_core
- Linux/Unix:
/var/opt/ds_agent/dsa_core
- Windows:
[Warning/2] | SSLVerifyCallback() - verify error 20: unable to get local issuer certificate
Pinning a trusted certificate is optional, so you can ignore this error if it doesn't apply to you. However, if you'd like to use a trusted certificate, follow the steps in the section above before activating the Deep Security Agent.
Confirm the certificate chain is imported
To confirm the certificate chain is imported, enter the following command:
/opt/dsm/dsm_c -action agentHBPublicServerCertificate -isSet
Delete the imported certificate chain
If you'd like to stop using a Deep Security Manager certificate chain issued by a public CA, enter the following command:
/opt/dsm/dsm_c -action agentHBPublicServerCertificate -delete
By default, the Deep Security Manager will revert to using a self-signed certificate.