Skip to main content

The Universal Plug and Play (UPnP) Fuzzer

Project description

UPnPFuzz

UPnPFuzz is a specialized fuzzing tool designed for testing and discovering vulnerabilities within devices and software that implement the Universal Plug and Play (UPnP) protocol.

Community

Join community on Embedded Exploitation Discord.

Installation

Use of PyPI

pip install upnpfuzz

Local Dev

git clone https://github.com/threat9/upnpfuzz
cd upnpfuzz
python -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
python setup.py install

Usage

Discover UPnP devices

> upnpfuzz --discover
                        upnpfuzz (v1.0.0) by threat9
[*] Using network timeout for discovery: 5
[*] Discovering UPnP devices...
[+] 192.168.2.1:1900 - http://192.168.2.1:8000/ssdp/desc-DSM-lbr0.xml - Synology/DSM/192.168.2.1
[+] 192.168.2.1:1900 - http://169.254.70.46:8000/ssdp/desc-DSM-eth0.xml - Synology/DSM/169.254.70.46
[+] 192.168.2.1:1900 - http://:8000/ssdp/desc-DSM-bwlan1.xml - Synology/DSM/
[+] 192.168.2.1:1900 - http://:8000/ssdp/desc-DSM-bwlan0.xml - Synology/DSM/
[+] 192.168.2.1:1900 - http://192.168.2.1:46560/rootDesc.xml - Synology DSM UPnP/1.1 MiniUPnPd/2.

Discover UPnP devices using custom network timeout

> upnpfuzz --discover --network-timeout 10
                        upnpfuzz (v1.0.0) by threat9
[*] Using network timeout for discovery: 10.0
[*] Discovering UPnP devices...
[+] 192.168.2.1:1900 - http://192.168.2.1:8000/ssdp/desc-DSM-lbr0.xml - Synology/DSM/192.168.2.1
[+] 192.168.2.1:1900 - http://169.254.70.46:8000/ssdp/desc-DSM-eth0.xml - Synology/DSM/169.254.70.46
[+] 192.168.2.1:1900 - http://:8000/ssdp/desc-DSM-bwlan1.xml - Synology/DSM/
[+] 192.168.2.1:1900 - http://:8000/ssdp/desc-DSM-bwlan0.xml - Synology/DSM/
[+] 192.168.2.1:1900 - http://192.168.2.1:46560/rootDesc.xml - Synology DSM UPnP/1.1 MiniUPnPd/2.0

Targeting SSDP - Simple Service Discovery Protocol

Specifying the target address via --ssdp parameter.

upnpfuzz --ssdp 192.168.2.1:1900 --raw

Targeting SOAP - UPnP Control Messaging

Specifying the target address via --soap parameter.

upnpfuzz --soap http://192.168.2.1:46560/rootDesc.xml --raw

Targeting ESP - Event Subscription

Specifying the target address via --esp parameter.

upnpfuzz --esp http://192.168.2.1:46560/rootDesc.xml --raw

Generating requests without fuzzing

upnpfuzz --ssdp 192.168.2.1:1900 --raw

Fuzzing for command injections

upnpfuzz --ssdp 192.168.2.1:1900 --injection

Fuzzing for overflows

upnpfuzz --ssdp 192.168.2.1:1900 --overflow

Fuzzing using radamsa

upnpfuzz --ssdp 192.168.2.1:1900 --radamsa

Fuzzing using random strategy (injection/overflow/radamsa)

upnpfuzz --ssdp 192.168.2.1:1900 --fuzz

Additional Parameters

Use of --delay parameter. Specifying the amount of seconds that should be waited after sending every request.

upnpfuzz --esp http://192.168.2.1:46560/rootDesc.xml --fuzz --delay 1

Use of --alive-url parameter. The url is checked after sending every request to verify if the target is still alive.

upnpfuzz --esp http://192.168.2.1:46560/rootDesc.xml --fuzz --alive-url http://192.168.2.1:46560/rootDesc.xml

Use of --crash-dir parameter. Specifying the directory where the crashes should be saved.

upnpfuzz --esp http://192.168.2.1:46560/rootDesc.xml --fuzz --alive-url http://192.168.2.1:46560/rootDesc.xml --crash-dir /tmp/crashes/

Use of --restart-cmd. Specifying the command (or script) that should be executed once the target crashed in order to restart the target.

upnpfuzz --esp http://192.168.2.1:46560/rootDesc.xml --fuzz --alive-url http://192.168.2.1:46560/rootDesc.xml --restart-cmd /tmp/restart_target.sh

Use of --radamsa-path. Specifying the path to radamsa binary.

upnpfuzz --esp http://192.168.2.1:46560/rootDesc.xml --fuzz --radamsa-path /Users/user/git/radamsa/bin/radamsa

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

upnpfuzz-1.0.5-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file upnpfuzz-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: upnpfuzz-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for upnpfuzz-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d687a38f7b127b631ec549cc931c23e10f1c9b58b34a1fc17c64ba9f57ddebde
MD5 4df6bea401668fb6c42438615a55fc9e
BLAKE2b-256 073ad818ce81fc64ba2a1624cef89e5d9e7d147de0dba4646e0a0d3ae0ecaf11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page