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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
dc-sonar — ユーザーアカウントに関連するセキュリティリスクをADドメインで分析する | Kitploit
ツール/GitHubGitHub/st1lly/dc-sonar
パスワードクラッキング脆弱性分析学習と教育
GitHubst1lly/dc-sonar

dc-sonar

ユーザーアカウントに関連するセキュリティリスクをADドメインで分析する

リポジトリを見るウェブサイト
64913年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

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

DC Sonar コミュニティ

リポジトリ

プロジェクトは以下のリポジトリで構成されています:

  • dc-sonar-frontend
  • dc-sonar-user-layer
  • dc-sonar-workers-layer
  • ntlm-scrutinizer

免責事項

これは教育目的専用です。

本番のActive Directory (AD) ドメインでの使用は避けてください。

いかなる貢献者も、その使用について一切の責任を負いません。

ソーシャルメディア

Red Teamコミュニティの Telegramチャンネル をチェックしてください。

コンテンツ

  1. 説明
    1. アーキテクチャ
    2. 機能
  2. インストール
    1. Docker
    2. dpkgを使用した手動インストール
  3. スタイルガイド
  4. 開発環境のデプロイ
    1. Docker
    2. WindowsホストとUbuntu Serverゲストを使用した手動
      1. 仮想マシンのセットアップ
      2. Windowsの設定
      3. 共有フォルダの設定
      4. Ubuntu Serverの設定
      5. レイヤー

説明

アーキテクチャ

視覚的な説明については、diagrams.net ツールを使用して ダイアグラムファイル を開いてください。

アプリは以下で構成されています:

  • dc-sonar-frontend はユーザーWebインターフェースのフロントエンド部分で、以下に基づいています:
    • Angular
    • Angular Material
  • dc-sonar-user-layer はWebアプリのバックエンド部分で、以下に基づいています:
    • Python 3.10
    • Django
    • Django ORM
    • Django REST framework
    • Celery
    • RabbitMQ
    • PostgreSQL
  • dc-sonar-workers-layer は分析プロセスを実行・実行するロジックレイヤーで、以下に基づいています:
    • Python 3.10
    • SQLAlchemy
    • Alembic
    • APScheduler
    • RabbitMQ
    • PostgreSQL
  • ntlm-scrutinizer はREST APIを備えたNTLMハッシュの実行ツールで、以下に基づいています:
    • Python 3.10
    • FastAPI
    • hashcat
    • impacket

機能

DC Sonar Community は、アカウントに関連するセキュリティリスクのためにADドメインを分析する機能を提供します:

  • アプリでADドメインの分析を登録

    register_ad

  • ドメイン分析プロセスのステータスを確認

    domains_analyze_statuses

  • 設定されたADドメインからNTLMハッシュをダンプし、ブルートフォースして脆弱なパスワードを持つアカウントをリストアップ

    weak_passwords

  • ADドメインアカウントを分析して、パスワードが無期限のものをリストアップ

    no_expired_passwords

  • ADドメインアカウントをNTLMパスワードハッシュで分析し、パスワードが再利用されているアカウントとドメインを特定

    reused_passwords

インストール

Docker

準備中 ...

dpkgを使用した手動インストール

クリーンな Ubuntu Server 22.04 と、ユーザー名 "user" のアカウントがあることを前提としています。

アプリは /home/user/dc-sonar にインストールされます。

今後のリリースでは、より柔軟なインストールが可能になるかもしれません。

最新の配布物 から dc_sonar_NNNN.N.NN-N_amd64.tar.gz をサーバーにダウンロードします。

ファイルを展開するフォルダを作成します:

root@kitploit:~
mkdir dc_sonar_NNNN.N.NN-N_amd64

ダウンロードしたアーカイブを展開します:

root@kitploit:~
tar -xvf dc_sonar_NNNN.N.NN-N_amd64.tar.gz -C dc_sonar_NNNN.N.NN-N_amd64

展開したファイルがあるフォルダに移動します:

root@kitploit:~
cd dc_sonar_NNNN.N.NN-N_amd64/

PostgreSQLをインストールします:

root@kitploit:~
sudo bash install_postgresql.sh

RabbitMQをインストールします:

root@kitploit:~
sudo bash install_rabbitmq.sh

依存関係をインストールします:

root@kitploit:~
sudo bash install_dependencies.sh

ppa:deadsnakes/ppa リポジトリの追加確認を求められます。Enter を押してください。

dc-sonar自体をインストールします:

root@kitploit:~
sudo dpkg -i dc_sonar_NNNN.N.NN-N_amd64.deb

Django管理者ユーザー作成のための情報を求められます。ユーザー名、メールアドレス、パスワードを入力してください。

自己署名SSL証明書作成のための情報を2回求められます。必要な情報を入力してください。

https://localhost を開く

インストールプロセス中に設定したDjango管理者の認証情報を入力します。

スタイルガイド

STYLE_GUIDE.md を参照してください。

開発環境のデプロイ

Docker

準備中 ...

WindowsホストとUbuntu Serverゲストを使用した手動

この場合、Windowsホスト上でコードを編集し、Ubuntuゲスト上でPythonコードを実行する環境をセットアップします。

仮想マシンのセットアップ

2 CPU、2048 MB RAM、10GB SSDの仮想マシンを Ubuntu Server 22.04 ISOを使用して VirtualBox で 作成 します。

UbuntuインストーラーがVMインストール前にUbuntuインストーラーの更新を求めてきた場合 - 同意します。

OpenSSHサーバーのインストールを選択します。

VirtualBoxのポートフォワーディングルール:

Windowsの設定

Python 3.10.5 をダウンロード してインストールします。

DC Sonarプロジェクト用のフォルダを作成します。

Git for Windows を使用してプロジェクトフォルダに移動します:

root@kitploit:~
cd '{PATH_TO_FOLDER}'

dc-sonar-user-layer のWindowsインストール手順を実行します。

dc-sonar-workers-layer のWindowsインストール手順を実行します。

ntlm-scrutinizer のWindowsインストール手順を実行します。

dc-sonar-frontend のWindowsインストール手順を実行します。

共有フォルダの設定

「Open VirtualBox」から「Reboot VM」までの 手順 を実行します。ただし、以下の画像のように、VM VirtualBoxに「自動マウント」付きの共有フォルダを追加してください:

vm_shared_folders

再起動後、次のコマンドを実行します:

root@kitploit:~
sudo adduser $USER vboxsf

使用しているユーザーアカウントでログアウトしてログインします。

/home/user ディレクトリで、マウントされたフォルダを使用できます:

root@kitploit:~
ls -l
root@kitploit:~
Output:
total 12
drwxrwx--- 1 root vboxsf 4096 Jul 19 13:53 dc-sonar-user-layer
drwxrwx--- 1 root vboxsf 4096 Jul 19 10:11 dc-sonar-workers-layer
drwxrwx--- 1 root vboxsf 4096 Jul 19 14:25 ntlm-scrutinizer

Ubuntu Serverの設定

PostgreSQLの設定

Ubuntu 20.04に PostgreSQLをインストール します:

root@kitploit:~
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql.service

adminデータベースアカウントを作成します:

root@kitploit:~
sudo -u postgres createuser --interactive
root@kitploit:~
Output:
Enter name of role to add: admin
Shall the new role be a superuser? (y/n) y

dc_sonar_workers_layerデータベースアカウントを作成します:

root@kitploit:~
sudo -u postgres createuser --interactive
root@kitploit:~
Output:
Enter name of role to add: dc_sonar_workers_layer
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n

dc_sonar_user_layerデータベースアカウントを作成します:

root@kitploit:~
sudo -u postgres createuser --interactive
root@kitploit:~
Output:
Enter name of role to add: dc_sonar_user_layer
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n

back_workers_dbデータベースを作成します:

root@kitploit:~
sudo -u postgres createdb back_workers_db

web_app_dbデータベースを作成します:

root@kitploit:~
sudo -u postgres createdb web_app_db

psqlを実行します:

root@kitploit:~
sudo -u postgres psql

adminアカウントのパスワードを設定します:

root@kitploit:~
ALTER USER admin WITH PASSWORD '{YOUR_PASSWORD}';

dc_sonar_workers_layerアカウントのパスワードを設定します:

root@kitploit:~
ALTER USER dc_sonar_workers_layer WITH PASSWORD '{YOUR_PASSWORD}';

dc_sonar_user_layerアカウントのパスワードを設定します:

root@kitploit:~
ALTER USER dc_sonar_user_layer WITH PASSWORD '{YOUR_PASSWORD}';

back_workers_dbデータベースに対するdc_sonar_workers_layerアカウントのCRUD権限を付与します:

root@kitploit:~
\c back_workers_db
GRANT CONNECT ON DATABASE back_workers_db to dc_sonar_workers_layer;
GRANT USAGE ON SCHEMA public to dc_sonar_workers_layer;
GRANT ALL ON ALL TABLES IN SCHEMA public TO dc_sonar_workers_layer;
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO dc_sonar_workers_layer;
GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO dc_sonar_workers_layer;

web_app_dbデータベースに対するdc_sonar_user_layerアカウントのCRUD権限を付与します:

root@kitploit:~
\c web_app_db
GRANT CONNECT ON DATABASE web_app_db to dc_sonar_user_layer;
GRANT USAGE ON SCHEMA public to dc_sonar_user_layer;
GRANT ALL ON ALL TABLES IN SCHEMA public TO dc_sonar_user_layer;
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO dc_sonar_user_layer;
GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO dc_sonar_user_layer;

psqlを終了します:

root@kitploit:~
\q

pg_hba.confファイルを開きます:

root@kitploit:~
sudo nano /etc/postgresql/12/main/pg_hba.conf

ホストマシンからPostgreSQLへの接続を許可する行を追加し、変更を保存してファイルを閉じます:

root@kitploit:~
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             admin           0.0.0.0/0               md5

postgresql.confファイルを開きます:

root@kitploit:~
sudo nano /etc/postgresql/12/main/postgresql.conf

以下のパラメータを変更し、変更を保存してファイルを閉じます:

root@kitploit:~
listen_addresses = 'localhost,10.0.2.15'
shared_buffers = 512MB
work_mem = 5MB
maintenance_work_mem = 100MB
effective_cache_size = 1GB

PostgreSQLサービスを再起動します:

root@kitploit:~
sudo service postgresql restart

PostgreSQLサービスのステータスを確認します:

root@kitploit:~
service postgresql status

必要に応じてログファイルを確認します:

root@kitploit:~
tail -f /var/log/postgresql/postgresql-12-main.log

これで、Windowsから DBeaver などのクライアントを使用して、adminアカウントで作成したデータベースに接続できます。

RabbitMQの設定

スクリプト を使用してRabbitMQをインストールします。

管理プラグインを有効にします:

root@kitploit:~
sudo rabbitmq-plugins enable rabbitmq_management

RabbitMQ管理者アカウントを作成します:

root@kitploit:~
sudo rabbitmqctl add_user admin {YOUR_PASSWORD}

作成したユーザーに完全な管理UIとHTTP APIアクセスのタグを付けます:

root@kitploit:~
sudo rabbitmqctl set_user_tags admin administrator

管理UIを http://localhost:15672/ で開きます。

Python3.10のインストール

システムが最新であり、必要なパッケージがインストールされていることを確認します:

root@kitploit:~
sudo apt update && sudo apt upgrade -y

カスタムPPAを追加するために必要な依存関係をインストールします:

root@kitploit:~
sudo apt install software-properties-common -y

次に、dead snakes PPAをAPTパッケージマネージャーのソースリストに追加します:

root@kitploit:~
sudo add-apt-repository ppa:deadsnakes/ppa

Python 3.10をダウンロードします:

root@kitploit:~
sudo apt install python3.10=3.10.5-1+focal1

依存関係をインストールします:

root@kitploit:~
sudo apt install python3.10-dev=3.10.5-1+focal1 libpq-dev=12.11-0ubuntu0.20.04.1 libsasl2-dev libldap2-dev libssl-dev

venvモジュールをインストールします:

root@kitploit:~
sudo apt-get install python3.10-venv

インストールされたPythonのバージョンを確認します:

root@kitploit:~
python3.10 --version

Output:
Python 3.10.5
ホスト

ドメインコントローラーのIPアドレスを /etc/hosts に追加します

root@kitploit:~
sudo nano /etc/hosts

レイヤー

venvの設定

VM VirtualBoxが共有フォルダ内にvenvを作成することを許可しないため、一つ上のレベルにvenvを作成する必要があります。

共有フォルダがあるホームディレクトリに移動します:

root@kitploit:~
cd /home/user

Ubuntu上でdc-sonar-user-layerの デプロイ手順 を実行します。

Ubuntu上でdc-sonar-workers-layerの デプロイ手順 を実行します。

Ubuntu上でntlm-scrutinizerの 実行準備手順 を実行します。

モジュールの設定

Ubuntu上でdc-sonar-user-layerの 設定手順 を実行します。

Ubuntu上でdc-sonar-workers-layerの 設定手順 を実行します。

Ubuntu上でntlm-scrutinizerの 実行準備手順 を実行します。

実行

Ubuntu上でntlm-scrutinizerの 実行手順 を実行します。

Ubuntu上でdc-sonar-user-layerの 実行手順 を実行します。

Ubuntu上でdc-sonar-workers-layerの 実行手順 を実行します。

Windows上でdc-sonar-frontendの 実行手順(開発) を実行します。

Windowsホストのブラウザで https://localhost:8000/admin/ を開き、自己署名証明書に同意します。

Windowsホストのブラウザで https://localhost:4200/ を開き、作成したDjangoユーザーとしてログインします。

ツールをダウンロード
名前プロトコルホストIPホストポートゲストIPゲストポート
SSHTCP127.0.0.1222210.0.2.1522
RabbitMQ management consoleTCP127.0.0.11567210.0.2.1515672
Django ServerTCP127.0.0.1800010.0.2.158000
NTLM ScrutinizerTCP127.0.0.1500010.0.2.155000
PostgreSQLTCP127.0.0.12543210.0.2.155432