Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

Private key export from a Linux certificate or key store

Siemphony@siemphonylowT1649unverified
Matches the command-execution half of AN0672 — a process invoking OpenSSL, the NSS tools or keytool in a mode that moves private key material out of a key store: PKCS#12 and PKCS#8 handling by openssl, pk12util or certutil pointed at an NSS database under ~/.pki, and keytool's -importkeystore / -exportcert. Each selection pairs the binary with the subcommand rather than alerting on the binary alone, because openssl and certutil are ordinary administrative tools whose other subcommands say nothing about key theft. The other half of AN0672 — auditd open/read on /etc/ssl/, /etc/pki/ and ~/.pki/nssdb — is deliberately not folded in here: it lives on the raw linux:auditd log source with a filesystem watch and its own field vocabulary (type, name, exe, key), which this process_creation rule cannot express, so it needs a separate rule and a loaded `-w` watch. Windows (AN0671, Security 4768 and 4657) and macOS (AN0673, Keychain) are not covered by this rule. auditd records no execve without an audit rule such as `-a always,exit -F arch=b64 -S execve`; until one is loaded this rule returns zero rows because nothing is being collected, not because nothing happened. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0240, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full description

The detection

The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.

detection.yml

Sentinel · KQL

Run this as a search.

DeviceProcessEvents| where ((FolderPath endswith "/openssl" and (ProcessCommandLine contains "pkcs12" or ProcessCommandLine contains "pkcs8")) or ((FolderPath endswith "/pk12util" or FolderPath endswith "/certutil") and (ProcessCommandLine contains "/nssdb" or ProcessCommandLine contains "/.pki")) or (FolderPath endswith "/keytool" and (ProcessCommandLine contains "-importkeystore" or ProcessCommandLine contains "-exportcert")))

Splunk · SPL

Run this as a search.

index=* ((Image="*/openssl" AND (CommandLine="*pkcs12*" OR CommandLine="*pkcs8*")) OR ((Image="*/pk12util" OR Image="*/certutil") AND (CommandLine="*/nssdb*" OR CommandLine="*/.pki*")) OR (Image="*/keytool" AND (CommandLine="*-importkeystore*" OR CommandLine="*-exportcert*")))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*/openssl" AND (TO_LOWER(process.command_line) LIKE "*pkcs12*" OR TO_LOWER(process.command_line) LIKE "*pkcs8*")) OR ((TO_LOWER(process.executable) LIKE "*/pk12util" OR TO_LOWER(process.executable) LIKE "*/certutil") AND (TO_LOWER(process.command_line) LIKE "*/nssdb*" OR TO_LOWER(process.command_line) LIKE "*/.pki*")) OR (TO_LOWER(process.executable) LIKE "*/keytool" AND (TO_LOWER(process.command_line) LIKE "*-importkeystore*" OR TO_LOWER(process.command_line) LIKE "*-exportcert*")))

Wazuh · XML rule

Deploy to your manager — this is a rule, not a search.

<group name="sigma,linux,process_creation,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <!-- 3 rules: the Sigma condition ORs across different fields,       which one rule cannot express. Any one matching is a hit. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)/openssl$</field>    <field name="CommandLine" type="pcre2">(?i)(pkcs12|pkcs8)</field>    <description>Private key export from a Linux certificate or key store (1/3)</description>    <mitre>      <id>T1649</id>    </mitre>  </rule>   <rule id="100001" level="5">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)(/pk12util$|/certutil$)</field>    <field name="CommandLine" type="pcre2">(?i)(/nssdb|/\.pki)</field>    <description>Private key export from a Linux certificate or key store (2/3)</description>    <mitre>      <id>T1649</id>    </mitre>  </rule>   <rule id="100002" level="5">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)/keytool$</field>    <field name="CommandLine" type="pcre2">(?i)(-importkeystore|-exportcert)</field>    <description>Private key export from a Linux certificate or key store (3/3)</description>    <mitre>      <id>T1649</id>    </mitre>  </rule></group>

Verdicts · reactions · comments

Community

Verdicts from engineers who actually deployed it, and the conversation around it.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.

Log in to report a verdict.

Log in to join the discussion.

No comments yet. Someone who deploys this will have something to say about it.