Skip to content

Commit

Permalink
[DEPLOY] v0.6.3 - New Service Classes, Deprecated CS_USERNAME, IOC Se…
Browse files Browse the repository at this point in the history
…rvice Class merge (#324)

* Bump version -> 0.6.3

* Unit tests updated to reflect operation migrations

* Deprecated legacy IOC endpoints

* Migrated remaining legacy endpoints into the class

* Updated unit test to reflect migrated endpoints

* Migrated remaining legacy endpoints into the class

* Linting / whitespace

* Add after and from_parent paremeters

* Added two new Hosts API endpoints

* Added new getRemediationsV2 endpoint

* New Service Class - FalconContainer

* Update CHANGELOG.md

* Linting

* More whitespace linting

* Fix typo

* Update CHANGELOG.md

* Update ZTA getComplianceV1 endpoint

* Add Quarantine Service Class and endpoints

* Linting

* Deprecated cs_username keyword. Closes #321.

* Deprecated cs_username keyword. Closes #320.

* Update CHANGELOG.md

* Update wordlist.txt

Co-authored-by: jlangdev <[email protected]>
  • Loading branch information
jshcodes and jlangdev authored Aug 27, 2021
1 parent 13c5850 commit f2085d2
Show file tree
Hide file tree
Showing 22 changed files with 776 additions and 141 deletions.
7 changes: 7 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ ExecuteAdminCommand
ExecuteCommand
FH
FQL
FalconContainer
FalconDebug
FalconPy
FalconShell
FalconX
Falconx
FirewallManagement
FlightControl
GCP
GetActionsV
Expand Down Expand Up @@ -137,6 +139,7 @@ GetNotificationsDetailedV
GetNotificationsTranslatedV
GetNotificationsV
GetPut
getRemediationsV
GetReports
GetRoles
GetRulesV
Expand Down Expand Up @@ -200,6 +203,8 @@ QueryBehaviors
QueryDetects
QueryDevicesByFilter
QueryDevicesByFilterScroll
QueryDeviceLoginHistory
QueryGetNetworkAddressHistoryV
QueryHiddenDevices
QueryIOCs
QueryIncidents
Expand Down Expand Up @@ -234,6 +239,7 @@ Scalable
ScanSamples
SemVer
Shockwave
SpotlightVulnerabilities
SubscriptionID
SubscriptionIDs
Substring
Expand Down Expand Up @@ -264,6 +270,7 @@ UploadSampleV
VerifyAWSAccountAccess
XZY
YARA
ZeroTrustAssessment
addCIDGroupMembers
addRole
addUserGroupMembers
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# Version 0.6.3
## Added features and functionality
+ Added: New FalconContainer Service Class. `falcon_container.py`
+ Added: Two new methods (operations)) to the Hosts Service Class. `hosts.py`
- query_device_login_history / QueryDeviceLoginHistory
- query_network_address_history / QueryGetNetworkAddressHistoryV1
+ Added: New method (operation)) to the SpotlightVulnerabilities Service Class. `spotlight_vulnerabilities.py`
- get_remediations_v2 - getRemediationsV2
+ Migrated: Ported still viable methods from legacy IOCS Service Class `iocs.py` to the new IOC Service Class. `ioc.py`
- devices_count / DevicesCount
- devices_ran_on / DevicesRanOn
- processes_ran_on / ProcessesRanOn
- entities_processes / entities_processes
+ Updated: Deprecated 5 methods within the legacy IOCS Service Class. `iocs.py`
- get_ioc / GetIOC
- create_ioc / CreateIOC
- delete_ioc / DeleteIOC
- update_ioc / UpdateIOC
- query_iocs / QueryIOCs
+ Updated: Deprecated cs_username keyword from all methods within CustomIOA and FirewallManagement Service Classes. `custom_ioa.py`, `firewall_management.py`
+ Added: New Quarantine Service Class and endpoints. `quarantine.py`
+ Updated: Updated endpoint for getComplianceV1 operation within ZeroTrustAssessment Service Class. `zero_trust_assessment.py`

# Version 0.6.2
## Issues resolved
+ Bug fix: Fixed Uber class passing empty **ids** parameter array when no _ids_ had been provided to the command method. Closes #314. `_util.py`
Expand Down
49 changes: 49 additions & 0 deletions src/falconpy/_endpoint/_falcon_container.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""
_______ __ _______ __ __ __
| _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----.
|. 1___| _| _ | | | | _ | 1___| _| _| | <| -__|
|. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|
|: 1 | |: 1 |
|::.. . | CROWDSTRIKE FALCON |::.. . | FalconPy
`-------' `-------'
OAuth2 API - Customer SDK
_endpoint._falcon_container - Internal API endpoint constant library
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
"""

_falcon_container_endpoints = [
[
"GetCredentials",
"GET",
"/container-security/entities/image-registry-credentials/v1",
"Gets the registry credentials",
"falcon_container",
[]
]
]
28 changes: 28 additions & 0 deletions src/falconpy/_endpoint/_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,34 @@
"""

_hosts_endpoints = [
[
"QueryDeviceLoginHistory",
"POST",
"/devices/combined/devices/login-history/v1",
"Retrieve details about recent login sessions for a set of devices.",
"hosts",
[
{
"name": "body",
"in": "body",
"required": True
}
]
],
[
"QueryGetNetworkAddressHistoryV1",
"POST",
"/devices/combined/devices/network-address-history/v1",
"Retrieve history of IP and MAC addresses of devices.",
"hosts",
[
{
"name": "body",
"in": "body",
"required": True
}
]
],
[
"PerformActionV2",
"POST",
Expand Down
32 changes: 24 additions & 8 deletions src/falconpy/_endpoint/_ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@
"description": "The sort expression that should be used to sort the results.",
"name": "sort",
"in": "query"
},
{
"type": "string",
"description": "A pagination token used with the `limit` parameter to manage pagination of results. "
"On your first request, don't provide an 'after' token. On subsequent requests, provide the 'after' "
"token from the previous response to continue from that place in the results. To access more than 10k "
"indicators, use the 'after' parameter instead of 'offset'.",
"name": "after",
"in": "query"
},
{
"type": "boolean",
"description": "The filter for returning either only indicators for the request customer or its MSSP parents",
"name": "from_parent",
"in": "query"
}
]
],
Expand Down Expand Up @@ -239,14 +254,6 @@
"name": "offset",
"in": "query"
},
{
"type": "string",
"description": "A pagination token used with the `limit` parameter to manage pagination "
"of results. On your first request, don't provide an `after` token. On subsequent requests, "
"provide the `after` token from the previous response to continue from that place in the results.",
"name": "after",
"in": "query"
},
{
"type": "integer",
"description": "The maximum records to return.",
Expand Down Expand Up @@ -278,6 +285,15 @@
"description": "The sort expression that should be used to sort the results.",
"name": "sort",
"in": "query"
},
{
"type": "string",
"description": "A pagination token used with the `limit` parameter to manage pagination of results. "
"On your first request, don't provide an 'after' token. On subsequent requests, provide the 'after' "
"token from the previous response to continue from that place in the results. To access more than 10k "
"indicators, use the 'after' parameter instead of 'offset'.",
"name": "after",
"in": "query"
}
]
]
Expand Down
157 changes: 157 additions & 0 deletions src/falconpy/_endpoint/_quarantine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
"""
_______ __ _______ __ __ __
| _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----.
|. 1___| _| _ | | | | _ | 1___| _| _| | <| -__|
|. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|
|: 1 | |: 1 |
|::.. . | CROWDSTRIKE FALCON |::.. . | FalconPy
`-------' `-------'
OAuth2 API - Customer SDK
_endpoint._quarantine - Internal API endpoint constant library
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
"""

_quarantine_endpoints = [
[
"ActionUpdateCount",
"GET",
"/quarantine/aggregates/action-update-count/v1",
"Returns count of potentially affected quarantined files for each action.",
"quarantine",
[
{
"type": "string",
"description": "FQL specifying filter parameters.",
"name": "filter",
"in": "query",
"required": True
}
]
],
[
"GetAggregateFiles",
"POST",
"/quarantine/aggregates/quarantined-files/GET/v1",
"Get quarantine file aggregates as specified via json in request body.",
"quarantine",
[
{
"name": "body",
"in": "body",
"required": True
}
]
],
[
"GetQuarantineFiles",
"POST",
"/quarantine/entities/quarantined-files/GET/v1",
"Get quarantine file metadata for specified ids.",
"quarantine",
[
{
"name": "body",
"in": "body",
"required": True
}
]
],
[
"UpdateQuarantinedDetectsByIds",
"PATCH",
"/quarantine/entities/quarantined-files/v1",
"Apply action by quarantine file ids",
"quarantine",
[
{
"name": "body",
"in": "body",
"required": True
}
]
],
[
"QueryQuarantineFiles",
"GET",
"/quarantine/queries/quarantined-files/v1",
"Get quarantine file ids that match the provided filter criteria.",
"quarantine",
[
{
"type": "string",
"description": "Starting index of overall result set from which to return ids.",
"name": "offset",
"in": "query"
},
{
"type": "integer",
"description": "Number of ids to return.",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Possible order by fields: hostname, username, date_updated, date_created, paths.path, state, "
"paths.state. Ex: 'date_created|asc'.",
"name": "sort",
"in": "query"
},
{
"type": "string",
"description": "FQL query specifying the filter parameters. Special value '*' means to not filter on anything. "
"Filter term criteria: status, adversary_id, device.device_id, device.country, device.hostname, "
"behaviors.behavior_id, behaviors.ioc_type, behaviors.ioc_value, behaviors.username, behaviors.tree_root_hash. "
"Filter range criteria:, max_severity, max_confidence, first_behavior, last_behavior.",
"name": "filter",
"in": "query"
},
{
"type": "string",
"description": "Match phrase_prefix query criteria; included fields: _all (all filter string fields), sha256, state, "
"paths.path, paths.state, hostname, username, date_updated, date_created.",
"name": "q",
"in": "query"
}
]
],
[
"UpdateQfByQuery",
"PATCH",
"/quarantine/queries/quarantined-files/v1",
"Apply quarantine file actions by query.",
"quarantine",
[
{
"name": "body",
"in": "body",
"required": True
}
]
]
]
20 changes: 20 additions & 0 deletions src/falconpy/_endpoint/_spotlight_vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@
"""

_spotlight_vulnerabilities_endpoints = [
[
"getRemediationsV2",
"GET",
"/spotlight/entities/remediations/v2?ids={}",
"Get details on remediation by providing one or more IDs",
"spotlight_vulnerabilities",
[
{
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi",
"description": "One or more remediation IDs",
"name": "ids",
"in": "query",
"required": True
}
]
],
[
"getVulnerabilities",
"GET",
Expand Down
Loading

0 comments on commit f2085d2

Please sign in to comment.