Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
Octopus — PythonとPowerShellに基づくオープンソースの運用前C2サーバー | Kitploit
ツール/GitHubGitHub/mhaskar/octopus
暗号化/復号化ツールペイロード生成情報収集ペネトレーションテストコマンド&コントロールレッドチーミング
GitHubmhaskar/octopus

Octopus

PythonとPowerShellに基づくオープンソースの運用前C2サーバー

リポジトリを見る
763155205年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

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

Octopus とは?

Octopus は、オープンソースのプレオペレーション C2 サーバーであり、Python ベースで、HTTP/S を介して Octopus PowerShell エージェントを制御できます。

Octopus の主な目的は、実際のレッドチーム作戦を開始する前に使用することです。フル装備の兵器庫とインフラを投入する代わりに、まず Octopus を使用してターゲットを攻撃し、情報を収集してから実際のレッドチーム作戦を開始できます。

Octopus は非常にシンプルな方法で動作し、完全に暗号化されたチャネルを介してコマンドを実行し、C2 と情報を交換します。そのため、ほとんどの AV、エンドポイント保護、ネットワーク監視ソリューションからは目立たず、検出されにくくなっています。

Octopus の優れた機能の 1 つは ESA (Endpoint Situational Awareness) です。これは、ターゲットに関する重要な情報を収集し、作戦中に直面するターゲットネットワークエンドポイントの理解を深めるのに役立ちます。これにより、この情報に基づいて実際の作戦をカスタマイズする機会が得られます。

Octopus は C2 との通信時にステルス性と隠密性を保つように設計されており、PowerShell エージェントと C2 サーバー間の暗号化チャネルにはデフォルトで AES-256 を使用します。また、ドメインの有効な証明書を提供し、Octopus C2 サーバーを設定して SSL/TLS を使用することもできます。

Octopus の主な機能

Octopus には、実際に完全な兵器庫やツール、テクニックを展開する前に、今後のエンゲージメントに関する洞察を得ることができるようにするための多くの機能が搭載されています。例:

  • HTTP/S を介したエージェントの制御。
  • システムコマンドの実行。
  • ファイルのダウンロード/アップロード。
  • 外部 PowerShell モジュールのロード。
  • C2 とエージェント間の暗号化チャネル(AES-256)の使用。
  • 目立たない手法を使用したコマンド実行と結果転送。
  • ターゲットごとのカスタムおよび複数リスナーの作成。
  • 異なるタイプのペイロードの生成。
  • PowerShell 2.0 以降のすべての Windows バージョンをサポート。
  • powershell.exe プロセスに触れずに Octopus Windows 実行可能エージェントを実行。
  • エンドポイントから自動的に情報を収集(エンドポイント状況認識)機能。

必要条件

Octopus のすべての要件は以下でインストールできます:

pip install -r requirements.txt

シェルコード機能とスプーフィング引数エージェントを使用するには、Linux 用の nasm と 'mingw-w64' コンパイラをインストールする必要があります。

Debian ベースのディストリビューションでは、以下を使用して nasm をインストールできます:

apt install nasm

また、Debian ベースのディストリビューションでは、以下を使用して mingw-w64 をインストールできます:

apt install mingw-w64

Octopus は次のオペレーティングシステムでテストされています:

  • Ubuntu (18.04)
  • Ubuntu (16.04)
  • Kali Linux (2019.2)

また、C# ソースを問題なくコンパイルできるようにするために、mono をインストールする必要があります。

Octopus は C# ソースをコンパイルするために mono-csc バイナリに依存しており、kali および ubuntu 16.04 でテスト済みの以下のコマンド apt install mono-devel でインストールできます。

mono をインストールしなくても Octopus を使用できますが、generate_exe コマンドは使用できません。

また、C# のコンパイルは、SHA1 ハッシュ a43ed886b68c6ee913da85df9ad2064f1d81c470 を持つ System.Management.Automation.dll アセンブリに依存することに注意してください。

Octopus の使用中に問題が発生した場合は、バグレポート を送信してください。

インストール

まず、以下のコマンドを使用して Octopus の最新バージョンをダウンロードしてください:

git clone https://github.com/mhaskar/Octopus/

次に、以下のコマンドを使用して要件をインストールする必要があります:

pip install -r requirements.txt

その後、以下のコマンドを実行して Octopus サーバーを起動できます:

./octopus.py

実行すると、次のような画面が表示されます:

┌─[askar@hackbook]─[/opt/redteaming/Octopus]
└──╼ $python3 octopus.py



      ___           ___                       ___           ___         ___           ___
     /  /\         /  /\          ___        /  /\         /  /\       /__/\         /  /\
    /  /::\       /  /:/         /  /\      /  /::\       /  /::\      \  \:\       /  /:/_
   /  /:/\:\     /  /:/         /  /:/     /  /:/\:\     /  /:/\:\      \  \:\     /  /:/ /\
  /  /:/  \:\   /  /:/  ___    /  /:/     /  /:/  \:\   /  /:/~/:/  ___  \  \:\   /  /:/ /::\
 /__/:/ \__\:\ /__/:/  /  /\  /  /::\    /__/:/ \__\:\ /__/:/ /:/  /__/\  \__\:\ /__/:/ /:/\:\
 \  \:\ /  /:/ \  \:\ /  /:/ /__/:/\:\   \  \:\ /  /:/ \  \:\/:/   \  \:\ /  /:/ \  \:\/:/~/:/
  \  \:\  /:/   \  \:\  /:/  \__\/  \:\   \  \:\  /:/   \  \::/     \  \:\  /:/   \  \::/ /:/
   \  \:\/:/     \  \:\/:/        \  \:\   \  \:\/:/     \  \:\      \  \:\/:/     \__\/ /:/
    \  \::/       \  \::/          \__\/    \  \::/       \  \:\      \  \::/        /__/:/
     \__\/         \__\/                     \__\/         \__\/       \__\/         \__\/


                    v1.2 stable !


 Octopus C2 | Control your shells


Octopus >>

使用方法

Octopus は非常に簡単に使用できます。リスナーを起動し、そのリスナーの情報に基づいてエージェントを生成するだけです。

必要な数のリスナーを生成でき、それらに接続するエージェントとの対話を開始できます。

プロファイル設定

Octopus を使用する前に、URL 処理プロファイルを設定する必要があります。これにより C2 の動作と機能が制御されます。Octopus は HTTP ベースの C2 であるため、URL に依存して接続を処理し、URL が攻撃中のネットワーク内で署名や IoC として機能しないように保証します。URL は必要に応じて簡単にカスタマイズおよび名前変更できます。

現在、プロファイル設定は URL 処理、自動キル値、およびヘッダーのみをサポートしています。

プロファイルの設定

プロファイルの設定を開始するには、profile.py ファイルを編集する必要があります。このファイルには、いくつかの主要な変数が含まれています:

  • file_reciever_url: ファイルのダウンロードを処理します。
  • report_url: ESA レポートを処理します。
  • command_send_url: ターゲットに送信されるコマンドを処理します。
  • command_receiver_url: ターゲットで実行されるコマンドを処理します。
  • first_ping_url: ターゲットからの最初の接続を処理します。
  • server_response_header: すべての応答に表示されるヘッダーです。
  • auto_kill: C2 との接続が N 回失敗した後にエージェントが強制終了されるタイミングを制御する変数です。

例:

#!/usr/bin/python3

# this is the web listener profile for Octopus C2
# you can customize your profile to handle a specific URLs to communicate with the agent
# TODO : add the ability to customize the request headers

# handling the file downloading
# Ex : /anything
# Ex : /anything.php
file_receiver_url = "/messages"


# handling the report generation
# Ex : /anything
# Ex : /anything.php
report_url = "/calls"

# command sending to agent (store the command will be executed on a host)
# leave <hostname> as it with the same format
# Ex : /profile/<hostname>
# Ex : /messages/<hostname>
# Ex : /bills/<hostname>
command_send_url = "/view/<hostname>"


# handling the executed command
# Ex : /anything
# Ex : /anything.php
command_receiver_url = "/bills"


# handling the first connection from the agent
# Ex : /anything
# Ex : /anything.php
first_ping_url = "/login"

# will return in every response as Server header
server_response_header = "nginx"

# will return white page that includes HTA script
mshta_url = "/hta"

# auto kill value after n tries

auto_kill = 10


エージェントとリスナーはこのプロファイルを使用して相互に通信するように設定されます。次に、リスナーを作成する方法を知る必要があります。

リスナー

Octopus には 2 つの主要なリスナー、「http リスナー」と「https リスナー」があり、2 つのリスナーのオプションはほぼ同一です。

HTTP リスナー:

listen_http コマンドは、起動時に次の引数を取ります:

  • BindIP リスナーが使用する IP アドレスを指定します。
  • BindPort リッスンするポートを指定します。
  • Hostname ペイロードのリクエストに使用されるホスト名。
  • Interval エージェントがコマンドを確認するまで待機する秒数。
  • URL ペイロードをホストするページの名前。
  • Listener_name 使用するリスナー名。

listen_http コマンドを実行すると、その例も表示されます:

Octopus >>listen_http
[-] Please check listener arguments !
Syntax  : listen_http BindIP BindPort hostname interval URL listener_name
Example (with domain) : listen_http 0.0.0.0 8080 myc2.live 5 comments.php op1_listener
Example (without domain) : listen_http 0.0.0.0 8080 172.0.1.3 5 profile.php op1_listener

##########
Options info :

BindIP  		IP address that will be used by the listener
BindPort  		port you want to listen on
Hostname 		will be used to request the payload from
Interval 		how may seconds that agent will wait before check for commands
URL  			page name will hold the payload
Listener_name  	listener name to use

Octopus >>

次のコマンドを使用してリスナーを起動できます:

listen_http 0.0.0.0 8080 192.168.178.1 5 page.php operation1

次の結果が返されます:

Octopus >>listen_http 0.0.0.0 8080 192.168.178.1 5 page.php operation1
Octopus >> * Serving Flask app "core.weblistener" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off

Octopus >>

リスナーが正常に起動されました。listeners コマンドを使用してすべてのリスナーを表示できます:

Octopus >>listeners


Name        IP         Port  Host             Interval  Path      SSL
----------  -------  ------  -------------  ----------  --------  -----
operation1  0.0.0.0    8080  192.168.178.1           5  page.php  False


Octopus >>

HTTPS リスナー:

HTTPS リスナーを作成するには、次のように listen_https コマンドを使用できます:

Octopus >>listen_https
[-] Please check listener arguments !
Syntax  : listen_https BindIP BindPort hostname interval URL listener_name certficate_path key_path
Example (with domain) : listen_https 0.0.0.0 443 myc2.live 5 login.php op1_listener certs/cert.pem certs/key.pem
Octopus >>listen_https 0.0.0.0 443 myc2.live 5 login.php darkside_operation certs/cert.pem certs/key.pem
SSL listener started !
[+]darkside_operation Listener has been created
Octopus >> * Serving Flask app "core.weblistener" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off

Octopus >>
ツールをダウンロード