Skip to content

A real-time network packet capture and sonification tool that transforms your network traffic into both visual and auditory experiences.

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.MD
Notifications You must be signed in to change notification settings

dmeldrum6/Network-Sonification

Repository files navigation

Network Traffic Sonification

Ever wake up with a crazy idea and build it? Here is "Could I listen to my network traffic?", or "A real-time network packet capture and sonification tool that transforms your network traffic into both visual and auditory experiences. Watch packets flow across your screen while hearing the sounds of your digital world."

image

๐ŸŽต What It Does

Network Traffic Sonification converts network packets into sound and visual effects in real-time:

  • Visual: Watch colorful packets flow across your screen, each representing real network traffic
  • Audio: Hear your network activity as different tones, frequencies, and waveforms
  • Real-time: Experience your digital world as it happens

Audio Mapping

  • Packet Size โ†’ Volume & Pitch (larger packets = louder & higher)
  • Protocol Type โ†’ Waveform Shape:
    • TCP/HTTP/HTTPS: Smooth sine waves (musical tones)
    • UDP: Sharp square waves (digital sounds)
    • DNS/ICMP: Triangle waves (distinctive pings)

๐Ÿš€ Quick Start

Prerequisites

  • Windows 10/11
  • .NET Framework 4.8
  • Visual Studio 2019 or later

Installation & Running

  1. Clone the repository:

    git clone https://github.com/yourusername/network-traffic-sonification.git
    cd network-traffic-sonification
  2. Open in Visual Studio:

    • Open NetworkSonification.sln
    • Build the solution (Ctrl+Shift+B)
  3. Install NuGet packages (if not auto-restored):

    Install-Package NAudio -Version 2.2.1
    Install-Package SharpPcap -Version 6.2.5
    Install-Package PacketDotNet -Version 1.4.7
    
  4. Run the application:

    • Press F5 or click "Start"
    • The app will automatically detect available capture methods

๐Ÿ”ง Capture Modes

The application uses an intelligent hybrid approach with automatic fallback:

1. ๐Ÿ† WinPcap/Npcap Mode (Best Experience)

  • Full packet inspection with all protocols
  • Ethernet + IP layer analysis
  • Most detailed packet information
  • Requirements: Npcap installed

2. ๐Ÿฅˆ Raw Socket Mode (Good Fallback)

  • IP-level packet capture
  • Basic protocol detection (TCP, UDP, ICMP, HTTP, HTTPS, DNS)
  • Works on any Windows system
  • Requirements: Administrator privileges

3. ๐Ÿฅ‰ Demo Mode (Always Works)

  • Simulated realistic network traffic
  • All visualization and audio features
  • Perfect for testing/demonstration
  • Requirements: None

๐ŸŽฎ Usage

  1. Select Interface: Choose your network interface from the dropdown
  2. Start Capture: Click "Start Capture" to begin monitoring
  3. Audio Control: Click the mute/unmute button to control sound output
  4. Watch & Listen: Enjoy the audiovisual representation of your network!

Interface Elements

  • Top Panel: Network interface selection and controls
  • Middle Panel: Real-time packet flow visualization
  • Bottom Panel: Oscilloscope-style waveform display
  • Status Bar: Live statistics and mode information

๐Ÿ”Š Audio Features

  • Continuous Audio Stream: Never stops playing once started
  • Overlapping Tones: Multiple simultaneous sounds for busy networks
  • Natural Fade: Smooth transitions as packets come and go
  • Anti-Clipping: Protected against audio distortion
  • Muted by Default: Starts silent for safe operation

๐ŸŽจ Visual Features

  • Full-Width Animation: Packets travel across the entire screen
  • Protocol-Specific Colors:
    • ๐Ÿ”ต TCP: Blue
    • ๐Ÿ”ด UDP: Red
    • ๐ŸŸข HTTP: Green
    • ๐ŸŸฃ HTTPS: Purple
    • ๐ŸŸ  DNS: Orange
    • ๐ŸŸก ICMP: Yellow
    • ๐Ÿ”ต IP: Cyan
  • Size-Based Scaling: Larger packets appear bigger and move faster
  • Glow Effects: Particles fade naturally with subtle lighting
  • Real-time Oscilloscope: Live waveform visualization

๐Ÿ› ๏ธ Technical Details

Built With

  • C# / WPF - Modern Windows desktop application
  • NAudio - Real-time audio synthesis and playback
  • SharpPcap - Network packet capture (when available)
  • PacketDotNet - Packet parsing and analysis
  • .NET Framework 4.8 - Broad Windows compatibility

Architecture

  • Hybrid Capture System: Automatic detection and fallback
  • Real-time Audio Engine: Continuous buffer-based audio generation
  • Thread-safe Processing: Concurrent packet queues and processing
  • WPF Visualization: Hardware-accelerated graphics rendering

๐Ÿšจ Important Notes

For Real Packet Capture

  • Administrator Rights: Required for raw socket and WinPcap modes
  • Npcap Installation: Download from nmap.org/npcap
    • โš ๏ธ Important: Check "Install Npcap in WinPcap API-compatible Mode" during installation
  • Firewall: Windows may prompt for network access permissions

Privacy & Security

  • Local Processing: All packet analysis happens locally on your machine
  • No Data Transmission: No network data is sent anywhere
  • No Logging: Packets are processed in real-time and discarded

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • NAudio - Excellent .NET audio library
  • SharpPcap - Robust packet capture for .NET
  • Nmap Project - For Npcap packet capture driver

๐Ÿ› Troubleshooting

Common Issues

"Npcap/WinPcap not installed"

  • Install Npcap with WinPcap compatibility mode

"Access denied" or "Run as Administrator"

  • Right-click the executable and select "Run as administrator"

Audio cuts out

  • This version includes continuous audio buffering to prevent dropouts
  • Try unmuting and muting again if issues persist

No packets visible

  • Ensure you're connected to a network
  • Try demo mode to verify the application is working
  • Check Windows Firewall settings

Performance issues

  • Close other network-intensive applications
  • Try reducing visual effects by modifying the fade rates in code

Transform your network into art. Listen to the internet. ๐ŸŽต๐ŸŒ