Skip to content

Siemphony is in beta and still being built. What ships today, and what does not.

Siemphony’s repertoire

Custom byte-level encoding routine run inline against file data

Siemphony@siemphonymediumT1560.003unverified
Matches a shell one-liner that combines a bitwise byte operation with reading or writing file contents — the hand-rolled XOR or stream-cipher routine AN1213 describes as producing archive-like output with no standard archiving utility involved. Archiving utilities and their verbs are absent from the logic because that is T1560.001, and so are the .NET compression and cryptography stream classes, because library-backed archiving is T1560.002; what is left is the raw arithmetic that makes a method custom, which is what this sub-technique is about. The brief maps Security EventID 4688 onto the Sysmon-shaped `process_creation` category, and this rule is written in the Sysmon EventID 1 vocabulary (`Image`, `CommandLine`): the 4688 feed carries the same data under `NewProcessName` and needs a field mapping first, as well as both Audit Process Creation and the separate Include command line in process creation events policy, neither of which is enabled by default or by the CIS baseline. Only inline routines are visible here — a `-EncodedCommand` blob or a routine living in a .ps1 file puts none of these strings on the command line — and the interpreter list is confined to PowerShell because the operators matched are PowerShell syntax, so listing wscript or cscript would add selectors that can never fire. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0438, 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 "\\powershell.exe" or FolderPath endswith "\\pwsh.exe") and (ProcessCommandLine contains "-bxor" or ProcessCommandLine contains "-bnot" or ProcessCommandLine contains "-band" or ProcessCommandLine contains "-shl" or ProcessCommandLine contains "-shr")) and (ProcessCommandLine contains "ReadAllBytes" or ProcessCommandLine contains "WriteAllBytes" or ProcessCommandLine contains "FileStream" or ProcessCommandLine contains "OpenRead" or ProcessCommandLine contains "OpenWrite" or ProcessCommandLine contains "Get-Content" or ProcessCommandLine contains "Set-Content" or ProcessCommandLine contains "-AsByteStream" or ProcessCommandLine contains "-Encoding Byte"))

Splunk · SPL

Run this as a search.

index=* (((Image="*\\powershell.exe" OR Image="*\\pwsh.exe") AND (CommandLine="*-bxor*" OR CommandLine="*-bnot*" OR CommandLine="*-band*" OR CommandLine="*-shl*" OR CommandLine="*-shr*")) AND (CommandLine="*ReadAllBytes*" OR CommandLine="*WriteAllBytes*" OR CommandLine="*FileStream*" OR CommandLine="*OpenRead*" OR CommandLine="*OpenWrite*" OR CommandLine="*Get-Content*" OR CommandLine="*Set-Content*" OR CommandLine="*-AsByteStream*" OR CommandLine="*-Encoding Byte*"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE (((TO_LOWER(process.executable) LIKE "*\\\\powershell.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pwsh.exe") AND (TO_LOWER(process.command_line) LIKE "*-bxor*" OR TO_LOWER(process.command_line) LIKE "*-bnot*" OR TO_LOWER(process.command_line) LIKE "*-band*" OR TO_LOWER(process.command_line) LIKE "*-shl*" OR TO_LOWER(process.command_line) LIKE "*-shr*")) AND (TO_LOWER(process.command_line) LIKE "*readallbytes*" OR TO_LOWER(process.command_line) LIKE "*writeallbytes*" OR TO_LOWER(process.command_line) LIKE "*filestream*" OR TO_LOWER(process.command_line) LIKE "*openread*" OR TO_LOWER(process.command_line) LIKE "*openwrite*" OR TO_LOWER(process.command_line) LIKE "*get-content*" OR TO_LOWER(process.command_line) LIKE "*set-content*" OR TO_LOWER(process.command_line) LIKE "*-asbytestream*" OR TO_LOWER(process.command_line) LIKE "*-encoding byte*"))

Wazuh · XML rule

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

<group name="sigma,windows,process_creation,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <rule id="100000" level="7">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)(\\powershell\.exe$|\\pwsh\.exe$)</field>    <field name="CommandLine" type="pcre2">(?i)(-bxor|-bnot|-band|-shl|-shr)</field>    <field name="CommandLine" type="pcre2">(?i)(ReadAllBytes|WriteAllBytes|FileStream|OpenRead|OpenWrite|Get-Content|Set-Content|-AsByteStream|-Encoding Byte)</field>    <description>Custom byte-level encoding routine run inline against file data</description>    <mitre>      <id>T1560.003</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.