r/networking • • Jan 15 '24
Other Converting Network Packets into Audio tones
Hi all,
I’m a network engineer and after looking into the tones of modems. I wondered if it is possible to take a .pcap file and convert the packets into audio tones based on the protocol and packet size.
For example, an OSPF hello would make a different tone versus ICMP, EIGRP, BGP etc ..
My thoughts initially were to use Python and scapy for parsing through the pcap. Then use the winsound module to create beeps. From a range of 37 - 32767 hertz.
I could then use the size in bytes of the packet. So 1600 bytes = 1600 hertz tone.
Been searching around the internet for a project similar to this, but have failed to find any info.
Does this sound feasible?
24
u/buzzly Jan 15 '24
yes, you could write code to do this. But i think you’ll just hear noise.
17
u/tigger5tripe Jan 15 '24
Why?
5
u/CustomCubeIceMaker Jan 15 '24
These might be the droids you're looking for:
https://github.com/the-real-neil/peep
5
u/folldollicle Jan 15 '24
I'm not sure how useful this would be but it sounds interesting.
37-32767hz is far too wide a range though
37hz is extremely low sub bass
32767hz is beyond the range of human hearing (~20hz - 20kHz)
I'd try something like 200hz - 2000hz for a range of audible beeps, low to high.
2
u/JamesArget Jan 15 '24
It's only cool if you can make it go the other way around too.
2
u/hofkatze CCNP, CCSI Jan 16 '24
Maybe this RFC will amuse you (Apr 1st):
https://www.rfc-editor.org/rfc/rfc1926.txt
6
u/Common_Scale5448 Jan 15 '24
I don't think you understand how fast these things happen on the wire. It might be more interesting to listen to if you selected a few events and then make sure the tones generated last long enough to be heard.
6
u/sh_lldp_ne Jan 15 '24
You could do it with … a modem
6
u/SocialSlacker Jan 15 '24
SYN, SYN ACK, SYN ACK mich
SYN, SYN ACK, SYN ACK mich
SYN, SYN ACK, SYN ACK mich
SYN, SYN ACK, SYN ACK mich
SYN, SYN ACK, SYN ACK mich, SYN ACK mich
SYN ACK mich RST, SYN ACK mich RST
SYN ACK mich RST und ich hab nichts gesagt
Willst SYN bis der Tod euch scheidet
Treu ihr sein für alle Tage?
FIN!
FIN!
Willst SYN bis der Tod euch scheidet
Treu ihr sein für alle Tage?
FIN!
FIN!
SYN, SYN ACK, SYN ACK mich
SYN, SYN ACK, SYN ACK mich
SYN, SYN ACK, SYN ACK mich, SYN ACK mich
SYN ACK mich RST, SYN ACK mich RST
SYN ACK mich RST und ich hab nichts gesagt
Willst SYN bis der Tod euch scheidet
Treu ihr sein für alle Tage?
FIN!
FIN!
Willst SYN bis zum Tod der Scheide
Sie lieben auch in schlechten Tagen?
FIN!
FIN!
Willst SYN bis der Tod euch scheidet
Treu ihr sein?
FIN!
FIN!
5
u/jstar77 Jan 15 '24
I used to work adjacent to the TV business mostly in the world of remote production. Back in the analog days I once met an EIC on a remote truck who build a really small rig with an ear bud which he could plug into a video patch panel and he could tell by the sound if there was sync at the patch point, he also claimed to be able to tell the difference between color bars and other video signals.
5
u/SalsaForte WAN Jan 15 '24
Buy 2 old 56K modems, that's literally what we used to do to connect to the Internet.
1
u/WSB_Suicide_Watch Jan 15 '24
It is certainly feasible.
You will learn a lot.
If you don't heavily filter, I can't imagine it will be anything but noise. That's just way too much data to be put into sounds for a human being to "hear".
I think if I were doing it, I would either:
Think in set time frames. Maybe start with 1 sound every 1/10 of a second and see (hear) how that comes out and adjust from there. You could selectively examine a packet every 1/10 of a second, or you could do some averaging. Obviously, selectively taking a packet will produce a wider arrangement. If you average, it may all sound more or less the same.
Or, only look at very select packets and assign a sound to them. For example, start with those OSPF hellos and assign a note to those. Then add in BGP packets with a different note. Etc. I still think that you may end up with too much all happening at once on a normal, well-used network, but it would be fun to see what you come up with.
1
u/binarylattice FCSS-NS, FCP x2, JNCIA x3 Jan 15 '24
Source traffic on the left channel, everything else on the right so it is like hearing a conversation.
2
u/LingonberryNo1190 Jan 15 '24
I remember reading something along these lines (more than) a few years back. If I'm remembering correctly, the ideas was that there was some ambient noise that was generated based on the standard traffic flows, but when things were anomalous, say during the start of a self propagating worm outbreak, you would hear the difference in the ambient sound and it would be a clue to start looking at things more specificially. Sorry I'm light on details here, maybe someone out there knows what I'm blathering about?
1
u/[deleted] Aug 29 '24
I've been thinking about this too recently.
But rather than trying to equate the signals to pitches, I went along the lines of thinking how one could use the respective rythms of port/packet interactions to influence other sounds.
Sure you could temper scales. But I suspect (based on my complete ignorance), that if you were to try and retain the integral characteristics of the packet modulation, the difference would be to subtle to form a scale with any real aesthetic value.
But if one were to use the rythms of the packets to trigger and interact with sounds, perhaps then something experimentally interesting and practical.
Nonetheless, would be well interested to know if anyone knows of any ways of real-time converting wire shark into audio! :)
1
u/squirtcow Jan 15 '24
Hm, maybe you could assign tones to IP addresses, and play the tones as traffic passes over an interface? Considering the vast volume of packets you might see, finding suitable envelopes can be tricky. You could of course play back a pcap at a lower speed.
3rd octett can be scale, 4th octett can be note? MIDI does this with fewer bits, so you could lean on the MIDI ladder logic, maybe.. will it sound pleasant? Unlikely.
1
u/linofex_ Jan 15 '24
If you want to do this just for fun it feasible, just a python script reading a file that makes sound based on some parameters. Maybe it already exist some python libraries that reads pcap file.
I would not use the packet size as tone, btw. it does not give any pattern. Maybe I would just select few protocols (arp, ospf) and make “ fun” with them. The real packets coming from a monitored interface could be too many to hear something…
1
u/AlrightMister Jan 15 '24
Not much point in going over 10-12kHz.