It's a fact of modern life that many of us forget—the phones, computers, and other connected devices we depend on can often be used against us as secret listening devices. On Tuesday, attention turned to the Amazon Echo, with a demonstration that showed how hackers can convert some models into devices that can surreptitiously record our most intimate moments.

To be clear, the hack works only against older models of Amazon Echoes. It also requires physical access to the device by a hacker with above-average skills in Linux and embedded hardware systems. That means people aren't likely to be exposed to such attacks unless they own a 2015 or 2016 device and are a target of interest to the Central Intelligence Agency, a similar nation-sponsored spy group, an advanced corporate espionage operation, or a highly determined stalker.

Enter evil maid

So-called "evil maid" attacks—so named because they're carried out by a house cleaner or other person who has brief access to a target's devices—are valid hacks Microsoft, Apple, and other manufacturers include in their threat modeling. And now, following a proof-of-concept hack by MWR Labs security researcher Mark Barnes, those types of threats are a reality millions of Echo users must consider as well.

"This highlights privacy concerns people have about always-listening devices," Barnes told Ars. "It shows the need for developers to have security assessments of smart devices they develop and for organizations to gain assurance of the security posture of any products they purchase before installing them."

Barnes' hack works by gaining root access to a vulnerable Echo and adding commands that surreptitiously capture the raw microphone input and send it to an attacker-controlled computer. Other commands can steal authentication tokens used to access Amazon or, potentially, other services. The technique doesn't affect the normal functioning of the Echo and can't be detected without inspecting the network traffic sent by the device.

To carry out the hack, Barnes removed the device's rubber base and exposed 18 "pads" Amazon engineers rely on to perform various diagnostics. A previously published research paper already showed how to use an attached SD card to load a generic version of Linux onto a device. Barnes used the paper as a starting point for booting into the actual Echo firmware. From there, he installed a persistent implant, gained remote root shell access, and ultimately monitored the input captured by the microphone.

Barnes wrote:

Once we had root we examined the processes running on the device and the scripts that spawn these processes. We were able to understand how audio media is being passed and buffered between processes and the tools that are used to create and interact with these audio buffers. Using the provided 'shmbuf_tool' application developed by Amazon, we created a script that would continuously write the raw microphone data into a named fifo pipe which we then stream over TCP/IP to a remote service. On the remote device, we receive the raw microphone audio, sample the data, and either save it as a .wav file or play it out of the speakers of the remote device.

Barnes said the process from start to finish takes about two hours, but, with additional work, he could develop a ready-made device an attacker could push onto the pads that would require only a few minutes to install. Neither technique will work on 2017 models because Amazon engineers introduced a mitigation that joins two of the crucial debugging pads in a way that prevents external booting. The technique also doesn't work on the Amazon Dot. Barnes said he has some ideas on ways he could root the latest models, but he has not yet had time to test them.

Readers who are concerned about the security of their devices can check the manufacture year by inspecting the original package. If the copyright shows the year 2017 and a model number ending in 02, it's not vulnerable. Echo users can also mute their devices at any time by pushing a physical button.