fix: reduce Windows Defender false positive on fileless malware skill

Add AV false-positive guidance for issue #100, move inline YARA rule to
references/yara-fileless-powershell.yar, and replace literal encoded
PowerShell payload with a placeholder in the sample report.
This commit is contained in:
Kevin Glynn
2026-07-16 17:08:46 -04:00
parent 673da1f3b0
commit d4e38c2867
3 changed files with 26 additions and 14 deletions
@@ -49,6 +49,12 @@ mitre_attack:
**Do not use** for traditional file-based malware; standard static and dynamic analysis methods are more appropriate for disk-resident malware.
## Windows Defender / Antivirus False Positive
Some endpoint antivirus products — notably **Windows Defender** (signature `Trojan:script/Wacatac.H!ml`) — may quarantine this skill's `SKILL.md` as malicious. This is a **known false positive**: the file intentionally documents fileless attack patterns (LOLBins, encoded PowerShell, memory YARA indicators) for defensive detection and investigation. The content is educational only; it does not execute code.
**If quarantined:** restore the file from quarantine, add an exclusion for your local agent skills directory, and see [GitHub issue #100](https://github.com/mukul975/Anthropic-Cybersecurity-Skills/issues/100) for discussion. YARA strings live in `references/yara-fileless-powershell.yar` (not inline in this file) to reduce scanner triggers while preserving the rule for analysts.
## Prerequisites
- Sysmon installed and configured with comprehensive logging (process creation, WMI events, registry changes)
@@ -239,22 +245,13 @@ vol3 -f memory.dmp windows.vadinfo --pid 4012 | grep -i "PAGE_EXECUTE"
# PowerShell CLR usage (indicates .NET reflection loading)
vol3 -f memory.dmp windows.cmdline | grep -i "powershell"
# Scan for known fileless frameworks
vol3 -f memory.dmp yarascan.YaraScan --yara-rules "
rule Fileless_PowerShell {
strings:
\$s1 = \"System.Reflection.Assembly\" ascii wide
\$s2 = \"[System.Convert]::FromBase64String\" ascii wide
\$s3 = \"Invoke-Expression\" ascii wide
\$s4 = \"DownloadString\" ascii wide
condition:
2 of them
}
"
# Scan for known fileless frameworks (rule file avoids AV false positives on SKILL.md)
vol3 -f memory.dmp yarascan.YaraScan --yara-file references/yara-fileless-powershell.yar
# Extract PowerShell command history from memory
vol3 -f memory.dmp windows.cmdline
strings memory.dmp | grep -i "invoke-\|iex \|downloadstring\|-encodedcommand"
# Search memory strings for common fileless indicators (encoded commands, cradles, reflection)
strings memory.dmp | grep -iE 'encodedcommand|downloadstring|invoke-expression|\.reflection\.'
```
### Step 5: Build Comprehensive Detection Rules
@@ -400,7 +397,7 @@ Filter Name: WindowsUpdateCheck
Filter Query: SELECT * FROM __InstanceModificationEvent WITHIN 300
WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'
Consumer: CommandLineEventConsumer
Command: powershell.exe -nop -w hidden -enc JABjAGwAaQBlAG4AdAA...
Command: powershell.exe -nop -w hidden -enc <BASE64_UTF16LE_PAYLOAD>
DECODED PAYLOAD
[Layer 1] Base64 UTF-16LE decode
@@ -61,6 +61,8 @@ vol3 -f memory.dmp windows.malfind --dump --pid 1234
## Suspicious PowerShell Indicators
Detection patterns to search for in Script Block Logging (Event ID 4104) and memory strings. See `yara-fileless-powershell.yar` in this directory for a Volatility YARA rule covering the same indicators.
```
-enc / -EncodedCommand → Base64-encoded command
IEX / Invoke-Expression → Dynamic code execution
@@ -0,0 +1,13 @@
// YARA rule for Volatility yarascan — fileless PowerShell indicators in memory.
// Stored separately from SKILL.md to reduce antivirus false positives on the skill file.
// See GitHub issue #100.
rule Fileless_PowerShell {
strings:
$s1 = "System.Reflection.Assembly" ascii wide
$s2 = "[System.Convert]::FromBase64String" ascii wide
$s3 = "Invoke-Expression" ascii wide
$s4 = "DownloadString" ascii wide
condition:
2 of them
}