Sigma rule: Bad Opsec Powershell Code Artifacts

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-ed0f0f9216dc, updated 2022-12-25T00:00:00.000Z.

Rule

Title
Bad Opsec Powershell Code Artifacts
Status
test
Level
critical
Author
ok @securonix invrep_de, oscd.community
Date
2020-10-09
Modified
2022-12-25
File
rules/windows/powershell/powershell_module/posh_pm_bad_opsec_artifacts.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

focuses on trivial artifacts observed in variants of prevalent offensive ps1 payloads, including
Cobalt Strike Beacon, PoshC2, Powerview, Letmein, Empire, Powersploit, and other attack payloads
that often undergo minimal changes by attackers due to bad opsec.

Log source

product
windows
category
ps_module
definition
0ad03ef1-f21b-4a79-8ce8-e6900c54b65b

Detection

selection_4103:
    Payload|contains:
        - '$DoIt'
        - 'harmj0y'
        - 'mattifestation'
        - '_RastaMouse'
        - 'tifkin_'
        - '0xdeadbeef'
condition: selection_4103

False positives (as the rule lists them)

  • Moderate-to-low; Despite the shorter length/lower entropy for some of these, because of high specificity, fp appears to be fairly limited in many environments.

Tags

  • attack.execution
  • attack.t1059.001

MITRE ATT&CK ids this rule names

Related rules

  • 73e733cc-1ace-3212-a107-ff2523cc9fc3 (derived)

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_module/posh_pm_bad_opsec_artifacts.yml

Sources and licences

  • SigmaHQ

    "Bad Opsec Powershell Code Artifacts" by ok @securonix invrep_de, oscd.community (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_module/posh_pm_bad_opsec_artifacts.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Bad Opsec Powershell Code Artifacts",
entity page, dataset version ref-ed0f0f9216dc, updated 2022-12-25T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/8d31a8ce-46b5-4dd6-bdc3-680931f1db86 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 8d31a8ce-46b5-4dd6-bdc3-680931f1db86, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.