32

I have a smart phone that I often plug into a wall socket for charging via a small adapter that rectifies the AC to DC power and transforms the voltage from line (120V or 240V) to 5 V DC, probably using a switching power supply. Standard stuff.

I am concerned that if there is broadband on the power lines, for example powerline Ethernet, that unwanted digital signals might be transmitted to my phone. I realize many say that the electrical transformer and rectifier would damp out any digital signals (for example, as explained in this post), but I believe unless these high frequency signals are specifically filtered, they will come through. I have had experience with noise in supply lines coming into test equipment unless we had very nice power supplies (see for example, as explained here). I am unsure my $5 wall charger is that nice.

Does anyone have any data from testing or more detailed specifications on the wall chargers? Is this really a problem?

  • 2
    No information is transmitted over the power lines, apart from voltage being too high or low.. You might use a cable, where the 2 data lines are cut to be sure. – ott-- Nov 20 '15 at 21:37
  • 3
    It's worth pointing out that phone chargers and other consumer power supplies no longer use a transformer/rectifier old-school method of supplying low-voltage DC... they're all switching supplies now, and probably generate some high-frequency noise of their own... – junkyardsparkle Nov 21 '15 at 2:42
  • @ott True for standard chargers, but false if you look at the X10 protocol or Power over Ethernet – cutrightjm Nov 21 '15 at 21:44
  • This is actually possible, but not via the power-line, rather by modifying your USB charger. Which is a real pain in the ass, I mean a REAL pain... But it can be done. Modifying the charger device to send data or signals through the USB port into whatever the hell is plugged into it can be done at the hardware level, you just need to be a really decent hardware engineer to pull that off. In other words, unless you think of yourself as a very very very high profile target, nobody is going to bother trying. – Cestarian Nov 22 '15 at 5:16
43

There is nothing stopping an attacker from putting a powerline ethernet transceiver as well as a USB-enabled microcontroller into a USB charger. This would allow them to communicate with the charger in the hope to offload some malware onto a smartphone plugged into that port. However, such a device would need to be highly specialized and specifically designed for this purpose. There is simply no way that powerline ethernet could just magically transmit data over the USB data lines to a smartphone.

If you are at all afraid that something like this might be happening, there are products that exist specifically to prevent such a scenario. For example, the SyncStop:

SyncStop prevents accidental data exchange when your device is plugged into someone else’s computer or a public charging station. SyncStop achieves this by blocking the data pins on any USB cable and allowing only power to flow through. This minimizes opportunities to steal your data or install malware on your mobile device.

You could also cut the cable open and physically disconnect the D+ and D- pins (which is effectively what the SyncStop does), and that will definitely stop all communication.

How it works

Powerline ethernet works by transmitting data on a high frequency over a building's mains power wiring. This is possible due to the fact that AC mains power uses either 50Hz, 60Hz or some other relatively low frequency. These devices transpose their data directly on top of the 120V/240V already present on the mains. You can read more about how this is actually don on a hardware level here.

Any wall charger that you find that is smaller than a baseball and weighs next to nothing is what is known as a switching AC to DC converter. These devices work by rectifying the mains power to DC, smoothing the rectified DC with a large capacitance, and then using a small transformer to switch the rectified DC at a very high speed (in the neighborhood of 100s of kHz to MHz). You can read more about them here.

Why it's not possible

To rectify the AC mains to DC, the charger uses either a full wave, or half wave rectifier. These are just diodes, any signal present on the AC mains will also be present on the rectified DC, and the same can be said of the smoothing circuitry. Even if the signal present on the rectified DC was able to somehow make its way across the transformer, the switching circuit in the charger will cause quite large portions of that signal to be lost when the transformer is switched off. After the transformer, there is yet more smoothing circuitry that ensures the final output is as close to 5V as possible meaning that even if some signal made it through the aforementioned gauntlet, it would be smoothed out into silky smooth 5V.

The above doesn't even consider how USB works. There are two data pins, D+, and D-. They form what is known as a differential pair, and they mirror each other. This means that any signal present on the 5V line will also need to be mirrored to ground in order for the USB transceiver on the phone to even bat an eye. Moreover, the USB specification includes packets, handshaking, and everything you would expect from a high-speed protocol like USB. I know what you are thinking "Doesn't Ethernet also have packets and handshaking?" and yes, it does, but that's like saying a zebra is the same as a platypus.

So no, without modifying an off-the-shelf charger with some quite complicated hardware and software, it is impossible for this to happen.

  • The concern is the Ethernet over power line in the wall. I believe you are saying that the power and data pins in USB are separate, so there would need to be a cross connect between these connections in the charger for any data flow. In a dedicated charger, the data pins would likely not even exist (I looked in mine with a flashlight but could not tell). So even if there is Ethernet over power line, there is no route to the data pins on the phone plug. Am I correct? – Stone True Nov 20 '15 at 22:28
  • 1
    @StoneTrue Yes, even if the data pins were connected there is simply no way that powerline ethernet or some other powerline data transmission scheme could passively communicate with a smartphone over USB. – David Freitag Nov 20 '15 at 22:45
  • Sorry but I am not clear on your reasoning. Is it because the power and data pins on the actual phone are different? – Stone True Nov 20 '15 at 22:47
  • 2
    @StoneTrue Edited for clarification – David Freitag Nov 21 '15 at 3:11
  • 2
    @StoneTrue Keep in mind people can replace your charging block while you're gone with a duplicate that performs malicious actions. – Mark Buffalo Nov 21 '15 at 17:20
3

As long as it is YOUR USB charger, and you bought it personally in a store, the risk is low to non-existent. Mailorder devices are always a risk (albeit in this case likely only a theoretical risk), because we know that some state actors intercept shipments and manipulate devices. It is probably only a theoretical risk in this case, though, even if you are a target of a state actor.

If you do not own the USB charger, then the risk is real, and there have been a few cases reported of devices masquerading as USB chargers but actually inserting malware. I believe the situations found were USB chargers in hotel rooms.

-3

To the electronics behind the USB port of a device, any ethernet signal or what unintentionally might filter through a charger of an ethernet signal encoded in some fashion, will look like noise - wrong clock, wrong coding, wrong levels. To actually influence the telephone via a powerline ethernet transceiver, somebody would need to not only synthesize something that looks like an USB signal via the wrong hardware, but do so reliably enough to make an exploit via USB work. If somebody designed hardware that actually forced a signal tailored to look like USB when bleeding through a power supply onto the socket - and correctly receive the data sent from the phone, there isnt exactly much you could do by just transmitting data! - slightly better chance, but it would still be hard to make it reliable enough to not make the phone get confused and crash/suspiciously misbehave instead of being exploited. If downloaded exploit code gets just a few bits flipped, it is more likely to crash than work as intended.

  • 3
    Please don't add an answer post that just guesses, especially when there are answers already here that describe exactly the challenges faced. Read How to Answer for guidance – Rory Alsop Nov 21 '15 at 12:32
  • Well theoretically this could work, but the chances of it working would be like having a black hole suddenly smash into Earth in the next few minutes. i.e. Near zero. – Gene Nov 21 '15 at 14:31

protected by Rory Alsop Nov 21 '15 at 12:33

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.