[FIX] PMS leveraged for amplified dDoS attack (SSDP)

EDIT: plex released a fix to prevent this.

Greetings

to whom it may concern:
Netscout (Arbor) has just published a blog post in which they show / explain / claim how SSDP on the WAN port of a Plex Media Server that uses uPNP/NAT-PNP to expose its port to the internet, can be used to reflect+amplify a dDoS attack.

(the attacker sending a forged packet to your plex server, the resulting answer will be sent to the (forged) source IP > the target of the attack)

suggested action: Filter incoming SSDP packets / do not use uPNP /NAT-PNP to expose plex to the internet. (most home routers do)

Source:
[Plex Media SSDP DDoS Attack Mitigation Recommendations]

stay safe!

Andreas

To clarify:
in plex server settings under “remote access” enable “manually specify” for the public port:

and on your router/internet device NAT/port forward that port (TCP protocol only) to the plex port of your server(s)

if it looks like this you did it right :wink:
image

and
 for the love of the FSM: Do not put your plex server in DMZ or disable firewall for it. Unless you know exactly what you are doing ^^

14 Likes

Thank you sir. Good info.

PS - Another nail in UPNP’s coffin

This got covered in ArsTechnica

1 Like

do you mean to specifically not to use the 32400 port externally?

Hello,

We are aware of the reports and are investigating it closer. We where not made aware of this in advanced so we don’t have more information than the rest of you right now. Changing ports might be a mitigation - but it’s certainly security by obscurity. We will update the forums when we know more.

4 Likes

So what does anyone recommend or suggest gets checked to prevent a server from being exposed like this? The power of a server is sharing with family, not like everyone should just air gap the servers and never let family members at home use the service>!

The main point is to use a manually created port forwarding.

Changing the public port number away from the default 32400 is something I’d do in any case. But it doesn’t have directly to do with the above DDoS technique.

If you use Plex server on an exposed host
(i.e. you added the plex server device into the “demilitarized zone (DMZ)” in your router configuration)
or you run it on a machine with a public IP address (i.e. put a Plex server machine into a data center or onto a VPS),
you must close all external port numbers in your firewall configuration,
except the one which is defined as the external port number for Plex (see the above screenshots).
And only let ‘TCP’ traffic through.
Drop any ‘UDP’ traffic to Plex server.

If you don’t know what the above means: don’t operate a server on a publicly connected machine before you get help from a network expert to configure the firewall.

To put it another way: this article https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/ only applies if the server is running on a machine in a local/private network, where internet connectivity is managed by a router. Don’t use it for Plex servers which either are in a DMZ or on a public machine.

If you are using a Plex server in your private network:

  • switch to using a manually defined portforwarding
  • make sure to only forward one port number (and not a whole range)
  • make sure to forward only ‘TCP’ traffic
  • verify, that your plex server is not in the demilitarized zone (DMZ)
5 Likes

pretty much this. Only forward TCP and do it manually. The External port can by anything, as long as the internal port is 32400

I still wonder:

  • why does the netscout article speak about port 32414 ? Is this some SSDP related magic?

Sad to hear that they don’t reach out to you, first. responsible disclosure much?

1 Like

If it’s already being used in the wild, they did the right thing.

1 Like

Difficult to disclose what was - until moments ago - a total mystery
 I suppose.

Having zero confidence in Plex is what was behind my forwarding of a ‘Non-Standard’ public port those many years ago in a move that, to me - a network idiot - seemed like the right thing to do.

Security by Obscurity? Sure, why not? I was forwarding a port anyway. Might as well forward a different one than every bad guy on Earth knew about, was network idiot logic <—the logic I have.

1 Like

It is one of the ports which is used by Plex server and Plex clients to find Plex servers and other clients in the local network. Internally called “GDM” from “good day, mate!” :slight_smile:

It is only supposed to be open on a private network, never on the internet.

[quote=“OttoKerner, post:11, topic:686789”]
“GDM” from “good day, mate!"[/quote]

so it’s like bonjour but upside-down? Am I doing this right? :wink:

Even the network stack is hipster - fantastic! :upside_down_face:

but:

Approximately 27,000 abusable PMSSDP reflectors/amplifiers have been identified, to date.

this means: About 27000 people are either careless // stupid or more people that I assumed are using plex in datacenters
 scary

:slight_smile: Sorry, I am not able to tell you the implementation details.

It doesn’t need a datacenter.
Too often I read in these forums that people are putting their PMS machine into the DMZ, usually out of desperation in an attempt to get remote access working.
Sometimes they even get the explicit recommendation by other users to do so. :scream:

This was never recommended by Plex, and I can only advise everyone to avoid that. It moves your server machine out of the protection of your router’s firewall.
Yes, a network expert can configure a machine so it is also relatively safe when exposed in a DMZ. But how many Plex users are actual network experts?

1 Like

Manually assigning a different public port, would it cause any trouble for LAN connected devices? ATV, tablets, etc?

No, because these devices connect directly to the server and don’t take the public route (unless there is a configuration problem.)

But even then, they will ask plex.tv for the domain name and the port number of the server.
This is all handled automatically, unless you have defined a “custom server access URL” (which you only need to do in special cases).

Perfect. Thanks!

Would someone be able to advise to a beginner what I need to do as simple mitigation until there is a code fix?

Ideally using simple terms/language. I’m semi technically literate but a beginner in terms of network setup etc. So I’m pretty sure my own PMS is running the default

I have mine on a random port and my firewall only allows TCP traffic on this port. I was recently trying to geo restrict to only allow valid Plex traffic in. I was going through the Plex logs and trying to see where the Plex servers are located, but I gave up after a while. I had 8 or 9 countries allowed but I was still having valid packets not getting through. Is there a definitive list of the countries where Plex are running servers to limit traffic just to those?

If you don’t want to dive into the settings of your router, disable Plex remote access for now
under Settings - Server - Remote access

3 Likes