security
Administer keychains, keys, certificates, and the Security framework. tldr-pages
On macOS 1 Sigma rule name it
macOS
List all available keychains
security list-keychainsIdentifyDelete a specific keychain
security delete-keychain path/to/file.keychainIdentifyCreate a keychain
security create-keychain -p password path/to/file.keychainIdentifySet a certificate to use with a website or service by its common name (fails if several certificates with the same common name exist)
security set-identity-preference -s url -c "common_name" path/to/file.keychainIdentifyAdd a certificate from file to a keychain (if -k isn't specified, the default keychain is used)
security add-certificates -k file.keychain path/to/cert_file.pemIdentifyAdd a CA certificate to the per-user Trust Settings
security add-trusted-cert -k path/to/user-keychain.keychain-db path/to/ca-cert_file.pemIdentifyRemove a CA certificate from the per-user Trust Settings
security remove-trusted-cert path/to/ca-cert_file.pemIdentifyWhat detects it
mediumCredentials from Password Stores - KeychainTim Ismilyaev, oscd.community, Florian Roth (Nextron Systems)