SecBI

A threat, intelligence, and investigation platform, enabled by automation of detection and investigation, including remediation and prevention policy enforcements on all integrated appliances.

Network Security · SecBI

Details

IDSecBI
ProviderLogPoint
CategoryNetwork Security
From Version5.0.0
Docker Imagedemisto/python3:3.12.8.3296088
Supported ModulesAgentix XSIAM

README

The SecBI solution is designed for a transformation of the security operation, enabled by automation of the detection and investigation, to the response, including remediation and prevention policy enforcements on all integrated appliances. This integration was integrated and tested with version 3.2.x of SecBI

Use Cases

  • secbi-get-incidents-list: Get all of the incidents related to a specific hunting query (Elasticsearch), return (if matched) the list of IDs of relevant incidents inside the SecBI system.
  • secbi-get-incident: Get all of the details of a specific incident by its ID (could be used as the next step after GetIncidents), returns all the details of the specific incident, including all involved users, destinations and the detailed detections made by the SecBI system.
  • secbi-get-incident-by-host: Get all of the details of a specific incident by searching for a specific destination (could be used for IOC match or as a broader scope detection request), returns all the details of the specific incident involving the specific host, including all involved users, and all destinations (possibly implicating other destinations aside from the one in the request), and the detailed detections made by the SecBI system.

Detailed Description

With attacks growing exponentially in volume and complexity, organizations face an almost insurmountable challenge to implement effective security programs at a time when security resources are severely limited. They struggle with inadequate time, funds, skillsets and headcount.

SecBI makes detection and response quick, accurate and simple, with its proprietary underlined technology, AI-based Autonomous Investigation™, mimicking an expert analyst at machine speed.

SecBI’s Autonomous Investigation amplifies the alert prioritization and incident investigation skills of security analyst teams, allowing them to efficiently prioritize alerts from other systems, and easily investigate and triage incidents through analytics-driven visibility.

SecBI builds behavioral profiles for users and hosts by applying Autonomous Investigation techniques, including supervised and unsupervised machine learning, on data from the network and security infrastructure, enriched with threat intelligence.

The security insights generated by SecBI analytics are oriented around a user or host and make it easy for automated response, as well as allowing analysts to conduct their incident investigation efforts and the hunting for the unknown threats.

The SecBI solution is designed for a transformation of the security operation, enabled by automation of the detection and investigation, to the response, including remediation and prevention policy enforcements on all integrated appliances.

Configure SecBI on Cortex XSOAR

  1. Navigate to Settings > Integrations  > Servers & Services.
  2. Search for SecBI.
  3. Click Add instance to create and configure a new integration instance.
    • Name: a textual name for the integration instance.
    • SecBI API URL (e.g. https://demisto.secbi.com)
    • SecBI API key
    • Use system proxy settings
    • Trust any certificate (not secure)
  4. Click Test to validate the new instance.

Commands

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

  1. SecBI Get All Incident IDs: secbi-get-incidents-list
  2. Get a specific SecBI Incident by SecBI Incident ID: secbi-get-incident
  3. Get a specific SecBI Incident by Host: secbi-get-incident-by-host

1. secbi-get-incidents-list


SecBI Get All Incident IDs

Base Command

secbi-get-incidents-list

Required Permissions

No special permissions required.

Input
Argument Name Description Required
query The Query by which to filter the Incident IDs Optional
limit Limit amount of IDs to return (-1) for all. Default is 100 Optional

 

Context Output
Path Type Description
SecBI.IncidentsList String SecBI Incident IDs List

 

Command Example

!secbi-get-incidents-list query="severity:[60 TO 100]" limit="3"

Human Readable Output

### List of SecBI Incidents |ID| |---| | 7899b0ff-810b-4df4-a0e3-806557aecc2e | | 3de12111-3b09-45b7-8ac8-6ab88be48b52 | | 0e83beac-b374-4f89-b2ab-ecc851414ec9 |

2. secbi-get-incident


Get a specific SecBI Incident by SecBI Incident ID

Base Command

secbi-get-incident

Required Permissions

No special permissions required.

Input
Argument Name Description Required
incident_id SecBI incident ID Required

 

Context Output
Path Type Description
SecBI.Incident.ID String SecBI incident ID
SecBI.Incident.Host String SecBI incident host names
SecBI.Incident.Identity String SecBI incident identities
SecBI.Incident.InternalIp String SecBI incident client internal IP addresses
SecBI.Incident.SIp String SecBI incident client IP addresses
SecBI.Incident.FirstAppearance Date SecBI incident first appearance of data
SecBI.Incident.LastAppearance Date SecBI incident last appearance of data

 

Command Example

!secbi-get-incident incident_id=7899b0ff-810b-4df4-a0e3-806557aecc2e

Human Readable Output

### SecBI incident ID "7899b0ff-810b-4df4-a0e3-806557aecc2e" |FirstAppearance|Host|ID|Identity|InternalIp|LastAppearance|SIp| |---|---|---|---|---|---|---| | 2017-07-31 06:46:14 | pix.crp.education,
solutions.sante-corps-esprit.com,
tracking.notizie.it,
editions.biosante-editions.fr,
www.nikon.fr,
www.mailant.it,
static.biosante-editions.com,
static.pubfac.com,
moodle.ead-online.be,
img1.gtv.digimondo.net,
static.snieditions.com,
www.trgmedia.it,
ws.atomikad.com,
www.ead-online.be,
www.smooto.com,
www.cronacaeugubina.it,
www.elfri.be | 7899b0ff-810b-4df4-a0e3-806557aecc2e | joe@acme.com | 172.23.152.25,
172.23.152.26 | 2017-08-04 08:22:43 | 141.101.61.31,
37.187.151.239,
52.85.180.13,
52.85.180.203,
151.80.18.159,
94.23.64.3,
134.213.72.175,
46.37.22.52,
95.85.13.99,
46.37.22.123,
54.72.0.177,
23.253.140.198,
0.0.0.0,
176.62.160.38,
52.85.180.177 |

3. secbi-get-incident-by-host


Get a specific SecBI Incident by Host

Base Command

secbi-get-incident-by-host

Required Permissions

No special permissions required.

Input
Argument Name Description Required
host The host by which to get a SecBI Incident Required

 

Context Output
Path Type Description
SecBI.Incident.ID String SecBI incident ID
SecBI.Incident.Host String SecBI incident host names
SecBI.Incident.Identity String SecBI incident identities
SecBI.Incident.InternalIp String SecBI incident client internal IP addresses
SecBI.Incident.SIp String SecBI incident client IP addresses
SecBI.Incident.FirstAppearance Date SecBI incident first appearance of data
SecBI.Incident.LastAppearance Date SecBI incident last appearance of data

 

Command Example

!secbi-get-incident-by-host host=www.smooto.com

Human Readable Output

### SecBI incident by host "www.smooto.com" |FirstAppearance|Host|ID|Identity|InternalIp|LastAppearance|SIp| |---|---|---|---|---|---|---| | 2017-07-31 06:46:14 | pix.crp.education,
solutions.sante-corps-esprit.com,
tracking.notizie.it,
editions.biosante-editions.fr,
www.nikon.fr,
www.mailant.it,
static.biosante-editions.com,
static.pubfac.com,
moodle.ead-online.be,
img1.gtv.digimondo.net,
static.snieditions.com,
www.trgmedia.it,
ws.atomikad.com,
www.ead-online.be,
www.smooto.com,
www.cronacaeugubina.it,
www.elfri.be | 7899b0ff-810b-4df4-a0e3-806557aecc2e | joe@acme.com | 172.23.152.25,
172.23.152.26 | 2017-08-04 08:22:43 | 141.101.61.31,
37.187.151.239,
52.85.180.13,
52.85.180.203,
151.80.18.159,
94.23.64.3,
134.213.72.175,
46.37.22.52,
95.85.13.99,
46.37.22.123,
54.72.0.177,
23.253.140.198,
0.0.0.0,
176.62.160.38,
52.85.180.177 |

Configuration parameters

  • API_URL — SecBI API URL (e.g. https://demisto.secbi.com) (required)
  • API_KEY — SecBI API key (required)
  • proxy — Use system proxy settings
  • insecure — Trust any certificate (not secure)

Commands (3)

  • secbi-get-incident

    Returns a specific SecBI Incident by SecBI incident ID.

  • secbi-get-incident-by-host

    Returns a specific SecBI incident by Host.

  • secbi-get-incidents-list

    Returns all incident IDs in SecBI.

import demistomock as demisto
from CommonServerPython import *

from CommonServerUserPython import *

""" IMPORTS """

import urllib3

# Disable insecure warnings
urllib3.disable_warnings()

""" GLOBALS/PARAMS """
SECBI_API_ROOT = "/api/v1"
SECBI_API_ENDPOINT_STATUS = SECBI_API_ROOT + "/status"
SECBI_API_ENDPOINT_INCIDENT = SECBI_API_ROOT + "/thirdparties/integration/incident"
SECBI_API_ENDPOINT_INCIDENTS = SECBI_API_ROOT + "/thirdparties/integration/incidents"
SECBI_INCIDENT_FIELDS = ["id", "host", "identity", "internalIp", "sIp", "firstAppearance", "lastAppearance"]

""" HELPER FUNCTIONS """


def capitalize(s: str):
    return s[0].upper() + s[1:]


def as_secbi_incident(incident_json: dict):
    secbi_incident = {capitalize(field): incident_json.get(field, []) for field in SECBI_INCIDENT_FIELDS}
    secbi_incident["ID"] = secbi_incident.pop("Id")
    return secbi_incident


""" COMMANDS + REQUESTS FUNCTIONS """


class SecBIClient(BaseClient):
    def secbi_get_incidents_list(self, query, limit):
        """
        SecBI Get All Incident IDs
        :param query: The Query by which to filter the Incident IDs
        :param limit: Limit amount of IDs to return (-1) for all
        :return: SecBI Incident IDs List
        """
        params = assign_params(query=query, limit=limit)
        LOG(
            f"Performing SecBI get_incidents_list request to {self._base_url}/{SECBI_API_ENDPOINT_INCIDENTS} with "
            f"params={params!s}"
        )
        return self._http_request(method="GET", url_suffix=SECBI_API_ENDPOINT_INCIDENTS, params=params)

    def secbi_get_incident(self, incident_id):
        """
        Get a specific SecBI Incident by SecBI Incident ID
        :param incident_id: SecBI incident ID
        :return: A dictionary representation of the SecBI Incident requested
        """
        params = assign_params(fields=SECBI_INCIDENT_FIELDS)
        return self._http_request(method="GET", url_suffix=f"{SECBI_API_ENDPOINT_INCIDENT}/{incident_id}", params=params)

    def secbi_get_incident_by_host(self, host):
        """
        Get a specific SecBI Incident by Host
        :param host: The host by which to get a SecBI Incident
        :return:  A dictionary representation of the SecBI Incident found to contain the supplied host
        """
        params = assign_params(host=host, fields=SECBI_INCIDENT_FIELDS)
        return self._http_request(method="GET", url_suffix=SECBI_API_ENDPOINT_INCIDENT, params=params)

    def test_module(self):
        """
        Performs basic get request to test SecBI system
        """
        return self._http_request(method="GET", url_suffix=SECBI_API_ENDPOINT_STATUS)


def test_module_command(client: SecBIClient):
    """
    This is the call made when pressing the integration test button.
    Performs basic get request to test SecBI system
    :param client: The SecBI client to use for the sanity test
    """
    try:
        results = client.test_module()
        if "status" in results and results["status"] == "ACTIVE":
            demisto.results("ok")
    except DemistoException as e:
        raise DemistoException("Failed connection test of SecBI. Please check your SECBI_API_URL and SECBI_API_KEY", e.args[0])


def secbi_get_incidents_list_command(client: SecBIClient, args: dict) -> tuple[str, dict, dict]:
    """
    SecBI Get All Incident IDs command
    :param client: The SecBI client to use
    :param args: The Demisto args
    :return: Content for return_outputs()
    """
    query = args.get("query", None)
    limit = args.get("limit", 100)
    incidents_list = client.secbi_get_incidents_list(query, limit)

    formatted = [{"ID": s} for s in incidents_list]
    human_readable = tableToMarkdown("List of SecBI Incidents", formatted)
    entry_context = {"SecBI.IncidentsList": incidents_list}
    return human_readable, entry_context, incidents_list


def secbi_get_incident_command(client: SecBIClient, args: dict) -> tuple[str, dict, dict]:
    """
    SecBI Get Incident command
    :param client: The SecBI client to use
    :param args: The Demisto args
    :return: Content for return_outputs()
    """
    incident_id = args.get("incident_id", None)
    raw_incident = client.secbi_get_incident(incident_id)
    incident_data = as_secbi_incident(raw_incident)

    human_readable = tableToMarkdown(f'SecBI incident ID "{incident_id}"', incident_data)
    entry_context = {"SecBI.Incident(val.ID === obj.ID)": incident_data}
    return human_readable, entry_context, raw_incident


def secbi_get_incident_by_host_command(client: SecBIClient, args: dict) -> tuple[str, dict, dict]:
    """
    SecBI Get Incident by Host command
    :param client: The SecBI client to use
    :param args: The Demisto args
    :return: Content for return_outputs()
    """
    host = args.get("host", None)
    raw_incident = client.secbi_get_incident_by_host(host)
    incident_data = as_secbi_incident(raw_incident)

    human_readable = tableToMarkdown(f'SecBI incident by host "{host}"', incident_data)
    entry_context = {
        # ID comparison might be problematic if the host changes Incidents and the ID changes
        "SecBI.Incident(val.ID === obj.ID)": incident_data
    }
    return human_readable, entry_context, raw_incident


""" COMMANDS MANAGER / SWITCH PANEL """


def main():
    LOG(f"Command being called is {demisto.command()}")

    params = demisto.params()
    command = demisto.command()

    should_validate_cert = not params.get("insecure", False)
    proxy = params.get("proxy")

    api_url = params.get("API_URL")
    api_key = params.get("API_KEY")

    # Headers to be sent in requests
    headers = {"secbi_api_key": api_key, "Content-Type": "application/json", "Accept": "application/json"}
    ok_codes = (200, 204)

    client = SecBIClient(base_url=api_url, verify=should_validate_cert, proxy=proxy, ok_codes=ok_codes, headers=headers)
    # Switch case
    commands = {
        "secbi-get-incidents-list": secbi_get_incidents_list_command,
        "secbi-get-incident": secbi_get_incident_command,
        "secbi-get-incident-by-host": secbi_get_incident_by_host_command,
    }

    try:
        if command == "test-module":
            test_module_command(client)
        elif command in commands:
            return_outputs(*commands[command](client, demisto.args()))
    # Log exceptions
    except Exception as e:
        msg = getattr(e, "message", repr(e))
        return_error(str(msg), error=e)


if __name__ in ["__main__", "__builtin__", "builtins"]:
    main()