Create Invoke-AtomicEnterpriseLayer.ps1
parent
223c9376a5
commit
c56e13184c
|
@ -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"
|
||||||
|
}
|
Loading…
Reference in New Issue