-
Notifications
You must be signed in to change notification settings - Fork 59
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 ] Add-SensorTag
and Remove-SensorTag
dont append/remove tags even through reboot
#385
Comments
Add-SensorTag
and Remove-SensorTag
dont append/remove tags even through reboot
From testing, it looks the command syntax (below) that PSFalcon uses to set the sensor tags no longer works with echo "token" | & "C:\Program Files\CrowdStrike\CsSensorSettings.exe" set --grouping-tags "tag1,tag2" If you input the token manually when prompted it properly applies the tags, but it doesn't work with |
This might be the same issue that I'm having with this command. It does not seem to work for me. The system does not output an error, however, if I run "start-transcript" before I try the commands, the transcript picks up the following errors: "TerminatingError(ConvertFrom-Json): "Invalid JSON primitive: Maintenance." and "TerminatingError(ConvertFrom-Json): "Invalid JSON primitive: OIT." I'm not sure what "Maintenance" is from but I know OIT is a tag on one of the systems I was attempting to run this command on. Some clarification: I only see the above errors after an Add-FalconSensorTag with the -QueueOffline $false set. If -QueueOffline is set to $true, I don't see any errors, it just doesn't ever seem to work at least on hosts that already have a tag. I've not tried this command on hosts that don't already have at least one tag. |
Thank you! I think this may have helped me narrow down an issue with the scripts PSFalcon uses to add tags. In one of my tests, I'm working on an updated version of |
Added `Set-FalconSensorTag` to overwrite any existing tags, instead of appending. Re-wrote `Add-FalconSensorTag` and `Remove-FalconSensorTag` to properly evaluate tags for appending across all OSes. Re-wrote `Get-FalconSensorTag` to pull tags directly from devices API result for all OSes, instead of using RTR to check on Linux/Mac.
I have re-written the Import-Module -Name PSFalcon
$ModulePath = (Show-FalconModule).ModulePath
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/CrowdStrike/psfalcon/1fa521bf21c8bb75ea5a85d56e3a35d686a271d2/public/psf-sensors.ps1 -UseBasicParsing).Content > (Join-Path (Join-Path $ModulePath public) psf-sensors.ps1) Once you have replaced the file, restart PowerShell and re-import PSFalcon before testing. |
Describe the bug
I am able to "add" a sensortag when host is empty "no tags"; however, trying to append an additional tag or remove a tag, does not work. There is no error, and return results indicate that it was successful however UI does not show changes nor does the registry indicate a change occurred.
Environment (please complete the following information):
Windows
Additional context
Noticed that also RTR sessions seem to "spin" for awhile also. Doesnt appear to be associated as I did manually kill session and attempt several reboots.
The text was updated successfully, but these errors were encountered: