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

2.2.6 #367

Merged
merged 276 commits into from
Nov 22, 2023
Merged

2.2.6 #367

merged 276 commits into from
Nov 22, 2023

Conversation

bk-cs
Copy link
Collaborator

@bk-cs bk-cs commented Nov 22, 2023

2.2.6

Updates for 2.2.6 release

  • Enhancement
  • Major Feature update
  • Bug fixes
  • Breaking Change
  • Documentation

Added features and functionality

Added Commands

cloud-connect-azure

  • Get-FalconDiscoverAzureTenant

configuration-assessment

  • Get-FalconConfigAssessment
  • Get-FalconConfigAssessmentLogic

falcon-complete-dashboards

  • Get-FalconCompleteAlert

filevantage

  • Add-FalconFileVantageHostGroup
  • Add-FalconFileVantageRuleGroup
  • Edit-FalconFileVantageExclusion
  • Edit-FalconFileVantagePolicy
  • Edit-FalconFileVantageRule
  • Edit-FalconFileVantageRuleGroup
  • Get-FalconFileVantageExclusion
  • Get-FalconFileVantagePolicy
  • Get-FalconFileVantageRule
  • Get-FalconFileVantageRuleGroup
  • New-FalconFileVantageExclusion
  • New-FalconFileVantagePolicy
  • New-FalconFileVantageRule
  • New-FalconFileVantageRuleGroup
  • Remove-FalconFileVantageExclusion
  • Remove-FalconFileVantageHostGroup
  • Remove-FalconFileVantagePolicy
  • Remove-FalconFileVantageRule
  • Remove-FalconFileVantageRuleGroup
  • Set-FalconFileVantagePrecedence
  • Set-FalconFileVantageRulePrecedence
  • Set-FalconFileVantageRuleGroupPrecedence

identity-protection

  • Get-FalconIdentityHost

real-time-response

  • Get-FalconLibraryScript

Removed Commands

cloud-connect-aws (deprecated)

  • Confirm-FalconDiscoverAwsAccess
  • Edit-FalconDiscoverAwsAccount
  • Get-FalconDiscoverAwsAccount
  • Get-FalconDiscoverAwsLink
  • Get-FalconDiscoverAwsSetting
  • New-FalconDiscoverAwsAccount
  • Receive-FalconDiscoverAwsScript
  • Remove-FalconDiscoverAwsAccount
  • Update-FalconDiscoverAwsSetting

cloud-connect-azure (deprecated)

  • Get-FalconDiscoverAzureAccount
  • Get-FalconDiscoverAzureCertificate
  • Get-FalconDiscoverAzureTenant
  • New-FalconDiscoverAzureAccount
  • Receive-FalconDiscoverAzureScript
  • Update-FalconDiscoverAzureAccount

cloud-connect-gcp (deprecated)

  • Get-FalconDiscoverGcpAccount
  • New-FalconDiscoverGcpAccount
  • Receive-FalconDiscoverGcpScript

discover

  • Get-FalconDiscoverNetwork
  • Get-FalconDiscoverRule
  • Get-FalconDiscoverScan
  • Get-FalconDiscoverScanner

settings-discover (deprecated)

  • Get-FalconDiscoverAwsScript

Issues resolved

Other

General Changes

  • Modified all authorization token validation checks to request a new token when the current token is due to
    expire within 4 minutes instead of 1 minute. This should help reduce the number of expired authorization
    tokens during long-running requests (like Get-FalconVulnerability).
  • Migrated Wait-RetryAfter function from private\Private.ps1 to class\Class.ps1 under ApiClient.Invoke()
    function.
  • Streamlined ApiClient.Invoke() under class\Class.ps1 in an effort to improve verbose logging and
    performance.
  • Modified private functions Invoke-Falcon and Request-FalconToken to compensate for changes to
    ApiClient.Invoke().
  • Modified Write-Result to ensure each error will be individually produced when a single API call generates
    multiple errors.
  • Rearranged how ApiClient.Invoke() downloads files to eliminate "index out of range" error.
  • Added format\format.json to contain API endpoint body/formdata/query parameters for easier updates when large
    numbers of API endpoints are modified at once.
  • Added function Get-EndpointFormat to private\Private.ps1 to read body/formdata/query parameters from
    format.json.
  • Replaced tab of four spaces with two to reduce file sizes across module.
  • Moved code that replaces the user input parameters with proper parameter names for body payloads from the
    private Invoke-Falcon function into the private Build-Content function.
  • Renamed Inputs variable (and accompanying parameter for the Invoke-Falcon function, used by commands when
    making a request) to UserInput in keeping with PowerShell style.
  • Updated prevention policy settings for Compare-FalconPreventionPhase.
  • Updated Write-Result to remove meta from output when meta.pagination.total equals 0 to account for
    some -Detailed results returning meta information instead of an empty response (unlike a non -Detailed
    result, which would return nothing, as expected).
  • Updated private Add-Include function to provide error messages when unable to pull results instead of a silent
    failure with no output in the related -Include property.
  • Updated reference policies used by Compare-FalconPreventionPhase.

Command Changes

Add-FalconSensorTag

  • Fixed bug where n was being split into separate tags due to an incorrect quote. Thanks @soggysec!
  • Removed support for pre-6.42 Windows sensors given that they are no longer supported and don't have
    CsSensorSettings.exe.
  • Isolated the scripts being run to add sensor tags into new files contained under the script folder.

Edit-FalconHorizonAwsAccount

  • Added autocomplete values for CloudTrailRegion.
  • Added IamRoleArn, BehaviorAssessmentEnabled, SensorManagementEnabled, RemediationRegion, and
    RemediationTouAccepted.

Edit-FalconHorizonPolicy

  • Updated AccountId to accept multiple identifiers.

Edit-FalconReconNotification

  • Added IdpSendStatus and Message.

Edit-FalconFirewallLocationSetting

  • Added LocationPrecedence.

Edit-FalconIoc

  • Added Array parameter for submitting many IOCs for modification, and set as the default parameter set when
    utilizing the pipeline.
  • Set maximum of 2,000 IOCs per request when using Array.

Export-FalconConfig

  • Added FileVantagePolicy (including FileVantageExclusion) and FileVantageRuleGroup (including
    FileVantageRule). CrowdStrike-created policies and rule groups are excluded from the export
    because they are auto-generated and can not be modified.
  • Updated to force HostGroup when exporting FileVantagePolicy to evaluate host_groups.
  • Updated to force FileVantageRuleGroup when exporting FileVantagePolicy to evaluate rule_groups and
    assign them to policies.

Get-FalconAlert

  • Removed pattern validation for Id parameter, due to new varying identifier types found in testing.

Get-FalconBuild

  • Added Stage.

Get-FalconContainerAccount

  • Updated Location to correctly submit as locations to the API endpoint.

Get-FalconContainerAwsAccount

  • Added IsHorizonAcct.

Get-FalconContainerCluster

  • Added Status.

Get-FalconContainerVulnerability

  • Corrected error that prevented the submission of applicationPackages.

Get-FalconFimChange

  • Updated to use new v3 endpoint, replacing Offset with After.
  • Renamed command to Get-FalconFileVantageChange, but kept Get-FalconFimChange as an alias.

Get-FalconHorizonAwsAccount

  • Added IamRoleArn and Migrated.

Get-FalconHorizonAzureAccount

  • Added TenantId.

Get-FalconHorizonAzureCertificate

  • Added YearsValid.

Get-FalconHorizonIoa

  • Added ResourceId, ResourceUuid, and Since.

Get-FalconHost

  • Updated the Login switch to use new v2 endpoint. The initial API is limited to 10 ids values per
    request, which means that using -Include login_history will be substantially slower until the API limit
    is increased.

Get-FalconHostGroup

  • Updated Include to use a filtered Get-FalconHost search when adding members which avoids the 10k
    maximum limit from the previously used Get-FalconHostGroupMember command.

Get-FalconRole

  • Reorganized parameter positioning.
  • Removed automatic redirection of Id values when matching a Cid (because it also matches custom role
    identifiers).
  • Removed UserId as a parameter for the /user-management/queries/roles/v1:get endpoint because the same data
    is returned by the /combined/ endpoint and they have overlapping parameters.
  • Added DirectOnly parameter to Get-FalconRole.

Get-FalconScan

  • Updated to use /ods/entities/scans/v2:get endpoint.

Get-FalconSensorTag

  • Isolated the scripts being run to retrieve tags into new files contained under the script folder.

Get-FalconSession

  • Added Cid and CommandInfo, which facilitate the display of all Real-time Response sessions within the
    authorized CID.

Import-FalconConfig

  • Added an error message when filenames within the target archive do not correspond with files typically created
    by Export-FalconConfig. Thanks @JFresh15 and @soggysec!
  • Added additional verbose output when the command updates id values for groups and rule_groups objects.
  • Added additional verbose output when the command updates build values for Sensor Update policies.
  • Fixed a bug where Linux Sensor Update policies would not be created due to a missing build for LinuxArm64
    policy variants.
  • Added FileVantagePolicy and FileVantageRuleGroup as ModifyExisting options.
  • Updated Comment output to specify why certain items were ignored using NoModifyDefault and
    NoModifyExisting.
  • Added code to compensate and properly match when importing into a new cloud and the "latest" tagged build is
    renamed for a SensorUpdatePolicy.

Invoke-FalconAdminCommand

  • Added falconscript as a Command option.

Invoke-FalconAlertAction

  • Removed pattern validation for Id due to new varying identifier types found in testing.
  • Updated to use new v3 endpoint.

Invoke-FalconContainerScan

  • Corrected scan-type to scan_type during submission.

Invoke-FalconDeploy

  • Modified to ensure that the timeout value was 600 seconds when on the put step.
  • Updated GroupId to use a filtered Get-FalconHost search which avoids the 10k maximum limit from the
    previously used Get-FalconHostGroupMember command.

Invoke-FalconRtr

  • Added falconscript as a Command option.
  • Updated GroupId to use a filtered Get-FalconHost search which avoids the 10k maximum limit from the
    previously used Get-FalconHostGroupMember command.

New-FalconHorizonAwsAccount

  • Added autocomplete values for CloudTrailRegion.
  • Added AccountType, BehaviorAssessmentEnabled, IamRoleArn, IsMaster, SensorManagementEnabled, and
    UseExistingCloudtrail.

New-FalconHorizonAzureAccount

  • Added ClientId, AccountType, DefaultSubscription, and YearsValid.

New-FalconIoc

  • Set maximum of 2,000 IOCs per request when using Array.

New-FalconScheduledScan

  • Added ScanInclusion.

Receive-FalconContainerYaml

  • Added IsSelfManagedCluster.

Receive-FalconHorizonAwsScript

  • Added Id.

Receive-FalconHorizonAzureScript

  • Added SubscriptionId, Template, and AccountType.

Receive-FalconRule

  • Added IfNoneMatch and IfModifiedSince.

Remove-FalconCidGroupMember

  • Updated to use /mssp/entities/cid-group-members/v2:delete endpoint.

Remove-FalconHorizonAzureAccount

  • Added TenantId and RetainTenant.

Remove-FalconReconRule

  • Added DeleteNotification.

Remove-FalconSample

  • Updated Id to accept a sha256 value when passed through the pipeline.

Remove-FalconSensorTag

  • Removed support for pre-6.42 Windows sensors given that they are no longer supported and don't have
    CsSensorSettings.exe.
  • Isolated the scripts being run to remove sensor tags into new files contained under the script folder.

Send-FalconPutFile

  • Added maximum character length for Name.

Send-FalconScript

  • Added maximum character length for Name.

Start-FalconScan

  • Added ScanInclusion.

Uninstall-FalconSensor

  • Added code to uninstall only the currently installed version of Falcon when multiple versions are detected on a
    Windows host.
  • Isolated the scripts being run to uninstall Falcon into new files contained under the script folder.

bk-cs added 30 commits June 8, 2023 12:04
Added `IamRoleArn` parameter to `New-FalconDiscoverAwsAccount`
Modified timeout for `Invoke-FalconDeploy` to default to 600 when using `put` and use `$Timeout` for other commands
Rearranged how `ApiClient.Invoke()` downloads files to eliminate "index out of range" error.
Created new `format.json` file to contain endpoint body/formdata/query parameter info for easier updating when there are large number of changes to API endpoints.
Added function `Get-EndpointFormat` to read body/formdata/query parameters from `format.json`.

Replaced tab of four spaces with two to reduce file size.

Moved code that replaces the user input parameters with proper parameter names for body payloads from the `Invoke-Falcon` function into the `Build-Content` function.
Replaced tab of four spaces with two to reduce file size.
Renamed `Inputs` to `UserInput` in keeping with PowerShell style.

Replaced tab of four spaces with two to reduce file sizes.
Renamed `$Inputs` to `$UserInput`
Replaced tab of four spaces with two to reduce file size.

Added code to import `format\format.json` when creating `$Script:Falcon` variable during initial access token request.
Replaced tab of four spaces with two to reduce file size.

Renamed `Inputs` to `UserInput` in keeping with PowerShell style.
Replaced tab of four spaces with two to reduce file size.

Renamed `Inputs` to `UserInput` in keeping with PowerShell style.

Added `TenantId` and `ObjectId` parameters to `Update-FalconDiscoverAzureAccount`.

Added parameters `TenantId`, `Status`, `Limit`, `Offset`, `All` and `Total` to `Get-FalconDiscoverAzureAccount`.

Added `YearsValid` parameter to `Get-FalconDiscoverAzureCertificate`.

Added parameters `ClientId`, `YearsValid`, `AccountType`, and `DefaultSubscription` to `New-FalconDiscoverAzureAccount`.
Replaced tab of four spaces with two to reduce file size.
Bug fixes for parameters generating errors when using `Invoke-FalconHostAction` with `Build-Content`
Bugfixes for when `Build-Content` adds single string values (instead of an array) to `$Expected` when validating user input
Modified commands to use `format.json` for parameter definition
Restructured to have single path values with method under it, instead of `path:method`, as used by PSFalcon
Updated `Get-EndpointFormat` to match the way endpoint values are stored (method under path, instead of `path:method`)
Added `CustomUrl` to `Request-FalconToken` for internal troubleshooting
Bugfix for `Get-EndpointFormat` when an endpoint is provided that has no parameters
Fixed bug where a single returned 'Get-FalconAsset' result would not append 'login_event' history with 'Include'
Re-ordered file content related parameters and added descriptions
Updated how host_groups/rule_groups are assigned when creating/modifying FileVantagePolicy

Still need to add functionality to remove assigned rule_groups/host_groups when they don't make the config archive being imported and analyze policy for settings/rule changes beyond groups/enablement status
A couple more changes for how rule_groups/host_groups are assigned to FileVantagePolicy to match existing structure
Updated Export-FalconConfig to add FileVantageRuleGroup when exporting FileVantagePolicy
Added validation of properties in `repeated` object and defined formatting for body payload so that `repeated` was properly submitted during a request when using `New-FalconFileVantageExclusion`
* Import-FalconConfig

Suppressed output of verbose message when old identifier did not change to a new identifier.

Added creation of `exclusions` when creating `FileVantagePolicy`.

Compressed creation of `rule_groups` and `host_groups` for `FileVantagePolicy`.
Added validation and body format for `Edit-FalconFileVantageExclusion`
Issue #363: Added critical as a severity for `Edit-FalconHorizonPolicy`
Updated `Set-Property` to avoid errors checking for existing properties under certain conditions when using `Import-FalconConfig`
Removed validation for `ScheduleStart` and `ScheduleEnd` for `New-FalconFileVantageExclusion` and `Edit-FalconFileVantageExclusion`
Added code to `Import-FalconConfig` to evaluate and modify exclusions assigned to `FileVantagePolicy`
Added `precedence` to `Edit-FalconFileVantageRule` and fixed typo in parameter description for `New-FalconFileVantageRule`
Added support for modification of `FileVantageRuleGroup`, `FileVantageRule` and corrected some bugs with `FileVantageExclusion` under `FileVantagePolicy`
Added code to compensate and still properly match when importing into a new cloud and the "latest" tagged build is renamed for a SensorUpdatePolicy.

Added "Ignored" message when a `FileVantageRuleGroup` is ignored due to a lack of required changes.
Updated `Invoke-FalconAlertAction` to use new `/alerts/entities/alerts/v3:patch` endpoint.
Updated `Get-FalconHost -Login` to use `v2` endpoint and added appropriate limit.
@bk-cs bk-cs requested a review from jshcodes November 22, 2023 18:36
@bk-cs bk-cs self-assigned this Nov 22, 2023
@bk-cs bk-cs merged commit 83fe32b into master Nov 22, 2023
@bk-cs bk-cs deleted the 2.2.6 branch November 22, 2023 18:45
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.

None yet

1 participant