diff --git a/atomics/T1496/T1496.yaml b/atomics/T1496/T1496.yaml index 63f6a619..f7683dea 100644 --- a/atomics/T1496/T1496.yaml +++ b/atomics/T1496/T1496.yaml @@ -14,3 +14,24 @@ atomic_tests: yes > /dev/null name: sh +- name: Windows - Simulate CPU Load with PowerShell + description: | + This test simulates high CPU load using PowerShell, commonly seen in resource hijacking. + Spawns background jobs to stress CPU cores for a specified duration. + supported_platforms: + - windows + input_arguments: + duration_seconds: + description: Duration in seconds to run the CPU stress test + type: integer + default: 30 + cpu_threads: + description: Number of threads to stress (default 4) + type: integer + default: 4 + executor: + command: | + $end = (Get-Date).AddSeconds(#{duration_seconds}) + 1..#{cpu_threads} | ForEach-Object { Start-Job { param($t) while((Get-Date) -lt $t) { $i=0; while($i -lt 200000){$i++} } } -ArgumentList $end } + Get-Job | Wait-Job | Remove-Job + name: powershell