diff --git a/Invoke-AtomicEnterpriseLayer.ps1 b/Invoke-AtomicEnterpriseLayer.ps1 new file mode 100644 index 0000000..5106854 --- /dev/null +++ b/Invoke-AtomicEnterpriseLayer.ps1 @@ -0,0 +1,37 @@ +Import-Module C:\AtomicRedTeam\invoke-atomicredteam\Invoke-AtomicRedTeam.psm1 + +Set-ExecutionPolicy Bypass -Force + +function Invoke-AtomicEnterpriseLayer { + + Param( + [parameter(Mandatory=$true)] + [String] + $Group + ) + + $unixdate = [int][double]::Parse((Get-Date -UFormat %s)) + + Start-Transcript -NoClobber -IncludeInvocationHeader -Path "Atomic-EnterpriseLayer-$unixdate.txt" + + $web = New-Object Net.WebClient + $mitre = $web.DownloadString("https://attack.mitre.org/groups/$Group/$Group-enterprise-layer.json") + $layer = $mitre | ConvertFrom-Json + $techniques = $layer.techniques.techniqueID + + $name = $layer.name + $desc = $layer.description + + Write-Output "" + Write-Output "[+] Name : $name" + Write-Output "[+] Description : $desc" + + Start-Sleep 3 + Write-Output "[+] Running Atomic Red Team" + + foreach($id in $techniques) { + Invoke-AtomicTest $id + } + + Write-Output "[+] Done" +}