redcanaryco / invoke-atomicredteam

Invoke-AtomicRedTeam is a PowerShell module to execute tests as defined in the [atomics folder](https://github.com/redcanaryco/atomic-red-team/tree/master/atomics) of Red Canary's Atomic Red Team project.
MIT License
818 stars 194 forks source link

Use of relative paths for atomics folder #17

Closed 2XXE-SRA closed 4 years ago

2XXE-SRA commented 4 years ago

I was attempting to use this execution framework to test some automation and kept running into an issue where the system was saying the path was not found for an included bat file. It turns out that the -PathToAtomicsFolder argument does not support relative paths. Once I switched to absolute paths, it worked.

As a test, I added the following line to Public/Invoke-AtomicTest.ps1 at the start of the processs block:

$PathToAtomicsFolder = (Resolve-Path $PathToAtomicsFolder).Path

and I was able to use relative paths for the atomics folder.

Do you foresee any issues with this approach?

clr2of8 commented 4 years ago

This seems reasonable. Would you like to submit a Pull Request with this change? If not, I can get a PR going but wanted to give you the opportunity if you wanted to.

2XXE-SRA commented 4 years ago

opened

clr2of8 commented 4 years ago

Merged, thank you!

2XXE-SRA commented 4 years ago

Thanks for the quick turnaround!