News for hackers. Stuff that matters.
Re:Malicious Charging Cable by mynegation on Sunday March 01, 2020 @03:46PM (#22459191)
At some point iOS started asking if I want to trust the device, so I suppose if I use this malicious cable with charger and iOS asks me about computer or accessory, I would know things are fishy, would not I?
Re:Malicious Charging Cable by lisper on Sunday March 01, 2020 @03:58PM (#22459263)
Theoretically. Unfortunately, the device trust settings are not reliably remembered. My phone regularly asks me if I want to trust my computer despite the fact that I haven't made any changes to it. So it might be an indication that something is fishy, or (much more likely) it might just be that a trust setting has expired. Also, no device fingerprint is displayed along with the query, so there's no way to know which device the phone is actually asking you to approve.
Re:Malicious Charging Cable by mynegation on Sunday March 01, 2020 @04:02PM (#22459295)
This is true. If one uses this cable to attach to a computer- there is no way to know, but charger is supposed to be dumb device. I wonder if this thing detects that and does not announce itself.
Re:Malicious Charging Cable by kybernetikos on Sunday March 01, 2020 @04:23PM (#22459455)
I saw something about changing the cable's hardware ids to avoid this. I guess you find a piece of hardware that you know is trusted by the target phone and then copy its hardware id onto the cable if you want to evade that warning.
Re:Malicious Charging Cable by gruez on Sunday March 01, 2020 @08:06PM (#22460670)
I'm skeptical that would work. If anything it's authenticated with the computer itself, not the cable.
Re:Malicious Charging Cable by earthboundkid on Sunday March 01, 2020 @09:41PM (#22461173)
Maybe you first use physical access to connect to the victim’s computer, get the ID, and masquerade as it in the cable? It’s a hassle, but if the laptop is left alone in the house, doable.
Re:Malicious Charging Cable by close04 on Sunday March 01, 2020 @04:19PM (#22459422)
Aren’t you asked every time you reestablish a connection? If I unplug my iPhone (applies to Android too but with slightly different options) and plug it back into the computer I simply get prompted again. I think the trust is ephemeral and is forgotten the moment you disconnect from the USB port. From the phone’s perspective there doesn’t seem to be a trust store where devices are uniquely identified and remembered.
Re:Malicious Charging Cable by radley on Sunday March 01, 2020 @06:34PM (#22460186)
I had a similar experience. It took me a long time to find out if "personal hotspot" is turned on, iPhone will always ask to trust when connecting to a computer.
Re:Malicious Charging Cable by dragonsky67 on Sunday March 01, 2020 @09:33PM (#22461120)
New to me. Thanks I did not know this. It explains why I've been getting this unexpected behavior.
Re:Malicious Charging Cable by lisper on Sunday March 01, 2020 @04:28PM (#22459487)
> Aren’t you asked every time you reestablish a connection?

No. Sometimes it asks, sometimes it doesn't. There doesn't seem to be any pattern to it that I have been able to discern.

Re:Malicious Charging Cable by gruez on Sunday March 01, 2020 @08:10PM (#22460694)
> There doesn't seem to be any pattern to it that I have been able to discern.

How often do you charge your phone? I only get those prompts when charging with a computer, not with a charger. One explanation might be that it remembers your computer for 1 week (random guess), but if you irregularly connect your phone to your computer it might seem random to you.

Re:Malicious Charging Cable by lisper on Sunday March 01, 2020 @08:26PM (#22460777)
I work from home, so my phone is plugged in more often than not. But I'll pay more attention to how long it has been away the next time it asks.
Re:Malicious Charging Cable by noizejoy on Sunday March 01, 2020 @06:28PM (#22460157)
> There doesn't seem to be any pattern to it that I have been able to discern.

In sufficiently complex software, things can appear to be random (or magic), even when they are neither. — I seldom trust myself to declare something random in computer technology, just because I haven’t figured out the pattern (yet).

Re:Malicious Charging Cable by lisper on Sunday March 01, 2020 @06:42PM (#22460235)
In this case it doesn't matter. The indiscernibility of a pattern has the same effect as the absence of a pattern, namely, I can't tell whether or not the decice that my phone is asking me about is actually my computer or malicious hardware embedded in my USB cable.
Re:Malicious Charging Cable by noizejoy on Sunday March 01, 2020 @08:06PM (#22460667)
I didn’t think the device had any way of telling if the cable was malicious. So even if it wouldn’t ask repeatedly, you wouldn’t know if the cable was evil? So I’m not sure if the question “do you trust the device you just plugged in” does much of anything other than giving you a chance to reconsider? Also, is there a chance that the trust is lost on a weird AI timer? For example, a little while ago, my phone asked, if I wanted an alarm set to a specific time on a specific weekday morning, apparently just because I needed such an alarm for 2 weeks in a row. That made the pattern easy to recognize, but it also told me that the phone AI is trying too hard to learn about me. - I assume you’re always using the same cable? And I also assume you don’t get the trust dialog when plugging into a wall charger directly?
Re:Malicious Charging Cable by lisper on Sunday March 01, 2020 @08:24PM (#22460766)
> I didn’t think the device had any way of telling if the cable was malicious.

Well, no, but I assume it has a way of knowing if the computer I'm plugging it in to now is the same one that I plugged it in to yesterday and that I told it to trust yesterday.

The cable I'm using is the one that came with the phone, so if it was malicious that would be big news. But I just realized that I left out an important detail: my phone is not plugged directly into my computer, but is instead connected through a USB hub and an OWC Thunderbolt dock. So that muddies the waters considerably. It is not at all out of the question that one of those devices is doing something hinky, though I'll give long odds against.

> is there a chance that the trust is lost on a weird AI timer?

Extremely unlikely. This one computer is the only one my phone has ever been plugged in to (AFAIK).

> I assume you’re always using the same cable? And I also assume you don’t get the trust dialog when plugging into a wall charger directly?

Correct on both counts.

Re:Malicious Charging Cable by noizejoy on Monday March 02, 2020 @03:37AM (#22462706)
Wow - it’s a strange one indeed. Your use case doesn’t even strike me as that far from a pretty normal scenario. But it illustrates, how much potential for malfeasance is introduced with the chains of “smart” components that we’re increasingly required to use. And even being vigilant becomes difficult to impossible, because there are just too many vectors of vulnerability. Kinda depressing...
Re:Malicious Charging Cable by lisper on Monday March 02, 2020 @10:57AM (#22465435)
It is indeed.

(The most depressing thing to me is that people actually pay money for devices like Alexa and Google Voice which are designed to spy on them. Who needs to become a hacker when people will voluntarily give up their privacy for a shiny thing?)

Re:Malicious Charging Cable by noizejoy on Monday March 09, 2020 @10:46PM (#22532301)
They probably didn’t read George Orwell in their formative years :-/
Re:Malicious Charging Cable by lisper on Tuesday March 03, 2020 @12:23PM (#22476562)
Just for the record: I just unlocked my phone after it was plugged in to my computer all night and it put up the "trust this computer?" dialog. I did not confirm. Instead, I turned the phone off, and plugged it back in directly to my computer without the intervening hub and dock. This time it did NOT put up the trust dialog. I plugged it back in to the hub and it once again did NOT put up the dialog.

It's very weird, and the fact that the trust dialog does not display any kind of device fingerprint makes it impossible to know what is actually going on.

Re:Malicious Charging Cable by noizejoy on Monday March 09, 2020 @10:43PM (#22532292)
just wow - that’s pretty crazy - it sure would be interesting to find out what signals the logic/code behind the trust dialog actually looks for, and maybe even more interesting why it was designed that way, or if it’s just really buggy.
Re:Malicious Charging Cable by m45t3r on Sunday March 01, 2020 @04:00PM (#22459276)
Android is kind of the same: by default, no data connection is made unless you explicitly change the USB mode from charging to something else.
Re:Malicious Charging Cable by tialaramex on Sunday March 01, 2020 @06:11PM (#22460064)
This depends on what the attached device seems to be, which of course a malevolent cable can choose.

You're correct that if I plug the phone into my PC the phone defaults to just charging from it, and needs an explicit UI intervention to offer other features - but if I plug it into my USB keyboard it just works as a keyboard, no further UI intervention needed.

I guess it's _possible_ that I forgot having one time authorised this for the keyboard, but even if that's true it means a malevolent device just needs to guess what to impersonate to get into any phone that has even once authorised such a device, because there's no cryptographic protection - if I say "I'm a Cheap Ass Generic USB Keyboard serial # 00001" then there's no way to distinguish me from the real "Cheap Ass Generic USB Keyboard serial # 00001".

Now, maybe the situation is that phones allow some safer things and not more dangerous ones. Maybe you can pretend to be a USB keyboard or mouse, but it will refuse to offer any of the file transfer type features or networking. I don't know, but my expectation is that people who've built these cables do know and there are plenty of holes.

Re:Malicious Charging Cable by grenoire on Sunday March 01, 2020 @06:21PM (#22460122)
Can a USB device posing as a keyboard also supply charging voltage?
Re:Malicious Charging Cable by tialaramex on Sunday March 01, 2020 @06:34PM (#22460184)
Is your question: Do real devices do this? None that I'm aware of. Are they allowed to do this? I would be astonished if the USB-C specification has a big list of what is or is not allowed to volunteer power, seems like just an opportunity to fail more than necessary.

But anyway, suppose phones are smart enough to refuse to charge from a keyboard. These cable are remote controlled. So you plug in your phone, it charges... and then a minute later when you're distracted it gets told the charger went away... and now here's a keyboard. Attack in progress.

I reckon you could work out a procedure e.g. pretend to be power for 90 seconds, supposing experience teaches that's how long people take to forget they plugged the phone in. Then, turn the power off. Watch. An attentive user may notice, unplug their phone and try again thinking the cable may be faulty. Re-enable power when the phone vanishes. If not, after giving them say 30 seconds to notice switch to keyboard mode. Or you could just wing it. A lot of good physical penetration testers "wing it" all the time.

Re:Malicious Charging Cable by saagarjha on Sunday March 01, 2020 @11:49PM (#22461760)
Interestingly, there is no way to get an iPhone to charge off of a computer port (which will try to send data?) without trusting it. It will just refuse the connection entirely instead of accepting just power.
Re:Malicious Charging Cable by asdff on Sunday March 01, 2020 @07:56PM (#22460611)
Not necessarily. Those notifications pop up when your cable is starting to fail as well. If your malicious cable had 'amazon basics' printed on the side and looked a little ratty, no one would bat an eye.
Re:Malicious Charging Cable by gruez on Sunday March 01, 2020 @08:03PM (#22460650)
>Not necessarily. Those notifications pop up when your cable is starting to fail as well

I think you're talking about the "this accessory is not supported by this iphone" prompt, not the "trust this computer?" or "allow this device to access your photos and videos" prompts. The first shows up if your cable can't be verified to be mfi compatible (via a special chip in the cable), and the last two only show up when connecting to a computer.

Re:Malicious Charging Cable by davchana on Sunday March 01, 2020 @08:07PM (#22460676)
If it is not my pc; & I am just charging the phone, I always select the Charge Only mode. No to Allow this device to access your photos prompt.