Fax wiretapping: Difference between revisions
Created page with "A discussion came up about the common claim that "Fax is insecure", but nobody could initially find actual evidence of it or a way for a mere mortal to turn an audio recording..." |
No edit summary |
||
| Line 1: | Line 1: | ||
A discussion came up about the common claim that "Fax is insecure", but nobody could initially find actual evidence of it or a way for a mere mortal to turn an audio recording of a fax transmission into the image that was sent using publicly available tools, only "talk to our representative" enterprise solutions that might implement decoders. | === Intro === | ||
[[File:Fax wiretap setup.jpg|thumb|Fax wiretapping setup]]A discussion came up about the common claim that "Fax is insecure", but nobody could initially find actual evidence of it or a way for a mere mortal to turn an audio recording of a fax transmission into the image that was sent using publicly available tools, only "talk to our representative" enterprise solutions that might implement decoders. | |||
A litte search subsequently revealed [https://superuser.com/questions/217785/how-to-convert-audio-file-of-fax-transmission-to-image-in-linux this page] that suggested using the <code>fax_decode</code> program from the the spandsp library from the [https://www.soft-switch.org/ soft-switch] project could work and was reported functional using test audio files, those however had the transmit and receive channels separated and only the transmit channel was fed to the program. That's not how a wiretap would come out (both are mixed), so having the needed equipment to run a test it seemed like a fun morning project. | A litte search subsequently revealed [https://superuser.com/questions/217785/how-to-convert-audio-file-of-fax-transmission-to-image-in-linux this page] that suggested using the <code>fax_decode</code> program from the the spandsp library from the [https://www.soft-switch.org/ soft-switch] project could work and was reported functional using test audio files, those however had the transmit and receive channels separated and only the transmit channel was fed to the program. That's not how a wiretap would come out (both are mixed), so having the needed equipment to run a test it seemed like a fun morning project. | ||
=== Hardware === | |||
A test setup was made with my fax-capable MFP connected to a Cisco SPA122 ATA that is set to be able to dial to another one connected to a Windows XP laptop with built-in modem running the Windows fax console. Faxing from the MFP to the PC (and vice versa) was known to work correctly from previous endeavors, although sometimes needing multiple retries due to packet losses on the VoIP side causing occasional audio drops. | |||
[[File:Fax wiretap setup detail.jpg|thumb|Recorder and tap detail]] | |||
The phone line cable between the PC and ATA was cut and a very crude tap was made using a 220nF capacitor from each line and fed into a Zoom H6 audio recorder. The fax would still go through, and the entire audio could be recorded in what seemed like a satisfactory manner. | |||
=== Software === | |||
The spandsp library (<code>spandsp-0.0.6.tar.gz</code>) was downloaded under an ubuntu WSL instance and built following the instructions | |||
The | |||
<code>./configure --enable-tests</code> | |||
<code>make</code> | |||
As expected the configuration step spat out missing dependencies one after the other, after a while the list of things that ended up needed was retrieved with | |||
<code>sudo apt install build-essential libaudiofile-dev libpcap-dev libxml2-dev fftw-dev libsndfile1-dev libtiff-dev xsltproc libtiff-tools netpbm sox</code> | |||
With these installed the library could be built, with the <code>fax_decode</code> program found in the <code>tests</code> subdirectory. | |||
The recorded file needs to be converted to 8kHz 16-bit mono PCM, and can then be processed simply with | |||
<code>fax_decode file.wav</code> | |||
Revision as of 21:49, 8 May 2022
Intro

A discussion came up about the common claim that "Fax is insecure", but nobody could initially find actual evidence of it or a way for a mere mortal to turn an audio recording of a fax transmission into the image that was sent using publicly available tools, only "talk to our representative" enterprise solutions that might implement decoders.
A litte search subsequently revealed this page that suggested using the fax_decode program from the the spandsp library from the soft-switch project could work and was reported functional using test audio files, those however had the transmit and receive channels separated and only the transmit channel was fed to the program. That's not how a wiretap would come out (both are mixed), so having the needed equipment to run a test it seemed like a fun morning project.
Hardware
A test setup was made with my fax-capable MFP connected to a Cisco SPA122 ATA that is set to be able to dial to another one connected to a Windows XP laptop with built-in modem running the Windows fax console. Faxing from the MFP to the PC (and vice versa) was known to work correctly from previous endeavors, although sometimes needing multiple retries due to packet losses on the VoIP side causing occasional audio drops.

The phone line cable between the PC and ATA was cut and a very crude tap was made using a 220nF capacitor from each line and fed into a Zoom H6 audio recorder. The fax would still go through, and the entire audio could be recorded in what seemed like a satisfactory manner.
Software
The spandsp library (spandsp-0.0.6.tar.gz) was downloaded under an ubuntu WSL instance and built following the instructions
./configure --enable-tests
make
As expected the configuration step spat out missing dependencies one after the other, after a while the list of things that ended up needed was retrieved with
sudo apt install build-essential libaudiofile-dev libpcap-dev libxml2-dev fftw-dev libsndfile1-dev libtiff-dev xsltproc libtiff-tools netpbm sox
With these installed the library could be built, with the fax_decode program found in the tests subdirectory.
The recorded file needs to be converted to 8kHz 16-bit mono PCM, and can then be processed simply with
fax_decode file.wav