-
Notifications
You must be signed in to change notification settings - Fork 71
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
[ BUG ] Invoke-FalconDeploy
error due to execution policy restriction
#432
Comments
At psfalcon/public/psf-real-time-response.ps1 Line 448 in c87f096
we can address this by changing from
to
|
Thanks for the report and the suggestion! I'm weary of making that automatic because of how often the execution policy is bypassed in a malicious scenario. Would it work for you if it was optional and added to the |
Invoke-FalconDeploy
error due to execution policy restriction
Yes, I agree that it would be a heavy-handed default. That said, it'll be a real PITA if you're sending a package to thousands of devices and have inconsistent PS execution policies. There doesn't appear to be a good way to report the failure reason via the RTR framework (the EXE launches "successfully"). I guess this is what documentation is for. |
Yes, I had to make a choice when running an executable to mimic how I think I can find a way so you can do something like this to add the
|
That would work for me. I'm veering off topic a bit, but your comment about |
Yes, that's generally correct, but that 600 seconds also includes the amount of time it takes for each device to start the process and notify the cloud that it's started. Usually this only presents a problem during the |
I've added a Import-Module -Name PSFalcon
$ModulePath = (Show-FalconModule).ModulePath
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/CrowdStrike/psfalcon/1f00cf143585b775f9dd078d5ef7653ad3980f5d/public/psf-real-time-response.ps1 -UseBasicParsing).Content > (Join-Path (Join-Path $ModulePath public) psf-real-time-response.ps1) Please ensure that you close and re-open PowerShell before testing. I'll leave this issue open for other users to apply this change until the next PSFalcon release. |
Describe the bug
When using Invoke-FalconDeploy Archive+Run argument set on a Windows sensor, a Powershell script is launched in a new Powershell.exe process but that process does not get the
-ExecutionPolicy Bypass
flag, so local script policies can halt execution.stderr.log
in the FalconDeploy folder has this:To Reproduce
Run a command like this:
Invoke-FalconDeploy -Archive C:\case001\collect.zip -Run run-collector.ps1
on a Windows host where script execution policy (Get-ExecutionPolicy) is Restricted
Expected behavior
Invoke-FalconDeploy should add
-ExecutionPolicy Bypass
to the constructed powershell.exe command line so that execution is reliable on all endpoints.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: