Files
atomic-red-team/execution-frameworks/Invoke-AtomicRedTeam/README.md
T

117 lines
2.2 KiB
Markdown
Raw Normal View History

# Invoke-AtomicRedTeam
2018-09-02 08:32:17 -06:00
2019-02-06 11:52:40 -07:00
## Setup
2019-02-06 11:52:40 -07:00
### Install Atomic Red Team
2018-09-04 09:52:15 -06:00
2019-03-26 14:13:05 -06:00
Get started with our simple Install script:
2019-02-14 14:13:13 -07:00
2019-03-26 14:13:05 -06:00
`powershell.exe "IEX (New-Object Net.WebClient).DownloadString('http://psInstall.AtomicRedTeam.com')"`
2019-02-14 14:13:13 -07:00
2019-05-10 13:38:02 -06:00
[Source](install-atomicredteam.ps1)
2019-02-14 14:13:13 -07:00
2019-03-26 14:13:05 -06:00
By default, it will download and Install Atomic Red Team to `c:\AtomicRedTeam`
2019-02-14 14:13:13 -07:00
2019-05-10 13:38:02 -06:00
Running the [Install script](install-atomicredteam.ps1) locally provides three parameters:
2019-02-14 14:13:13 -07:00
InstallPath
2019-03-26 14:13:05 -06:00
- Where ART is to be Installed
2019-02-14 14:13:13 -07:00
2019-03-26 14:13:05 -06:00
`Install-AtomicRedTeam.ps1 -InstallPath c:\tools\`
2019-02-14 14:13:13 -07:00
DownloadPath
- Where ART is to be downloaded
2019-03-26 14:13:05 -06:00
`Install-AtomicRedTeam.ps1 -DownloadPath c:\tools\`
2019-02-14 14:13:13 -07:00
Verbose
2019-03-26 14:13:05 -06:00
- Verbose output during Installation
2019-02-14 14:13:13 -07:00
2019-03-26 14:13:05 -06:00
`Install-AtomicRedTeam.ps1 -verbose`
2018-09-02 08:32:17 -06:00
2019-02-06 11:52:40 -07:00
### Manual
2019-02-06 11:52:40 -07:00
`set-executionpolicy Unrestricted`
[PowerShell-Yaml](https://github.com/cloudbase/powershell-yaml) is required to parse Atomic yaml files:
2019-02-06 11:52:40 -07:00
`Install-Module -Name powershell-yaml`
`Import-Module .\Invoke-AtomicRedTeam.psm1`
## Getting Started
2019-02-14 14:13:13 -07:00
### Generate Tests
This process generates all Atomic tests and allows for easy copy and paste execution.
Note: you may need to change the path.
Invoke-AllAtomicTests -GenerateOnly
#### Execute All Tests
Execute all Atomic tests:
Invoke-AllAtomicTests
#### Execute All Tests - Specific Directory
Specify a path to atomics folder, example C:\AtomicRedTeam\atomics
Invoke-AllAtomicTests -path C:\AtomicRedTeam\atomics
#### Execute a Single Test
```powershell
$T1117 = Get-AtomicTechnique -Path ..\..\atomics\T1117\T1117.yaml
Invoke-AtomicTest $T1117
```
## Additional Examples
If you would like output when running tests using the following:
#### Informational Stream
```powershell
Invoke-AtomicTest $T1117 -InformationAction Continue
```
#### Verbose Stream
```powershell
Invoke-AtomicTest $T1117 -Verbose
```
#### Debug Stream
```powershell
Invoke-AtomicTest $T1117 -Debug
```
#### WhatIf
If you would like to see what would happen without running the test
```powershell
Invoke-AtomicTest $T1117 -WhatIf
```
#### Confirm
2018-09-02 08:32:17 -06:00
To run all tests without confirming them run using the Confirm switch to false
2018-09-04 09:36:36 -06:00
```powershell
Invoke-AtomicTest $T1117 -Confirm:$false
```
2018-09-02 08:32:17 -06:00
Or you can set your `$ConfirmPreference` to 'Medium'
2018-09-04 09:28:28 -06:00
```powershell
$ConfirmPreference = 'Medium'
Invoke-AtomicTest $T1117
```