Server.Analysis.CyberChefServer

Analyze/transform data with CyberChef-server.

Note that this requires an accessible Cyberchef-server instance to work.

If you prefer not to run a local instance, you might consider altering the artifact to leverage something like https://prod.apifor.io .

Reference: https://github.com/gchq/CyberChef-server

Examples:

This artifact can be called from within another artifact to analyze/transform the data made available by that artifact.

SELECT * from Artifact.Exchange.Analysis.CyberchefServer(Input=$YOURDATA,Recipe=$YOURRECIPE)

If a default recipe is used, only the input will need to be passed, like so:

SELECT * from Artifact.Exchange.Analysis.CyberchefServer(Input=$YOURDATA)

The server metadata store can be used to store the URL of Cyberchef-server (with a key value of CyberChefServerURL).

Examples of recipes can be found here:

https://github.com/mattnotmax/cyberchef-recipes


name: Server.Analysis.CyberChefServer
author: Wes Lambert -- @therealwlambert
description: |
  Analyze/transform data with CyberChef-server.

  Note that this requires an accessible Cyberchef-server instance to
  work.

  If you prefer not to run a local instance, you might consider
  altering the artifact to leverage something like
  https://prod.apifor.io.

  **Reference**: https://github.com/gchq/CyberChef-server

  **Examples**:

    This artifact can be called from within another artifact to
    analyze/transform the data made available by that artifact.

    `SELECT * from Artifact.Exchange.Analysis.CyberchefServer(Input=$YOURDATA,Recipe=$YOURRECIPE)`

    If a default recipe is used, only the input will need to be passed, like so:

    `SELECT * from Artifact.Exchange.Analysis.CyberchefServer(Input=$YOURDATA)`


    The server metadata store can be used to store the URL of
    Cyberchef-server (with a key value of `CyberChefServerURL`).

    Examples of recipes can be found here:

    https://github.com/mattnotmax/cyberchef-recipes

type: server

parameters:
    - name: Url
      description: URL of CyberChef-server
      default: https://mycyberchefserver
    - name: Input
      type: string
      default:
      description: The data to send to Cyberchef-server.
    - name: Recipe
      type: string
      description: CyberChef recipe to use for processing data.
      default:
    - name: DisableSSLVerify
      type: bool
      default: True

sources:
  - queries:
    - |
        LET CCS_Url = if(
                  condition=Url,
                  then=Url,
                  else=server_metadata().CyberChefServerURL)
    - |
        LET BakedData = SELECT parse_json(data=Content).value AS TransformedValue from http_client(url=CCS_Url + "/bake", method='POST', headers=dict(`Content-Type`='application/json'), data=dict(`input`=Input, `recipe`=parse_json_array(data=Recipe)), disable_ssl_security=DisableSSLVerify)
    - |
        SELECT * FROM BakedData