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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
miniupnpd_poc — miniupnpd <= v2.1 向けの範囲外読み取り PoC | Kitploit
ツール/GitHubGitHub/b1ack0wl/miniupnpd_poc
組み込みシステムセキュリティIoTセキュリティ脆弱性分析エクスプロイトデータ流出バイナリエクスプロイト
GitHubb1ack0wl/miniupnpd_poc

miniupnpd_poc

miniupnpd <= v2.1 向けの範囲外読み取り PoC

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

人気

すべて見る →

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

すべてのツールを探索

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

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

Miniupnpd <=v2.1 の領域外読み取り脆弱性 (PoC)

  • この脆弱性はminiupnpdのmasterブランチで修正されています (https://github.com/miniupnp/miniupnp/commit/bec6ccec63cadc95655721bc0e1dd49dac759d94)。
  • この脆弱性は、obj->path が526バイトを超えるコールバックURIを含む SUBSCRIBE リクエストを送信することで引き起こされます。
  • 根本原因は、snprintf() の戻り値を検証していないことです。snprintf() は実際にコピーしたバイト数ではなく、コピー できたであろう バイト数を返すためです。
  • 2019年1月25日時点で、このリポジトリ内のPoCはGoogle Wifiに対して正常にテストされています。
    • miniupnpd を利用する他のデバイスも影響を受ける可能性があります。

根本原因 (upnpevents.c)

root@kitploit:~
static void upnp_event_prepare(struct upnp_event_notify * obj)
{

	obj->buffersize = 1024; /* Static Buffer Size */
	obj->buffer = malloc(obj->buffersize);
	[...]
	obj->tosend = snprintf(obj->buffer, obj->buffersize, notifymsg,
	                       obj->path, obj->addrstr, obj->portstr, l+2,
	                       obj->sub->uuid, obj->sub->seq,
	                       l, xml);
	obj->state = ESending;

static void upnp_event_send(struct upnp_event_notify * obj)
{
	int i;
	i = send(obj->s, obj->buffer + obj->sent, obj->tosend - obj->sent, 0);

snprintf() の man ページエントリ

root@kitploit:~
RETURN VALUE

Upon successful return, functions return the number of characters printed 
(excluding the null byte used to end output to strings).

The functions snprintf() and vsnprintf() do not write more than size bytes 
(including the terminating  null byte ('\0')).  If the output was truncated 
due to this limit, then the return value is the number of characters 
(excluding the terminating null byte) which would have been written to the 
final string if enough space had been available. Thus, a return value of size 
or more means that the output was truncated.

使用方法

root@kitploit:~
usage: miniupnpd_poc.py [-h] [--callback_ip CALLBACK_IP]
                        [--callback_port CALLBACK_PORT] [--timeout TIMEOUT]
                        [--leak_amount LEAK_AMOUNT]
                        target_ip target_port

Miniupnpd <= v2.1 read out-of-bounds vulnerability

positional arguments:
  target_ip             IP address of vulnerable device.
  target_port           Target Port.

optional arguments:
  -h, --help            show this help message and exit
  --callback_ip CALLBACK_IP
                        Local IP address for httpd listener. (default: None)
  --callback_port CALLBACK_PORT
                        Local port for httpd listener. (default: None)
  --timeout TIMEOUT     Timeout for http requests (seconds). (default: 5)
  --leak_amount LEAK_AMOUNT
                        Amount of arbitrary heap data to leak (in Kb).
                        (default: 1)

ビデオ

asciicast

  • 0wl
ツールをダウンロード