Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T1569.002: fix psexec prereq install #1043

Merged
merged 2 commits into from
Jun 25, 2020
Merged

Conversation

cnotin
Copy link
Contributor

@cnotin cnotin commented Jun 15, 2020

Remove unnecessary folder creation

Details:
We want psexec to be at (default value of psexec_exe):
C:\PSTools\PsExec.exe

But currently we find it under (yes there's a folder which name is "PsExec.exe"):
C:\PSTools\PsExec.exe\PsExec.exe

Testing:
Done manually

Associated Issues:
Same bug in T1028 but considering #1042 I didn't suggest to fix it there

@cnotin cnotin changed the title T1035: fix psexec prereq install T1569.002: fix psexec prereq install Jun 19, 2020
Copy link
Collaborator

@clr2of8 clr2of8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of removing this line:
New-Item -ItemType Directory ("#{psexec_exe}") -Force | Out-Null

Could you change it to:
New-Item -ItemType Directory (Split-Path "#{psexec_exe}") -Force | Out-Null

This will create the c:\PSTools directory if it doesn't exist and avoid an error.

Create folder for psexec_exe
@cnotin
Copy link
Contributor Author

cnotin commented Jun 20, 2020

Done!
Good idea indeed I understand what was the original intent of this line ;)

@clr2of8 clr2of8 merged commit 75bf6ed into redcanaryco:master Jun 25, 2020
@cnotin cnotin deleted the patch-6 branch June 25, 2020 21:50
cnotin added a commit to cnotin/atomic-red-team that referenced this pull request Jun 26, 2020
Create folder for psexec_exe

Co-authored-by: Carrie Roberts <[email protected]>
cnotin added a commit to cnotin/atomic-red-team that referenced this pull request Jun 26, 2020
Create folder for psexec_exe

Co-authored-by: Carrie Roberts <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants