Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
miniupnpd_poc — PoC di lettura fuori dai limiti per miniupnpd <= v2.1 | Kitploit
Strumenti/GitHubGitHub/b1ack0wl/miniupnpd_poc
Sicurezza Sistemi EmbeddedSicurezza IoTAnalisi delle VulnerabilitàExploitEsfiltrazione DatiBinary Exploitation
GitHubb1ack0wl/miniupnpd_poc

miniupnpd_poc

PoC di lettura fuori dai limiti per miniupnpd <= v2.1

Vedi Repository
2187 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

Vulnerabilità di lettura fuori dai limiti in Miniupnpd <=v2.1 (PoC)

  • Questa vulnerabilità è stata corretta nel ramo master di miniupnpd (https://github.com/miniupnp/miniupnp/commit/bec6ccec63cadc95655721bc0e1dd49dac759d94).
  • La vulnerabilità viene attivata inviando una richiesta SUBSCRIBE con un URI di callback obj->path superiore a 526 byte.
  • La causa principale è dovuta alla mancata validazione del valore di ritorno di snprintf(), poiché snprintf() restituisce il valore di quanti byte avrebbe potuto copiare, non quanti byte ne ha effettivamente copiati.
  • A partire dal Jan-25-2019 la PoC all'interno di questa repro è stata testata con successo contro Google Wifi.
    • Anche altri dispositivi che utilizzano miniupnpd potrebbero essere vulnerabili.

Causa principale (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);

Voce della pagina di manuale per 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.

Utilizzo

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)

Video

asciicast

  • 0wl
Scarica lo strumento