Monday, March 17, 2025
HomeComputer SecurityNew Dirty Sock Vulnerability Allows Hackers to Gain Root Access on...

New Dirty Sock Vulnerability Allows Hackers to Gain Root Access on Linux systems

Published on

SIEM as a Service

Follow Us on Google News

The researcher discovered a new privilege escalation vulnerability called Dirty Sock on Ubuntu Linux default installation lets attacker gain immediate root to the system.

This serious vulnerability existing in the Linux system’s default service called snapd API that allows any local user taking advantage and exploiting the flaw to gain the complete root access .

Chris Moberly, a researcher refer to this vulnerability as Dirty Sock and he was discovered in end of the January and reported to the Canonical team, a company behind the Ubuntu.

He was released an exploit that works 100% of the time on fresh, default installations of Ubuntu Server and Desktop.

Management of locally installed snaps and communication with ta his online store are partially handled by a systemd service called “snapd” (https://github.com/snapcore/snapd) which is running in Ubuntu under root user.

This vulnerability exactly located in the Snapd that serves up a REST API attached to a local UNIX_AF socket.

The researcher said, Access control to restricted API functions is accomplished by querying the UID associated with any connections made to that socket which allow to users access the any API function.

By having an access to the API function, attackers will use the different method to gain the root access.

Moberly published a Proof-of-code exploit in GitHub that was written in Python in order to perform the following operation against this vulnerability and Snapd versions 2.28 through 2.37 are all vulnerable to the Dirty Sock exploit.

  1. Creates a random file with the string ‘;uid=0;’ in the name
  2. Binds a socket to this file
  3. Connects to the snapd API
  4. Deletes the trojan snap (if it was left over from a previous aborted run)
  5. Installs the trojan snap (at which point the install hook will run)
  6. Deletes the trojan snap
  7. Deletes the temporary socket file
  8. Congratulates you on your success

This exploits only working for a local attacker to escalate the privilege in target Linux system and will not work remotely.

Ubuntu Team patched this vulnerability and released security updates for the Ubuntu Linux OS that tracked as CVE-2019-7304.

In this case, Linux users urged to update their system as soon as possible in order to avoid the exploiting circumstances.

You can follow us on Linkedin, Twitter, Facebook for daily Cybersecurity updates also you can take the Best Cybersecurity courses online to keep your self-updated.

Also Read:

New Linux Coin Miner that Deletes Other Linux Malware and Coin Miners

A New Critical RCE Vulnerability in LibreOffice that Exploit Windows & Linux Systems

Balaji
Balaji
BALAJI is an Ex-Security Researcher (Threat Research Labs) at Comodo Cybersecurity. Editor-in-Chief & Co-Founder - Cyber Security News & GBHackers On Security.

Latest articles

Jaguar Land Rover Hit by HELLCAT Ransomware Using Stolen Jira Credentials

The HELLCAT ransomware group has claimed responsibility for a significant data breach at Jaguar...

Hackers Exploit Tomcat Vulnerability to Hijack Apache Servers

A recent and significant cybersecurity threat has emerged involving a critical vulnerability in Apache...

European Cyber Report 2025: 137% More DDoS Attacks Than Last Year – What Companies Need to Know

Cyberattacks are no longer an abstract threat - they dominate risk planning for companies...

Apple Introduces RCS End-to-End Encryption for iPhone Messages

Apple has announced the integration of end-to-end encryption (E2EE) for Rich Communication Services (RCS)...

Supply Chain Attack Prevention

Free Webinar - Supply Chain Attack Prevention

Recent attacks like Polyfill[.]io show how compromised third-party components become backdoors for hackers. PCI DSS 4.0’s Requirement 6.4.3 mandates stricter browser script controls, while Requirement 12.8 focuses on securing third-party providers.

Join Vivekanand Gopalan (VP of Products – Indusface) and Phani Deepak Akella (VP of Marketing – Indusface) as they break down these compliance requirements and share strategies to protect your applications from supply chain attacks.

Discussion points

Meeting PCI DSS 4.0 mandates.
Blocking malicious components and unauthorized JavaScript execution.
PIdentifying attack surfaces from third-party dependencies.
Preventing man-in-the-browser attacks with proactive monitoring.

More like this

Hackers Exploit Tomcat Vulnerability to Hijack Apache Servers

A recent and significant cybersecurity threat has emerged involving a critical vulnerability in Apache...

Adobe Acrobat Vulnerabilities Enable Remote Code Execution

A recent disclosure by Cisco Talos' Vulnerability Discovery & Research team highlighted several vulnerability...

Hackers Target TP-Link Vulnerability to Gain Full System Control

Hackers exploit a vulnerability in TP-Link routers, specifically the TL-WR845N model, to gain full...