Sigma rule: Potential AMSI Bypass Script Using NULL Bits

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-88b3e0f65daa, updated 2023-05-09T00:00:00.000Z.

Rule

Title
Potential AMSI Bypass Script Using NULL Bits
Status
test
Level
medium
Author
Nasreddine Bencherchali (Nextron Systems)
Date
2023-01-04
Modified
2023-05-09
File
rules/windows/powershell/powershell_script/posh_ps_amsi_null_bits_bypass.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects usage of special strings/null bits in order to potentially bypass AMSI functionalities

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection:
    ScriptBlockText|contains:
        - "if(0){{{0}}}' -f $(0 -as [char]) +"
        - "#<NULL>"
condition: selection

False positives (as the rule lists them)

  • Unknown

Tags

  • attack.defense-impairment
  • attack.t1685

MITRE ATT&CK ids this rule names

Related rules

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_script/posh_ps_amsi_null_bits_bypass.yml

Sources and licences

  • SigmaHQ

    "Potential AMSI Bypass Script Using NULL Bits" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_amsi_null_bits_bypass.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: Potential AMSI Bypass Script Using NULL Bits",
entity page, dataset version ref-88b3e0f65daa, updated 2023-05-09T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/fa2559c8-1197-471d-9cdd-05a0273d4522 (accessed 2026-11-03).
Underlying source: SigmaHQ rule fa2559c8-1197-471d-9cdd-05a0273d4522, 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.