Skip to main content

PlotCap - a simple network visualization tool

Project description

PlotCap - a simple network visualization tool.

Sample

Introduction

PlotCap is a simple command line tool written in Python and based on PyVis, that parses network capture files (produced by tools such as tcpdump or Wireshark) to render a graph of the network topology in a web page.

PlotCap was designed for red team engagements, with the aim of quickly mapping out relationships between devices (“nodes”) in a network. Target groups are: network administrators, penetration testers and curious people.

Visualization can be performed at layer 2 (MAC addresses) and layer 3 (IP addresses). Layer 2 is the default. The tool attempts to resolve MAC addresses unless directed otherwise.

Install

You can install plotcap on your system by using pipx:

pipx install git+https://github.com/darknetehf/plotcap.git

And optionally:

pipx ensurepath

This will add ‘~/.local/bin’ to your PATH environment variable.

Usage

plotcap  -f capture.cap

This is equivalent to:

plotcap  -f capture.cap --layer2

or:

plotcap  -f capture.cap --layer2 --resolve-oui

Do not resolve MAC addresses:

plotcap  -f capture.cap --layer2 --no-resolve-oui

Show IP addresses:

plotcap  -f capture.cap --layer3

To increase verbosity add -v or -vv for debugging.

API

A convenience API is available if you just want to parse the .pcap file and reuse the results, but don’t want a graphical representation.

from plotcap.api import parse_file

pcap_file = "/tmp/test.pcap"
conversations = parse_file(pcap_file=pcap_file, layer=2)
for conversation, packet_count in conversations.items():
   print(f"src: {conversation.src} - dst: {conversation.dst} - packets: {packet_count}")

Limitations

  • Although this is a command line tool, it requires a graphical environment and a web browser to render network maps. On headless systems we suggest using Xvfb to set up virtual sessions.

  • PlotCap was tested on Linux only

  • MAC addresses may not always be resolved to manufacturer names, especially if address randomization comes into play

  • See the TODO file for more missing features

Project details


Download files

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

Source Distribution

plotcap-1.3.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

plotcap-1.3.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file plotcap-1.3.0.tar.gz.

File metadata

  • Download URL: plotcap-1.3.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for plotcap-1.3.0.tar.gz
Algorithm Hash digest
SHA256 402ebcdb4b0b74bc6adda1f3c0f1cd27dd868e64a0affffb287e22c81305c4b4
MD5 876c959ee8eb5226e3a054b287eae53e
BLAKE2b-256 7025ef8d782ed996bdae014faa4d0849cfb000fb2c876915848b5b496343cf73

See more details on using hashes here.

Provenance

The following attestation bundles were made for plotcap-1.3.0.tar.gz:

Publisher: python-publish.yml on darknetehf/plotcap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file plotcap-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: plotcap-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for plotcap-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 142b1aef4afc7630c479a6e77050fdd8aa91f0b354fa3dc4be9190825a0da692
MD5 8e44365bd23ce9e151d464adad760d02
BLAKE2b-256 254a8407b903b8b488c5dbd119a2673e6eabc56274d2a95b54e2ffe2ade406d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for plotcap-1.3.0-py3-none-any.whl:

Publisher: python-publish.yml on darknetehf/plotcap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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