Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
miniupnpd_poc — miniupnpd <= v2.1용 경계를 벗어난 읽기(Out-of-Bounds Read) PoC | Kitploit
도구/GitHubGitHub/b1ack0wl/miniupnpd_poc
Embedded Systems SecurityIoT SecurityVulnerability AnalysisExploitationData ExfiltrationBinary Exploitation
GitHubb1ack0wl/miniupnpd_poc

miniupnpd_poc

miniupnpd <= v2.1용 경계를 벗어난 읽기(Out-of-Bounds Read) PoC

저장소 보기
2187년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Miniupnpd <=v2.1 읽기 범위 초과 취약점 (PoC)

  • 이 취약점은 miniupnpd의 master 브랜치에서 수정되었습니다 (https://github.com/miniupnp/miniupnp/commit/bec6ccec63cadc95655721bc0e1dd49dac759d94).
  • 이 취약점은 콜백 URI obj->path가 526바이트보다 큰 SUBSCRIBE 요청을 전송할 때 트리거됩니다.
  • 근본 원인은 snprintf()의 반환 값을 검증하지 않기 때문입니다. snprintf()는 실제로 복사한 바이트 수가 아니라 복사할 수 있었던 바이트 수를 반환하기 때문입니다.
  • 2019년 1월 25일 기준으로 이 repro에 포함된 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() 맨 페이지 항목

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

도구 다운로드