Install Root Certificate With this Free Splunk Rule
Adversaries may install a root certificate on a compromised system to avoid warnings when connecting to adversary-controlled web servers. Root certificates are used in public-key cryptography to identify a root certificate authority (CA). When a root certificate is installed, the system or application will trust certificates in the root’s chain of trust that have been signed by the root certificate. Certificates are commonly used for establishing secure TLS/SSL communications within a web browser. When a user attempts to browse a website that presents a certificate that is not trusted an error message will be displayed to warn the user of the security risk. Depending on the security settings, the browser may not allow the user to establish a connection to the website.
Installation of a root certificate on a compromised system would give an adversary a way to degrade the security of that system. Adversaries have used this technique to avoid security warnings prompting users when compromised systems connect over HTTPS to adversary-controlled web servers that spoof legitimate websites in order to collect login credentials. ]
Atypical root certificates have also been pre-installed on systems by the manufacturer or in the software supply chain and were used in conjunction with malware/adware to provide a man-in-the-middle capability for intercepting information transmitted over secure TLS/SSL communications.
Root certificates (and their associated chains) can also be cloned and reinstalled. Cloned certificate chains will carry many of the same metadata characteristics of the source and can be used to sign malicious code that may then bypass signature validation tools (ex: Sysinternals, antivirus, etc.) used to block execution and/or uncover artifacts of Persistence.
Tactic: Defense Evasion
Platform: Linux, Windows, macOS
Data Sources: Digital certificate logs, SSL/TLS inspection
Defense Bypassed: Digital Certificate Validation
Mitigation of Indicator Removal on Host
Operating System Configuration: Windows Group Policy can be used to manage root certificates and the
Flags value of
HKLM\SOFTWARE\Policies\Microsoft\SystemCertificates\Root\ProtectedRoots can be set to 1 to prevent non-administrator users from making further root installations into their own HKCU certificate store.
Software Configuration: HTTP Public Key Pinning (HPKP) is one method to mitigate potential man-in-the-middle situations where an adversary uses a mis-issued or fraudulent certificate to intercept encrypted communications by enforcing the use of an expected certificate.
A system’s root certificates are unlikely to change frequently. Monitor new certificates installed on a system that could be due to malicious activity. Check pre-installed certificates on new systems to ensure unnecessary or suspicious certificates are not present. Microsoft provides a list of trustworthy root certificates online and through authroot.stl. The Sysinternals Sigcheck utility can also be used (
sigcheck.exe -tuv) to dump the contents of the certificate store and list valid certificates not rooted to the Microsoft Certificate Trust List.
Resource of Install Root Certificate With this Free Splunk Detection Rule:
index=windows source=”WinEventLog:Microsoft-Windows-Sysmon/Operational” (EventCode=1 Image=”\\certutil.exe” CommandLine=”*addstore”) OR (EventCode IN (12,13) TargetObject IN (“HKLM\\SOFTWARE\\Microsoft\\EnterpriseCertificates\\Root\\Certificates*” , “\\Microsoft\\SystemCertificates\\Root\\Certificates”))index=windows source=”WinEventLog:Microsoft-Windows-PowerShell/Operational” (EventCode=4104 Message=”Clear-Eventlog”) //delete windows events with powershell cmdlet