• Stars
    star
    158
  • Rank 232,459 (Top 5 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple script for discovery and analysis of UPnP servers

upnp_info.py

Purpose

This script was written so that anyone can easily find the UPnP servers on their network. While tools like this have and do exist, none are as simple as downloading a file and executing it via Python.

Dependencies

This script depends on 'requests'. You can install requests via pip:

pip install requests

Usage

The script takes no input and is simply executed via python:

python upnp_info.py

Troubleshooting

upnp_info.py needs to be able access UDP port 1900. If you aren't getting any results but you think you should be then check your firewall.

Features

upnp_info.py discovers all UPnP servers within multicast range

$ python upnp_info.py 
[+] Discovering UPnP locations
[+] Discovery complete
[+] 11 locations found:
	-> http://192.168.0.254:49152/wps_device.xml
	-> http://192.168.1.217:49153/description.xml
	-> http://192.168.1.217:35848/rootDesc.xml
	-> http://192.168.1.217:32469/DeviceDescription.xml
	-> http://192.168.1.217:49152/tvdevicedesc.xml
	-> http://192.168.1.217:35439/rootDesc.xml
	-> http://192.168.1.251:49451/luaupnp.xml
	-> http://192.168.1.1:45973/rootDesc.xml
	-> http://192.168.1.1:1990/WFADevice.xml
	-> http://192.168.1.1:1901/root.xml
	-> http://192.168.1.217:8200/rootDesc.xml

It parses the service's XML and displays it for the user:

[+] Loading http://192.168.1.217:49153/description.xml...
	-> Server String: Linux/4.4.0-36-generic, UPnP/1.0, MediaTomb/0.12.2
	==== XML Attributes ===
	-> Device Type: urn:schemas-upnp-org:device:MediaServer:1
	-> Friendly Name: MediaTomb
	-> Manufacturer: (c) 2005-2008 Gena Batyan <[email protected]>, Sergey Bostandzhyan <[email protected]>, Leonhard Wimmer <[email protected]>
	-> Manufacturer URL: http://mediatomb.cc/
	-> Model Description: Free UPnP AV MediaServer, GNU GPL
	-> Model Name: MediaTomb
	-> Model Number: 0.12.2
	-> Services:
		=> Service Type: urn:schemas-upnp-org:service:ConnectionManager:1
		=> Control: /upnp/control/cm
		=> Events: /upnp/event/cm
		=> API: http://192.168.1.217:49153/cm.xml
			- GetCurrentConnectionIDs
			- GetCurrentConnectionInfo
			- GetProtocolInfo
		=> Service Type: urn:schemas-upnp-org:service:ContentDirectory:1
		=> Control: /upnp/control/cds
		=> Events: /upnp/event/cds
		=> API: http://192.168.1.217:49153/cds.xml
			- Browse
			- GetSearchCapabilities
			- GetSortCapabilities
			- GetSystemUpdateID

It can browse file shares:

[+] Content browsing available. Looking up base directories...
		Storage Folder: PC Directory
		Storage Folder: Photos
		Storage Folder: wat

It can show port mappings:

[+] IGD port mapping available. Looking up current mappings...
		[UDP] *:60579 => 192.168.1.186:60579 | Desc: None

License

The license is BSD 3-clause. See the LICENSE file for details.

More Repositories

1

terrascan

Detect compliance and security violations across Infrastructure as Code to mitigate risk before provisioning cloud native infrastructure.
Go
4,472
star
2

poc

Proof of Concepts
Python
1,181
star
3

routeros

RouterOS Security Research Tooling and Proof of Concepts
C++
838
star
4

nessrest

A python library for using the new Nessus REST API.
Python
386
star
5

pyTenable

Python Library for interfacing into Tenable's platform APIs
Python
332
star
6

ghidra_tools

A collection of Ghidra scripts, including the GPT-3 powered code analyser and annotator, G-3PO.
Python
288
star
7

awesome-llm-cybersecurity-tools

A curated list of large language model tools for cybersecurity research.
278
star
8

pi_sniffer

The pocket-sized wireless sniffer
C++
202
star
9

router_badusb

BadUSB in Routers
Shell
190
star
10

esp32_image_parser

A toolkit for helping you reverse engineer ESP32 firmware.
Python
137
star
11

DiscordClient

Python
96
star
12

Posh-Nessus

PowerShell Module for automating Tenable Nessus Vulnerability Scanner.
PowerShell
88
star
13

KaiMonkey

KaiMonkey provides vulnerable infrastructure as code (IaC) to help explore and understand common cloud security threats exposed via IaC.
HCL
85
star
14

Tenable.io-SDK-for-Python

Tenable.io SDK offers a scalable and safe way to integrate with the Tenable.io platform.
Python
83
star
15

EscalateGPT

An AI-powered tool for discovering privilege escalation opportunities in AWS IAM configurations.
Python
81
star
16

audit_scripts

Scripts to help work with configuration audit files
Python
76
star
17

Burp-extension-for-GPT

an extension for Burp Suite to allow researchers to utilize GPT for analys is of HTTP requests and responses
Python
74
star
18

integration-jira-cloud

Python
65
star
19

yara-rules

Repository of yara rules
YARA
55
star
20

terrascan-action

Terrascan GitHub action. Scan infrastructure as code including Terraform, Kubernetes, Helm, and Kustomize file for security best practices.
Shell
47
star
21

nasl

A parser for NASL.
Ruby
43
star
22

flask-logging-demo

Demo files for 'The Boring Stuff - Flask Logging' blog post
Python
34
star
23

mIDA

C++
32
star
24

audit_files

Nessus Audit files
31
star
25

Security-Hub

For use in our Tenable.IO to AWS Security Hub integration
Python
24
star
26

terrascan-rego-editor

Visual Studio Code extension for writing Terrascan Rego policies
TypeScript
18
star
27

nasldoc

A documentation generator for NASL.
Ruby
17
star
28

pedant

A static analysis framework for NASL.
Ruby
14
star
29

sublimetext-nasl

13
star
30

accurics-action

The Accurics GitHub Action scans Infrastructure as Code files checked into the respository to help ensure that cloud resources are secure and compliant from creation.
Shell
13
star
31

Kastle

A purely functional, effectful, resource-safe, kafka library for Scala
Scala
12
star
32

csup

Tenable.io Container Security Uploading and Reporting Commandline Tool
Python
11
star
33

microfrontend-demo-app

JavaScript
11
star
34

SinCity

Python
11
star
35

integration-asc

Python
10
star
36

vim-nasl

Vim extensions for programming in NASL
Vim Script
9
star
37

runterrascan.io

CSS
8
star
38

golden-ami-pipeline-with-tenable-sample

The golden AMI pipeline enables creation, distribution, verification, launch-compliance, and decommissioning of the golden AMI out of the box. This version of the pipeline integrates with Tenable.io for vulnerability assessments.
6
star
39

container-security-action

Tenable's Container security action which helps scan docker images.
Python
6
star
40

notepadpp-nasl

5
star
41

integration-cef

Python
5
star
42

was-action

Github action to trigger WAS
Python
5
star
43

cloud-snapshot-automation

Templates for creating Cloud Snapshots
HCL
4
star
44

splunk-app-pvs

This app provides Splunk dashboards and reporting for Tenable PVS
HTML
4
star
45

presentations

4
star
46

integrations-ibm-cloudpak-for-security

Python
4
star
47

Tenable.ad-EventsLogs-Subscriber

Tenable.ad IOA module event logs listener
Rust
4
star
48

entra-id-federation-abuse-research-required-roles

PowerShell
4
star
49

UncoverDCShadow

PowerShell
3
star
50

integration-cscc

Tenable.io to Google Cloud Security Command Center Bridge
Python
3
star
51

emacs-nasl

Emacs Lisp
3
star
52

tenablecs_demo

HCL
2
star
53

asm-python-examples

Bit Discovery REST API scripts
Python
2
star
54

labs

1
star
55

accurics-vscode

TypeScript
1
star
56

WSUSpendu

PowerShell
1
star
57

nasl-layer

Spacemacs layer for NASL
1
star
58

asm-asset-importer

Scripts to integrate BitDiscovery data with Tenable
Python
1
star
59

atom-grammar-nessuskb

Grammar file for Nessus KB files.
CoffeeScript
1
star
60

accurics-orb

The Accurics CircleCI Orb scans IaC (Infrastructure as Code) to help identify vulnerabilities prior to cloud deployment.
Shell
1
star
61

helm-charts

Smarty
1
star