Writing

Feed Software, technology, sysadmin war stories, and more.

Wednesday, March 23, 2022

AirPlay in a high-density environment isn't great

Apple's AirPlay is something that's useful when it's constrained to a person and their own devices and the devices of their visiting friends (who have been granted access to the host's network). It lets them send music and/or video to a speaker or TV and have it display for the benefit of everyone.

Unfortunately, at least the Apple TV does this goofy thing where it also (by default, I'm pretty sure) advertises itself to anyone nearby. This means if you are in a relatively high-density environment like an apartment building, a condo tower, or just have one of those houses with paper-thin walls and no side yards, you are probably going to see your neighbor's devices.

Now, while it's kind of "fun" to occasionally pick their device and make it do the HDMI-CEC thing to turn on their TV to a "enter passcode" screen in the middle of the night, it's also obnoxious to have to skip over them in the list of devices. When you're on a Mac, there's this dropdown bar, and you have to make sure you pick the right one. Quick, there are FOUR "Living Room" devices. Which one is yours?

But wait, there's more. This is the part I want to rally some of my more snarky readers to go and try. It looks like our devices try to connect to the IP address of the foreign device, just in case we happen to be on the same network as it.

I want someone to get an ATV, configure it with some "interesting" IP address (although, I don't even know what that would be in 2022, honestly... it's not like the old days), set it up in that mode where it offers itself to anyone nearby, and then get it near a whole bunch of Apple people. Maybe wait for the next WWDC or something.

Anyway, in theory, ALL of those devices will start trying to establish TCP connections to that IP address on port 7000... over the Internet. Do it with enough devices nearby and it'll look like a DDOS, or something. Maybe that'll piss off enough people to make something happen.

Alternatively, you could now realize you have a way to find out the (external, if behind a NAT) IP address of an Apple device near you. All you have to do is convince it to try to connect outward to a real host you control, and then see who comes a-knocking. All of those weenie advertisers who were trying to collect marketing data based on MAC addresses doing wifi and BT scans will be absolutely drooling over this.

If you've ever watched the traffic from your Apple devices leaving your network for the Internet and wondered why in the hell it's trying to connect to RFC 1918 space you don't even use... this is probably why. It's almost certainly something one of your neighbors uses, and your devices are trying to hump it repeatedly.

Stupid.

I have an ulterior motive in writing this. Maybe Apple will finally do something about this so we can just see our own devices in the AirPlay chooser and not have to dodge a bunch of lookalikes. It's like, come on already, I realize they must all live in mansions where nobody else is nearby, but the rest of us are packed in like sardines and get tons of stupid extra devices showing up constantly. It gets worse every Christmas.

C'mon Apple. Stop the AirPlay insanity.