Atlantiraptor Docs

Server.Enrichment.CortexAnalyzer

Type: Server · Author: Wes Lambert - @therealwlambert

A utility artifact that runs Cortex analyzer jobs on observables and retrieves the results from all applicable analyzers.

This artifact is expected to be called from within another artifact (such as one looking for files) to enrich the data made available by that artifact.

Example

SELECT * from Artifact.Server.Enrichment.CortexAnalyzer(Observable=$YOURHASH, ObservableType='hash')

Parameters

Name Type Default Description
Observable string Data to be analyzed by Cortex
ObservableType string Type of observable to be submitted to Cortex. Ex. hash, domain, ip
TLP string 0 TLP for the job submitted to Cortex
CortexURL string URL used for Cortex job submission. We recommend using the server metadata store for this.
CortexKey string API key used for authentication to Cortex. We recommend using the server metadata store for this.
DisableSSLVerify bool true Disable SSL Verification
JobMessage string Job submmitted by Velociraptor Message to be used when running analyzer job
JobWaitTime string 10minute Amount of time to wait for a report from Cortex.

References

Source

Defined in artifacts/definitions/Server/Enrichment/CortexAnalyzer.yaml.

name: Server.Enrichment.CortexAnalyzer
description: |
  A utility artifact that runs Cortex analyzer jobs on observables and
  retrieves the results from all applicable analyzers.

  This artifact is expected to be called from within another artifact
  (such as one looking for files) to enrich the data made available by
  that artifact.

  #### Example

    `SELECT * from Artifact.Server.Enrichment.CortexAnalyzer(Observable=$YOURHASH, ObservableType='hash')`

reference:
  - https://github.com/TheHive-Project/Cortex

author: Wes Lambert - @therealwlambert

type: SERVER

parameters:
   - name: Observable
     description: Data to be analyzed by Cortex
     default:
   - name: ObservableType
     description: Type of observable to be submitted to Cortex. Ex. `hash`, `domain`, `ip`
     default:
   - name: TLP
     description: TLP for the job submitted to Cortex
     default: 0
   - name: CortexURL
     description: URL used for Cortex job submission. We recommend using the <a href="#/host/server">server metadata store</a> for this.
     default: ''
   - name: CortexKey
     description: API key used for authentication to Cortex. We recommend using the <a href="#/host/server">server metadata store</a> for this.
     default: ''
   - name: DisableSSLVerify
     type: bool
     description: Disable SSL Verification
     default: True
   - name: JobMessage
     description: Message to be used when running analyzer job
     default: Job submmitted by Velociraptor
   - name: JobWaitTime
     description: Amount of time to wait for a report from Cortex.
     default: 10minute

sources:
  - query: |
        LET OBSERVABLE <= Observable
        LET OBSERVABLE_DATATYPE <= ObservableType
        LET URL <= if(
                condition=CortexURL,
            then=CortexURL,
            else=server_metadata().CortexURL)
        LET cortex_key =
            if(
                condition=CortexKey,
            then=CortexKey,
            else=server_metadata().CortexKey)
        LET ENABLED_ANALYZERS = SELECT Content FROM
            http_client(
                url=URL + '/analyzer',
                method='GET',
                disable_ssl_security=DisableSSLVerify,
                headers=dict(
                    `Authorization`=format(format="Bearer %v", args=[cortex_key])))
        LET ANALYZERS_SUPPORTED = SELECT name AS AnalyzerName, id AS ID, dataTypeList AS DList FROM parse_json_array(data=ENABLED_ANALYZERS.Content)
        LET ANALYZERS_MATCH_TYPE = SELECT ID  FROM foreach(row=ANALYZERS_SUPPORTED, query={ SELECT AnalyzerName, ID, _value AS Match FROM
            if(
                condition= filter(list=DList, regex=OBSERVABLE_DATATYPE),
            then="yes",
            else="no")}) WHERE Match = "yes"
        LET ANALYZER_RUN = SELECT parse_json(data=Content) AS Resp FROM
            http_client(
                url=URL + '/analyzer/'+ ID + '/run' ,
                method='POST',
                disable_ssl_security=DisableSSLVerify,
                headers=dict(
                    `Content-Type`="application/json",
                    `Authorization`=format(format="Bearer %v",
                    args=[cortex_key])),
                    data=serialize(item=dict(
                        data=OBSERVABLE, dataType=OBSERVABLE_DATATYPE, tlp=TLP, message=JobMessage
                    ))
            )
        LET JOBID = SELECT Resp.id AS JobID from foreach(row=ANALYZER_RUN)
        LET GETREPORT = SELECT Content AS Resp FROM
            http_client(
                url=format(format="%v/job/%v/waitreport?atMost=%v", args=[URL,JOBID.JobID[0], JobWaitTime]),
                method='GET',
                disable_ssl_security=DisableSSLVerify,
                headers=dict(
                    `Content-Type`="application/json",
                    `Authorization`=format(format="Bearer %v",
                    args=[cortex_key])
                )
            )
        LET REPORT = SELECT parse_json(data=Resp) AS Details FROM GETREPORT
        SELECT Observable, Details.workerName as AnalyzerName, Details as _Details, Details.report AS Report FROM foreach(row=ANALYZERS_MATCH_TYPE, query={SELECT * FROM REPORT})

Edit this page on GitHub

© 2026 Atlant Security EOOD. Atlantiraptor is free software under the GNU Affero General Public License v3. It is based on Velociraptor by Velocidex, and keeps its copyright notices. Velociraptor is a trademark of its owner; Atlantiraptor is not affiliated with or endorsed by it.