Attacking UNIX Systems via CUPS, Part I | CUPS Remote Code Execution (www.evilsocket.net)
from that_leaflet@lemmy.world to linux@lemmy.ml on 26 Sep 2024 20:25
https://lemmy.world/post/20220119

Red Hat’s report on vulnerability

Phoronix

#linux

threaded - newest

henfredemars@infosec.pub on 26 Sep 2024 20:46 next collapse

Entirely personal recommendation, take it or leave it: I’ve seen and attacked enough of this codebase to remove any CUPS service, binary and library from any of my systems and never again use a UNIX system to print. I’m also removing every zeroconf / avahi / bonjour listener. You might consider doing the same.

Great advice. It would appear these developers don’t take security seriously.

masterofn001@lemmy.ca on 26 Sep 2024 20:57 next collapse

Mdns is something most people have no idea exists.

Oh, neat, all my devices broadcast all their open ports, services, addresses, hardware and names? Cool!

No.

ryannathans@aussie.zone on 26 Sep 2024 23:11 next collapse

Going to rely on security through obscurity instead?

SmoothLiquidation@lemmy.world on 26 Sep 2024 23:48 next collapse

If your router/firewall is configured to let these broadcasts through you have a problem. If it is working correctly and you have an attacker on your lan? You have already lost.

Majestic@lemmy.ml on 27 Sep 2024 03:52 next collapse

It depends. If you’re using a laptop and say you take it to university or work then you’re not on your LAN. You’re on someone else’s LAN and they may have no interest in trying to stop these types of attacks via any kind of client isolation or it may be incomplete.

I can imagine it’s a very normal scenario for university students to have CUPS running and available on all networks as they may need to print at their university.

Nunar@lemmy.world on 27 Sep 2024 06:28 collapse

You’ve just described every enterprise who allows Linux in their environment.

nialv7@lemmy.world on 27 Sep 2024 16:21 collapse

Errr I use mdns all the time…

ryannathans@aussie.zone on 26 Sep 2024 23:11 collapse

Someone doesn’t like apple

masterofn001@lemmy.ca on 26 Sep 2024 23:58 next collapse

They’re standardised zeroconnf protocols. Apple was part of the early development.

Bonjour is the apple implementation for mDNS.

Avahi is the GPL compliant implementation.

mDNS, llmnr (ms developed), have been known for ages to be vulnerable.

…m.wikipedia.org/…/Zero-configuration_networking#…

*I don’t like apple

ryannathans@aussie.zone on 27 Sep 2024 02:27 collapse

To be vulnerable to what?

masterofn001@lemmy.ca on 27 Sep 2024 02:30 collapse

duckduckgo.com/?q=mdns+vulnerability&t=fpas&ia=we…

book.hacktricks.xyz/…/spoofing-llmnr-nbt-ns-mdns-…

ryannathans@aussie.zone on 27 Sep 2024 06:56 collapse

I could similarly link you an internet search for http or tls vulnerability, I fail to see your point

Nunar@lemmy.world on 27 Sep 2024 06:27 collapse

Nobody likes Apple. They’re just afraid to say they don’t.

kbal@fedia.io on 26 Sep 2024 20:35 next collapse

cups-browsed <= 2.0.1 binds on UDP INADDR_ANY:631 trusting any packet from any source

Well that would explain why I didn't have it installed (although I did have other parts of cups until jwz coincidentally reminded us two days ago that it can all be removed if you don't have a printer.) I clear out anything that opens ports I don't need to be open. A practice I would recommend to anyone.

Draghetta@lemmy.world on 26 Sep 2024 21:37 collapse

I mean I guess that’s sound advice if you don’t need to, I don’t know, print?

kbal@fedia.io on 26 Sep 2024 21:43 collapse

Indeed. But cups-browsed isn't necessary in order to be able to print things, it's for automatically discovering new printers on the network.

Grass@sh.itjust.works on 26 Sep 2024 21:09 next collapse

damn. that’s a pretty shit one.

JubilantJaguar@lemmy.world on 26 Sep 2024 22:44 next collapse

BRB.

sudo apt purge cups

Done. This should not even be part of baseline Ubuntu desktop. Speaking for myself but I have not had a printer for about 15 years. The paperless office really did become reality.

dr_jekell@lemmy.world on 27 Sep 2024 03:54 collapse

About 25 years for me.

For most people it’s a better option to use a local print shop for the odd times that they need something printed.

More options for printing too.

DarkMetatron@feddit.org on 27 Sep 2024 16:42 collapse

I don’t know if I would like to have my personal data that I needed to print out on any system in a print shop. Printers and Copy machines in print shops often have internal HDD where the files are stored for caching reasons, often for months or even years (depending of the size of the HDD and how much the device is used) until some internal cleanup process deletes them.

BCsven@lemmy.ca on 26 Sep 2024 22:54 next collapse

Udp sent to port 631. Isn’t firewall on router going to block that anyway?

ryannathans@aussie.zone on 26 Sep 2024 23:12 collapse

Firewall on everything gonna block that lol

BCsven@lemmy.ca on 27 Sep 2024 17:11 collapse

Right so whats the issue here? If I have cups exposed to the internet I deserve to get ruined. LOL

InverseParallax@lemmy.world on 28 Sep 2024 18:04 collapse

An infected phone app on your wifi can screw you.

gramgan@lemmy.ml on 27 Sep 2024 02:41 next collapse

Wait, so how do we print now?

mvirts@lemmy.world on 27 Sep 2024 04:50 next collapse

Lol what has more of an attack surface: CUPS or a reactos VM?

[deleted] on 27 Sep 2024 11:09 next collapse

.

electricprism@lemmy.ml on 27 Sep 2024 15:58 collapse

RPI print server + sshfs?

dingdongitsabear@lemmy.ml on 27 Sep 2024 09:43 next collapse

I mean, OK, it’s a vulnerability and there are interesting implications, but this is hardly significant in any pracitcal sense of the word.

the potential victim has to run their system without a firewall, has to print to the printer they’ve never interacted with before and then the attacker can run shit with whatever the printing system’s user id is, which shouldn’t be an issue on any reasonably modern distro.

I routinely remove cups and friends from any system I run because I have no need for printing and it bothers me to see it constantly during every system upgrade.

LiveLM@lemmy.zip on 27 Sep 2024 10:15 next collapse

Worse than the exploit, is hearing the struggles the author faced to report it

Twenty-two days of arguments, condescension, several gaslighting attempts, more or less subtle personal attacks, dozens of emails and messages, more than 100 pages of text in total. Hours and hours and hours and hours and fucking hours. Not to mention somehow being judged by a big chunk of the infosec community with a tendency of talking and judging situations they simply don’t know.

Zier@fedia.io on 27 Sep 2024 06:52 next collapse

I had updates today that were security related about this.

DarkMetatron@feddit.org on 27 Sep 2024 16:45 next collapse

I have cups (but not cups-browsed) installed, but I only start the service when I need to print something a few times a year. Until then it is only a binary sitting in a folder, nothing more.

possiblylinux127@lemmy.zip on 27 Sep 2024 18:10 collapse

Honestly it isn’t a big deal if you just use it on local host. Just make sure cups is sandboxes like it should be. (Systemd)

DarkMetatron@feddit.org on 27 Sep 2024 19:52 collapse

Yes, but exactly that was/is the issue of this bug. cups-browsed was attaching itself to every available IP on the system. And cups-browsed can’t only be bind to localhost, it would defeat the whole purpose of that tool. For it to be able to find other printers in the network it needs to be bound to a non-localhost-IP address. So, not much to sandbox

KLISHDFSDF@lemmy.ml on 28 Sep 2024 03:59 collapse

Oh, hey! Wasn’t even a problem for me.

<img alt="" src="https://lemmy.ml/pictrs/image/686d526e-6e7e-4d16-8b3e-060de4b8473e.png">