コンテンツにスキップ

カスタムスキャン

Ostorlab CLIを使用して、カスタムのチェックリストを使用してプラットフォーム上でスキャンを実行できます。カスタムのチェックリストは、カスタムエージェント設定の形式で表されます。

これは、プライベートエージェントを使用している場合や、特定の引数を使用してオープンソースエージェントのいずれかを使用したい場合に便利です。

例として、デフォルトの一部ではない定義済みのテンプレートリストを使用して「Nuclei」エージェントを実行することが挙げられます。

カスタムスキャンを実行するために必要な手順は次のとおりです。

Ostorlab - Ostorlab Cli

Ostorlab CLIは、ユーザーを認証し、プラットフォーム上でスキャンを実行する役割を担います。

pip install ostorlab
  • ユーザー名とパスワードを入力して、Ostorlabアカウントにログインします。
ostorlab auth login  

エージェントグループ定義の準備:

実行するエージェントのリストとそれぞれの引数は、エージェントグループ定義 ファイルを介して渡されます。

例:

kind: AgentGroup
description: This is a custom agent group to run nuclei with custom templates.
name: custom_agent_group
agents:
  - key: agent/ostorlab/nuclei
    args:
      - name: use_default_templates
        type: boolean
        description: use nuclei's default templates to scan.
        value: false
      - name: template_urls
        type: array
        description: List of template urls to run. These will be fetched by the agent and passed to Nuclei.
        value: 
            -https://raw.githubusercontent.com/Ostorlab/known_exploited_vulnerbilities_detectors/main/nuclei/CVE-2021-35464.yaml
            -https://raw.githubusercontent.com/Ostorlab/known_exploited_vulnerbilities_detectors/main/nuclei/CVE-2021-27561.yaml
カスタムエージェントグループ定義(agent_def.yaml)をスキャンの実行に使用するファイルに保存します。

スキャンの実行:

oxo scan --runtime=cloud run -g PATH_AGENT_GROUP_DEFINITION COMMAND [ARGS]

たとえば、/tmp/agent_def.yaml で定義されたエージェントグループを使用して URL https://my_domain.com をスキャンする場合

oxo scan --runtime=cloud run -g /tmp/agent_def.yaml link --url https://my_domain.com --method GET