Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
Zerodapi — 0dAPI 公式ドキュメント | Kitploit
ツール/GitHubGitHub/0dai-ml/zerodapi
OSINT (オープンソースインテリジェンス)脆弱性スキャナーエクスプロイトフレームワークペイロード生成ウェブセキュリティペネトレーションテスト学習と教育AIセキュリティ
GitHub0dai-ml/zerodapi

Zerodapi

0dAPI 公式ドキュメント

リポジトリを見る
12年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

Zerodai ドキュメント

始めましょう!

root@kitploit:~
pip install zerodai==0.0.0.20
root@kitploit:~
export zerodapi_key="TU_API_KEY"

APIキーを取得する: https://zerodai.com チャット会話(シンプル)- メモリなし

root@kitploit:~

from zerodai import zerodai
import os
zerodai.api_auth(os.getenv("zerodapi_key"))
messages = []
while True:
    prompt = input("> ")
    if prompt == "exit":
        break
    messages.append({"role": "user", "content": prompt})

    messages.append({"role": "system", "content": "Eres 0dAI un asistente de ciberseguridad cuya unica función es..."})
    zerodai.inference(model="0dai70b", messages=messages, temperature=0.7, stream=True)

Zerodaiはサイバーセキュリティに特化した自然言語処理ライブラリで、人間による情報処理、推論、計画、実行に基づくプロセスを部分的に自動化することを目的としています。以下の機能を持つサイバーセキュリティエージェントフレームワークの作成を目指しています。

機能

  • モジュール性と適応性: このライブラリは実装が容易で、他のソフトウェアと統合しやすいことを目指しています。
  • 簡素化: プロセスの最後にユーザーが受け取るすべての情報を、より人間にわかりやすい形式に簡素化することを目指しています。

推論 (Inferencias)

モデルとの基本的な対話方法であり、以下のパラメータを持ちます。これらのパラメータはライブラリの基本となるため、しっかりと学習し理解することが重要です。

パラメータ

  • model: 使用する言語モデル。利用可能なモデルは以下の通りです。

    • 0dai7b: 基本モデル。使用制限なし、高速で、簡単な会話やプログラミング支援に最適。サイバーセキュリティ分野でも十分に機能します。

      • コンテキスト: 16k
      • 16 ビット
      • 関数呼び出し不可
    • 0dai8x7b: 柔軟なモデル。大きなコンテキストウィンドウを持ち、コード生成においてGPT-4レベル。複雑なサイバーセキュリティの質問やスクリプトに適しています。

      • コンテキスト: 32k
      • 8 ビット
      • 関数呼び出し不可
    • 0daifn: 関数呼び出しに推奨されるモデル。関数呼び出し性能が最も優れており、コンテキストも多く、0dai70bより軽量です。マルチステップの関数呼び出しにおいても最高レベルのGPTに匹敵します。

      • コンテキスト: 64k
      • 16 ビット
      • 関数呼び出し対応
    • 0dai70b (推奨): 現在サイバーセキュリティ分野でSOTA(最高水準)。大量のコンテキストに基づいて複雑な論理推論を行い、半自律的にペネトレーションテストを解決できます。関数呼び出しに対応し、構造化されたメッセージで応答可能。最も遅いですが、品質の大きな飛躍をもたらします。

      • コンテキスト: 64k
      • 16 ビット
      • 関数呼び出し対応
  • messages: モデルに送信するメッセージ。ここでは3つのロールを理解する必要があります。

    • system: 実行すべき指示を含むプロンプト。
    • user: タスクまたは質問。
    • assistant: アシスタントの応答。

    メッセージは以下の形式で送信する必要があります。

root@kitploit:~
  messages = [
{"role": "system", "content": """Eres 0dAI tu función es..."""},
{"role": "user", "content": "0dAI escribe un exploit en C"},
]
  • functions: 対話中に呼び出せる関数。関数の詳細については fn_c で説明します。ここでは単純にJSONを返します。

    関数は以下のように宣言します。

root@kitploit:~
function_shodan = [ {
    "name": "shodan_dork",
    "description": "This tools is used to generate a shodan query",
    "parameter_definitions": {
      "dork": {
        "type": "string",
        "description": "The shodan dork",
        "required": True
      }
    }
  }, ]
  • temperature: モデルの応答のランダム性を制御します。温度が高いほどランダム性が高く、低いほどランダム性が低くなります。

  • stream (bool): 応答をリアルタイムでストリーミングするかどうか。

使用法:

root@kitploit:~
from zerodai import zerodai
messages = []
messages.append({"role": "user", "content": prompt})
messages.append({"role": "system", "content": "Eres 0dAI un asistente de ciberseguridad cuya unica función es..."})
zerodai.inference(model="0dai70b", messages=messages, temperature=0.7, stream=True)

関数呼び出し (fn_c)

function パラメータに渡された関数のリストに基づいて、モデルは推論後に構造化された応答を生成できます。 基本関数

root@kitploit:~
function_shodan = [ {
    "name": "shodan_dork",
    "description": "This tools is used to generate a shodan query",
    "parameter_definitions": {
      "dork": {
        "type": "string",
        "description": "The shodan dork",
        "required": True
      }
    }
  }, ]

この関数に基づくモデルの応答

root@kitploit:~
[
    {
        "tool_name": "shodan_dork",
        "parameters": {
            "dork": "hacked-router-help-sos"
        }
    }
]

これらの関数はマルチステップにも対応します。これはJSONの要素数によって定義されます。マルチステップの応答は次のようになります。

root@kitploit:~
[
    {
        "tool_name": "shodan_dork",
        "parameters": {
            "dork": "hacked-router-help-sos"
        }
    },
    {
        "tool_name": "shodan_dork",
        "parameters": {
            "dork": "\"smb\" \"authentication: disabled\""
        }
    },
      {
        "tool_name": "shodan_dork",
        "parameters": {
            "dork": ".docuword_exploited.txt"
        }
     }
   ]

また、推論と関数が相互にフィードバックする再帰的なロジックも存在します。次のケースを想像してください。

サブドメイン関数

root@kitploit:~
funcion_subdomains = [ {
    "name": "subdominios",
    "description": "This tools is used to collect domains to extract subdomains",
    "parameter_definitions": {
      "domain": {
        "type": "string",
        "description": "The domain",
        "required": True
      }
    }
  }, ]

クローラー関数

root@kitploit:~
crawler_endpoints = [ {
    "name": "crawler",
    "description": "This tools is used to crawle ndpoints for a host",
    "parameter_definitions": {
      "host": {
        "type": "string",
        "description": "The domain",
        "required": True
      }
    }
  }, ]

入力:

openai.com と omegaai.io のサブドメインを取得する必要があります。

出力1. 関数:

root@kitploit:~
[
    {
        "tool_name": "subdomains",
        "parameters": {
            "domain": "openai.com"
        }
    },
    {
        "tool_name": "subdomains",
        "parameters": {
            "domain": "omegaai.io"
        }
    },
]

入力からサブドメインを抽出した後、実行ロジックを適用してサブドメインを取得します...

root@kitploit:~
subdomain1.openai.com
subdomain2.openai.com
subdomain3.openai.com
subdomain1.omegaai.io
subdomain2.omegaai.io
subdomain3.omegaai.io

これをクローラー関数に渡すと、次のようになります。

出力2. 関数:

root@kitploit:~
[
    {
        "tool_name": "crawler",
        "parameters": {
            "domain": "subdominio1.openai.com"
        }
    },
    {
        "tool_name": "crawler",
        "parameters": {
            "domain": "subdominio1.omegaai.io"
        }
    },
   {
        "tool_name": "crawler",
        "parameters": {
            "domain": "subdominio2.openai.com"
        }
    },
    {
        "tool_name": "crawler",
        "parameters": {
            "domain": "subdominio2.omegaai.io"
        }
    },
   {
        "tool_name": "crawler",
        "parameters": {
            "domain": "subdominio3.openai.com"
        }
    },
    {
        "tool_name": "crawler",
        "parameters": {
            "domain": "subdominio3.omegaai.io"
        }
    },
]

fn_c を使用すると、JSON自体をフィルタリングするロジックを経由せずに、ツールのパラメータと名前を直接収集できます。

使用法

root@kitploit:~
from zerodai import zerodai
zerodai.api_auth("TU_API_KEY")
tool_name, parameters = zerodai.fn_c(model_fn=model_fn_call, messages=messages, functions=subdomain_functions, stream=stream, multistep=False)
print(tool_name)
print(parameters)
print(parameters["domain"])

注: 関数の標準は通常OpenAIです。そのため、OpenAIの関数を独自形式に変換する関数を設計しました。例:

root@kitploit:~
tool_name, parameters = cls.fn_c(model_fn=model_fn_call, messages=messages, functions=OpenAI2CommandR(osint_funcs), stream=stream, multistep=False)

エージェント

Zerodaiには、関数と実行モジュールによって拡張可能なエージェントシステムが含まれています。

root@kitploit:~
def exec_module(tool, arguments, multitool=True):
    output = ""
    if tool == "Shodan":
        process = subprocess.Popen(["nmap", "-Pn", next(iter(arguments.values()))], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        for line in iter(process.stdout.readline, b''):
            output += line.decode('utf-8').strip()
            print(line.decode('utf-8').strip())
            
    elif tool == "XSS-Scanner" or tool == "nuclei-http":
      try:
        process = subprocess.Popen(["nuclei", "-t", "dns", next(iter(arguments.values()))], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd="/home/omegaleitatadmin/exllamav2/0dAPI/nuclei-templates/nuclei-templates-9.8.6/")
        for line in iter(process.stdout.readline, b''):
            output += line.decode('utf-8').strip()
            print(line.decode('utf-8').strip())
      except:
        pass
    elif tool == "WAF-tool":
        process = subprocess.Popen(["python3", "whatwaf", "-u", "https://" + next(iter(arguments.values()))], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd="/home/omegaleitatadmin/exllamav2/0dAPI/WhatWaf")
        for line in iter(process.stdout.readline, b''):
            output += line.decode('utf-8').strip()
            print(line.decode('utf-8').strip())
      
    elif tool == "Attack":
        process = subprocess.Popen(["nmap", "-Pn", next(iter(arguments.values()))], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        for line in iter(process.stdout.readline, b''):
            output += line.decode('utf-8').strip()
            print(line.decode('utf-8').strip())
    elif tool == "OSINT":
        ZeroDAI.Osint(next(iter(arguments.values())))
        
    return output

このコードは、使用する関数と並行して記述する必要があります。

root@kitploit:~
python_functions = [ {
    "name": "Shodan",
    "description": "tool for shodan",
    "parameter_definitions": {
      "ip": {
        "type": "string",
        "description": "The ip",
        "required": True
      }
    }
  },
 {
    "name": "nuclei-http",
    "description": "This tools is use for nuclei",
    "parameter_definitions": {
      "target": {
        "type": "string",
        "description": "The domain",
        "required": True
      }
    }
  },
 {
    "name": "WAF-tool",
    "description": "This tools is used for waf",
    "parameter_definitions": {
      "webapp": {
        "type": "string",
        "description": "The webapp",
        "required": True
      }
    }
  },
 {
    "name": "Attack",
    "description": "This tools is used to attack a host",
    "parameter_definitions": {
      "host": {
        "type": "string",
        "description": "The domain",
        "required": True
      }
    }
  }, ]

これにより、マルチステップかつマルチツールな動的エージェントを作成できます。

使用法

root@kitploit:~
zerodai.agent(model="0dai70b", 
                  messages=messages, 
                  model_fn_call="0daifn", 
                  temperature=0.7,
                  functions=python_functions,
                  exec_module=exec_module,
                  exec_module_bool=True, 
                  multistep=True)

exec_module-bool: 実行モジュールを使用するかどうかを指定します(Trueに設定し、実行モジュールを指定しない場合はデフォルトのモジュールが実行されます)。

exec_module: 実行モジュール

functions: 実行モジュールに対応する関数

multistep: 関数呼び出しのモデルイテレーションごとに複数のステップを実行するかどうか

概念実証

4. データ漏洩 PoC

DarkGPT-Osint

5. マルチステップエージェント PoC

DarkGPT-Osint

このAPIには、Shodan、さまざまなデータサービス、Censysなどの統合が含まれており、これらのサービスは0dAIのAPIのみを必要とします。

データ漏洩

zerodai.Osint(prompt)

prompt - LLMが当社のプライベートデータ漏洩ソースを検索し、ユーザーの漏洩情報を提供するための、シンプルな自然言語メッセージ。

Shodan

zerodai.Osint(prompt)

prompt - LLMがShodanで検索を実行し、結果を直接提供するための、シンプルな自然言語メッセージ。

Rubber Ducky

zerodai.rubberducky_gen(prompt)

prompt - LLMが有効なRubber Duckyペイロードを生成するための、シンプルな自然言語メッセージ。

このAPIは、Luijait(Luis Javier Navarrete Lozano)によって0dAIの下で完全に開発されました。ここで説明されている知識を他の論文で使用する場合は、著者へのクレジットが必要です。第一にLuijait、第二に0dAIと明記してください。

ツールをダウンロード