Skip to content
arrow-alt-circle-up icon

Cyber Incident Call

arrow-alt-circle-up icon

00800 1744 0000

arrow-alt-circle-up icon

See all Threat Responses
 
On September 26 2024, a write-up was released describing vulnerabilities associated with CUPS, which is used for network printing using the Internet Printing Protocol (IPP). This vulnerability allows an attacker to perform arbitrary Remote Code Execution on UNIX systems using the CUPS service, potentially leading to unauthorised control over the system. We are writing this Threat Response since this disclosure was highly anticipated and many people feared a high-impact high-risk vulnerability. In this TR, we explain why the the probability of successful exploitation in most enterprise (server) environments is fairly unlikely.
 
Description
A series of at least four vulnerabilities in the Common Unix Printing System (CUPS), that have recently been reported by Simone Margaritelli[1], enable attackers to execute arbitrary code remotely on vulnerable machines. Proof-of-concept code to abuse this vulnerability has been released[2], which prompts us to release this Threat Response now. The CVEs associated to the vulnerabilities in question are:
  1. CVE-2024-47176
  2. CVE-2024-47076
  3. CVE-2024-47175
  4. CVE-2024-47177
One of the CUPS components, cups-browsed, which searches for advertised network or shared printers and makes them available for printing, listens on UDP port 631. It also allows remote connections from any device on the network. A remote unauthenticated attacker can silently replace existing printers’ (or install new ones) IPP urls with a malicious one. This enables the threat actor to perform arbitrary command execution on the system that actively utilises this hijacked print service (i.e., there is an active print job requested from the tampered CUPS service).
 
Impact
We estimate the impact of this vulnerability to be MEDIUM. While successful exploitations of the vulnerability enable attackers to remotely execute malicious code on target systems, the CUPS service runs with specific (lower privileged) permissions by default in many popular LINUX distributions such as Red Hat and Ubuntu. It is worth mentioning that the author of the write-up proclaims additional (unknown) vulnerabilities that are present within the service.
 
Risk
We estimate the risk of the vulnerability as LOW as attackers have several obstacles to get past. Some of the obstacles are:
  1. While the vulnerability enables remote code execution, its important to note that the attackers still need to be in the network and require a user to start a print-job.
  2. Attackers need to be able to connect to a computer via UDP, which is widely disabled on network ingress and the service is usually not on by default.
  3. Most Linux servers do not have CUPS installed by default, which reduces the potential targets.
  4. Effective firewall rules can block the necessary ports (UDP 631), preventing attacker’s packets from reaching the target.
  5. The CUPS service does not have extensive privileges by default on most *NIX distributions.
Mitigation
If CUPS is present in your environment, but not required for any business processes we recommend to take the following actions:
  1. Disable the cups-browsed service. Remove the service from running and prevent it from being started on reboot. The commands that can help with this[3]:
    sudo systemctl stop cups-browsed
    sudo systemctl disable cups-browsed
  2. Ensure that the CUPS service is not installed on servers.
  3. Ensure any inbound UDP port 631 traffic and DNS-Service Discovery traffic is blocked by your firewall. 
The actions below are recommended in any situation where CUPS is installed and used for business processes:
  1. Ensure that the CUPS service is not installed on servers that are not used for IPP.
  2. Block traffic to UDP port 631 and DNS-Service Discovery traffic from any source that is not required to interact with CUPS. Use firewall rules to restrict access and verify whether the service is indeed inaccessible from outside your network perimeter.
  3. Review and harden printer configurations, i.e., check for suspicious printer URLs or configurations.
What should you do?
Verify whether you are running any CUPS services on UNIX-based systems and follow the mitigation-steps above. At the time of writing this threat response, vendors are starting to roll-out patches to their respective distribution. If the service is required within your organisation, we recommend to keep track of any patch-releases and apply them when available.
 
What will Northwave do?
We will monitor any developments regarding this vulnerability. If new critical information about this threat arises we will reach out to you. You can call us by phone or send us an email if you would like additional information.
E-mail: soc@northwave.nl 
Do you have an incident right now? Call our Incident Response Team: 00800 1744 0000

Disclaimer applies, see below.
 
Sources
Op 26 september 2024 werd een artikel gepubliceerd waarin kwetsbaarheden werden beschreven in CUPS, dat wordt gebruikt voor netwerk printen met behulp van het Internet Printing Protocol (IPP). Door deze kwetsbaarheid kan een aanvaller willekeurige Remote Code Execution verkrijgen op UNIX-systemen die de CUPS-service gebruiken. Dit kan leiden tot ongeautoriseerde toegang tot systemen waar actief gebruik gemaakt wordt van deze service. In deze TR leggen we uit waarom de kans op een succesvolle exploitatie tamelijk onwaarschijnlijk is in de meeste enterprise (server) omgevingen.
 
Beschrijving
Een serie van minstens vier kwetsbaarheden in het Common Unix Printing System (CUPS), die zijn gerapporteerd door Simone Margaritelli[1], stellen aanvallers in staat om op afstand willekeurige code uit te voeren op kwetsbare machines. Proof-of-concept code om deze kwetsbaarheid te misbruiken is gepubliceerd[2], waardoor wij het relevant vinden hier een Threat Response voor te sturen. De CVE's die bij de kwetsbaarheden in kwestie horen zijn:
  1. CVE-2024-47176
  2. CVE-2024-47076
  3. CVE-2024-47175
  4. CVE-2024-47177
Een van de CUPS-componenten, cups-browsed, die naar netwerkprinters of gedeelde printers zoekt en deze beschikbaar maakt om af te drukken, luistert op UDP-poort 631. De service stelt actoren in staat remote verbindingen op te zetten vanaf elk willekeurig apparaat in het netwerk. Een niet-geauthenticeerde aanvaller kan op afstand de IPP-URLs van bestaande printers vervangen (of nieuwe printers installeren). Dit maakt het mogelijk willekeurige commando's uit te voeren op een computer waarop gebruik gemaakt wordt van deze gehijackte print service.
 
Impact
We schatten de impact van deze kwetsbaarheid in als MEDIUM. Hoewel succesvol misbruik van de kwetsbaarheid aanvallers in staat stelt om op afstand kwaadaardige code uit te voeren op doelsystemen, draait de CUPS-service standaard met specifieke (lagere geprivilegieerde) rechten in veel populaire LINUX-distributies zoals Red Hat en Ubuntu. Het is de moeite waard om te vermelden dat de auteur van de write-up aanvullende (onbekende) kwetsbaarheden binnen de service heeft aangekaart.
 
Risico
We schatten het risico van de kwetsbaarheid in als LAAG, omdat aanvallers aan verscheidene criteria moeten voldoen:
  1. Hoewel de kwetsbaarheid code-execution op afstand mogelijk maakt, is het belangrijk op te merken dat de aanvallers toegang tot het interne netwerk moeten hebben en daarnaast een gebruiker moet laten printen.
  2. Aanvallers moeten verbinding kunnen maken met een computer via UDP, wat op grote schaal is uitgeschakeld bij netwerkingang en de service is meestal niet standaard ingeschakeld.
  3. Op de meeste Linux servers is CUPS niet standaard geïnstalleerd, wat het aantal potentiële doelwitten verkleint.
  4. Effectieve firewall regels kunnen de benodigde poort (UDP 631) blokkeren, waardoor aanvallers het doelwit niet kunnen bereiken.
  5. De CUPS service heeft standaard geen uitgebreide rechten op de meeste *NIX distributies.
Mitigatie
Als CUPS geïnstalleerd is binnen uw organisatie, maar niet benodigd is voor belangrijke bedrijfsprocessen, dan raden we aan om CUPS compleet te verwijderen. Hiervoor kunt u de volgende acties uitvoeren:
  1. Schakel de service cups-browsed uit. Zorg dat de service niet meer draait en voorkom dat deze wordt gestart bij het opnieuw opstarten. De commando's die hierbij kunnen helpen[3]:
    sudo systemctl stop cups-browsed
    sudo systemctl disable cups-browsed
  2. Zorg ervoor dat de CUPS-service niet is geïnstalleerd op servers.
  3. Zorg ervoor dat inkomend UDP poort 631 verkeer en DNS-Service Discovery verkeer wordt geblokkeerd door de firewall.
In situaties waarin CUPS wel wordt gebruikt in belangrijke bedrijfsprocessen, raden wij aan ten minste de volgende acties uit te voeren:
  1. Zorg dat de CUPS-service niet is geïnstalleerd op systemen waar IPP niet gebruikt wordt.
  2. Blokkeer verkeer naar UDP poort 631 en DNS-Service Discovery vanuit elke locatie die niet hoeft te verbinden met de CUPS service. Gebruik uw host- en/of netwerk firewall om deze toegang te beperken en controleer of de service inderdaad ontoegankelijk is.
  3. Controleer de hardening van printer-configuraties en check de aanwezigheid van verdachte/onbekende URLs van printers op het netwerk.
Wat moet u doen?
Controleer of de CUPS-service geïnstalleerd is op UNIX-gebaseerde systemen en volg de bovenstaande mitigatiestappen. Op het moment van schrijven van deze Threat Response zijn verschillende vendors bezig patches beschikbaar te stellen voor deze kwetsbaarheid. Als de service nodig is binnen uw organisatie, raden we u aan om eventuele patch-releases in de gaten te houden en deze toe te passen zodra ze beschikbaar zijn.
 
Wat doet Northwave?
Northwave houdt de ontwikkelingen omtrent deze kwetsbaarheid in de gaten. Als er belangrijke nieuwe informatie omtrent deze dreiging bekend wordt, stellen wij u hiervan op de hoogte. Als u behoefte heeft aan extra informatie zijn we zowel telefonisch als via email bereikbaar.
E-mail: soc@northwave.nl 
Heeft u nu een incident? Bel ons Incident Response Team: 00800 1744 0000 
 
Disclaimer is van toepassing, zie onder.
 
Bronnen



 

 

Disclaimer

Northwave has made every effort to make this information accurate and reliable. However, the information provided is without warranty of any kind and its use is at the sole risk of the user. Northwave does not accept any responsibility or liability for the accuracy, content, completeness, legality or reliability of the information provided. We will not be liable for any loss or damage of whatever nature, direct or indirect, consequential or other, whether arising in contract, tort or otherwise, which may arise as a result of your use of, or inability to use, this information or any additional information provided by us in direct or indirect relation to the information provided here.