-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/frack113/sigma_redcanaryco
- Loading branch information
Showing
7 changed files
with
96 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"justMyCode": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
write-host " _________________________ " -ForegroundColor red | ||
write-host "(( ))" -ForegroundColor red | ||
write-host " )) Frack113 tests script (( " -ForegroundColor red | ||
write-host "(( ))" -ForegroundColor red | ||
write-host " ------------------------- " -ForegroundColor red | ||
write-host " for the best of my knowledge " | ||
|
||
write-host "Import module" | ||
Import-Module .\Export-WinEvents | ||
Import-Module C:\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psm1 | ||
|
||
write-host " Open csv" | ||
$csv = Import-Csv -Path .\Full_tests.csv -Delimiter ';' | ||
|
||
$list_channel = ('Application','Security','System','Microsoft-Windows-Sysmon/Operational','Microsoft-Windows-PowerShell/Operational') | ||
|
||
foreach ($info in $csv) | ||
{ | ||
$technique = $info.technique | ||
$nmr = $info.nmr_test | ||
$valid = $info.sigma | ||
$name = $info.name | ||
if ($info.os -like '*windows*'){ | ||
if ($info.executor -ne 'manual'){ | ||
if ($valid -eq 'False') { | ||
write-host "Test $name - $technique test : $nmr" | ||
write-host "Disable Realtime Monitoring" | ||
Set-MpPreference -DisableRealtimeMonitoring 1 | ||
write-host "Make environnement" | ||
Invoke-AtomicTest $technique -TestNumbers $nmr -Cleanup -NoExecutionLog | ||
Invoke-AtomicTest $technique -TestNumbers $nmr -GetPrereqs -TimeoutSeconds 120 -NoExecutionLog | ||
$list_channel | Clear-WinEvents -Verbose | ||
Start-Sleep -s 10 | ||
|
||
write-host "Start Aurora" | ||
Start-Process C:\aurora\aurora-agent-64.exe -WorkingDirectory C:\aurora -ArgumentList "-c agent-config-standard.yml","--minimum-level low","--json","-l c:\Tests\$($technique)_test_$($nmr)_aurora.json" | ||
Start-Sleep -s 30 | ||
|
||
write-host "Start test" | ||
Invoke-AtomicTest $technique -TestNumbers $nmr -TimeoutSeconds 120 -NoExecutionLog | ||
Start-Sleep -s 10 | ||
|
||
write-host "Stop Aurora" | ||
Stop-Process -name aurora-agent-64 | ||
|
||
Start-Sleep -s 10 | ||
foreach ($channel in $list_channel){ | ||
$name = $channel.replace("/","_") | ||
Export-WinEvents -TimeBucket 'Last 5 Minutes' -OutputPath "c:\Tests\$($technique)_test_$($nmr)_channel_$name.json" -Channel $channel | ||
} | ||
|
||
write-host "Cleanup" | ||
Invoke-AtomicTest $technique -TestNumbers $nmr -Cleanup -NoExecutionLog | ||
Start-Sleep -s 10 | ||
|
||
} Else { write-host "$name / $technique test: $nmr / OK" -ForegroundColor green } | ||
} Else { write-host "$name / $technique test: $nmr / manual test :)" -ForegroundColor DarkRed } | ||
} Else { write-host "$name / $technique test: $nmr / not windows :)" -ForegroundColor DarkRed } | ||
} | ||
write-host "Good Hunt..." -ForegroundColor green |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters