mirror of
https://github.com/beenuar/AiSOC.git
synced 2026-11-24 08:35:46 +08:00
Adds `withsecure_elements`, an EDR connector for WithSecure Elements Broad Context Detections (BCDs), read through the Elements API. Part of the connector wishlist in #356. Authentication is the documented OAuth2 client credentials flow: the API client's ID and secret are exchanged with HTTP Basic at POST /as/token.oauth2 for a token scoped to connect.api.read only. The host is fixed at api.connect.withsecure.com, so the vaulted secret can only ever reach WithSecure, and every request carries the User-Agent the API requires. The token is cached until a minute before expires_in; a cached token refused with 401 is exchanged once more, while a token issued for that same request and refused fails the poll rather than looping. An optional organization ID (validated as a UUID, refused with 422 otherwise) lets a partner account read a customer organization. The poll reads GET /incidents/v1/incidents by createdTimestampStart / createdTimestampEnd, oldest first, 50 a page, and follows nextAnchor through the shared read_token_pages. A BCD is updated whenever a detection joins it, so windowing on creation raises each BCD once. The window opens at the persisted createdTimestamp cursor, the same event-time watermark eset_protect and wazuh use, so a poll cut short by the page bound or a run of failed polls is caught up. A refused or unreachable opening request raises; a later page failing keeps what was read. BCDs WithSecure closed itself as merged, autoFalsePositive or autoAcceptedBehavior are dropped. `archived` is deliberately not filtered on, since WithSecure does not document when a BCD is archived. Each BCD is enriched from its newest 100 detections (GET /incidents/v1/detections) and the devices they name (GET /devices/v1/devices): process, command line, hash (labelled SHA-1 or SHA-256 only when it has that shape), user, host, addresses, OS, and every MITRE ATT&CK technique and tactic. The host columns always describe the device the alert is filed on. The detections and device records ride on the BCD so a replay normalizes the same; each detection is stored without its open-ended activityContext, which keeps the event bounded, since an event ingest refuses would be re-read on every poll. Lookups go to the most severe BCDs and each BCD's own host first, and are bounded (50 BCDs, 50 devices) so a whole poll stays well under WithSecure's documented 300 requests a minute for EDR endpoints. A 429, or a credential refused part-way through, stops the lookups; a failed lookup costs the context, never the BCD. WithSecure's five severity levels each keep their own tier, critical included; a BCD without one falls back to riskLevel, whose top level severe maps to critical. Anything undocumented carries no severity. ocsf_classes.go files withsecure_elements at 2001 Security Finding. Adds the plugin manifest, a docs page with setup, rate limit and troubleshooting notes, a CHANGELOG entry, the checkpoint-contract entry, and the regenerated connector count, types, docs, sidebar, catalog fallback, conformance matrix, marketplace index, llms.txt and corpus stats. Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
38 lines
1.5 KiB
YAML
38 lines
1.5 KiB
YAML
id: withsecure_elements
|
|
name: WithSecure Elements Connector
|
|
version: "1.0.0"
|
|
plugin_type: connector
|
|
tier: stable
|
|
description: >
|
|
WithSecure Elements EDR Broad Context Detections via the Elements API.
|
|
Each BCD is raised once, when it is created, with the host, user,
|
|
process, command line, hash and MITRE ATT&CK techniques of its
|
|
detections. The host is fixed, so the client credential is only ever
|
|
sent to WithSecure, and only the read-only scope is requested.
|
|
Severity keeps WithSecure's five tiers, critical included. Read-only;
|
|
nothing here changes a device or a BCD.
|
|
author: AiSOC Core Team
|
|
tags: [edr, xdr, endpoint, withsecure, withsecure-elements, broad-context-detections]
|
|
homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/withsecure_elements.py
|
|
license: MIT
|
|
# The first release that contains this connector. The next release's PR
|
|
# confirms or corrects this value, the same way it does for eset_protect.
|
|
min_aisoc_version: "23.5.0"
|
|
config_schema:
|
|
type: object
|
|
required: [client_id, client_secret]
|
|
properties:
|
|
client_id:
|
|
type: string
|
|
description: From an API client created in Elements Security Center under Management > Organization Settings > API clients.
|
|
client_secret:
|
|
type: string
|
|
description: The API client's secret.
|
|
secret: true
|
|
organization_id:
|
|
type: string
|
|
description: >-
|
|
The UUID of the organization to read. Leave empty to read the API
|
|
client's own organization; a partner account sets the customer
|
|
organization here.
|