// detection validation

Safe, repeatable proof for every detection

Each lab ships with a controlled validation command. None of them execute real malware. They are deliberately benign — designed to trigger the underlying telemetry and rule logic without harming the system.

Defensive scope only

This project does not execute, distribute, or document offensive payloads. Every validation command is structured to log the indicator that the rule looks for — nothing more. Run validations only on isolated lab endpoints you own.

Phase 1 · T1059.001

Detecting PowerShell EncodedCommand Abuse

Easy

Safe in-lab proof — prints 'detection-test' from a base64 payload.

powershell.exe -nop -w hidden -EncodedCommand VwByAGkAdABlAC0ASABvAHMAdAAgACIAZABlAHQAZQBjAHQAaQBvAG4ALQB0AGUAcwB0ACIA
Phase 1 · T1059.001

Detecting Invoke-Expression (IEX) Misuse

Easy

Safe equivalent — IEX evaluating an inert literal.

powershell.exe -c "IEX 'Write-Host detection-test'"
Phase 1 · T1059.001

Detecting DownloadString / Invoke-WebRequest Staging

Easy

Safe local-only fetch.

powershell.exe -c "(New-Object Net.WebClient).DownloadString('http://127.0.0.1/healthz')"
Phase 1 · T1059.001

Detecting Hidden-Window PowerShell

Easy

Spawn a hidden PowerShell that exits immediately.

powershell.exe -nop -w hidden -c "exit"
Phase 1 · T1059.001

Detecting -ExecutionPolicy Bypass

Easy

Run a harmless script with bypass.

powershell.exe -ExecutionPolicy Bypass -Command "Write-Host detection-test"
Phase 1 · T1059.001

Detecting Office Applications Spawning PowerShell

Easy

Manually invoke powershell from Excel for a controlled test.

Excel → Developer → VBA: Shell "powershell.exe -c Write-Host detection-test"
Phase 2 · T1059.001

PowerShell + Outbound Network Correlation

Moderate

Localhost fetch — safe.

powershell.exe -c "Invoke-WebRequest http://127.0.0.1 -UseBasicParsing"
Phase 2 · T1059.001

PowerShell + Persistence Indicator Correlation

Moderate

Create an inert Run key from PowerShell.

powershell.exe -c "New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Run -Name DetectionTest -Value 'notepad.exe' -PropertyType String -Force"
Phase 2 · T1059.001

Suspicious Parent/Child Process Relationships

Moderate

Use psexec or runas to fake an unusual parent in a lab VM only.

PsExec.exe -accepteula -i -s powershell.exe -c "Write-Host detection-test"
Phase 2 · T1059.001

Office → Script Interpreter Execution Chains

Moderate

Simulate a multi-hop chain in a VM lab only.

VBA: Shell "mshta.exe vbscript:CreateObject(""WScript.Shell"").Run(""powershell.exe Write-Host detection-test"")"
Phase 3 · T1562.001

Detecting AMSI Bypass Attempts

Advanced

Log an inert string matching a known bypass token (no patching).

powershell.exe -c "Write-Host 'detection-test: amsiInitFailed reference'"
Phase 3 · T1620

Detecting .NET Reflection Loading in PowerShell

Advanced

Reference the API in a comment for a safe match.

powershell.exe -c "Write-Host 'detection-test: [Reflection.Assembly]::Load reference'"
Phase 3 · T1059.001

Memory-Only PowerShell Execution

Advanced

Log an inert reference string.

powershell.exe -c "Write-Host 'detection-test: VirtualAlloc CreateThread reference'"
Phase 3 · T1027

Obfuscation Scoring of PowerShell Script Blocks

Advanced

Run a benign script with deliberate noise characters.

powershell.exe -c "& { $a='det'+'ect'+'ion-test'; Write-Host $a }"
Phase 3 · T1027

Entropy Analysis on Decoded PowerShell Payloads

Advanced

Encode a benign string; entropy will be low — verifying the pipeline runs.

powershell.exe -EncodedCommand VwByAGkAdABlAC0ASABvAHMAdAAgACIAZABlAHQAZQBjAHQAaQBvAG4ALQB0AGUAcwB0ACIA
Phase 3 · TA0002+TA0005+TA0003

End-to-End ATT&CK Chain Correlation

Advanced

Run the Phase 1 + 2 lab validators sequentially.

Run encodedcommand-abuse → office-spawns-powershell → powershell-persistence validators.