See runZero in action

Contact us to book a demo with our team.

How to find Samba v4 instances

, by HD Moore
icon

How to find Samba v4 instances #

On October 10th, the Samba team announced an interesting vulnerability that could allow a remote attacker to connect to unix stream sockets on the Samba server. The issue occurs when a RPC service name is requested that contains a unix directory traversal sequence (../). The vulnerability is being tracked as CVE-2023-3961 and may enable remote code execution and esclation of privilege attacks using system-specific unix stream sockets. These sockets are typically used for interprocess communication and commercial NAS vendors may be more exposed than a standard systemd-based Linux installations. The Samba project scored this as CVSS 3.1: AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N (6.8), but the actual risk may vary drastically by implementation.

What is the risk? #

The actual risk may vary wildly given the different implementations of Samba across open source and commercial systems. On a typical Ubuntu Linux (22.04) system, unix stream sockets associated with the core systemd service (system_bus_socket) may enable denial of service at the least. In commercial implementations, such as Synology NAS devices, the exposed unix stream sockets may expose much more:

/run/filestation/thumbd.sock
/run/postgresql/.s.PGSQL.5432
/run/recycle_bin/daemon.sock
/run/samba/nmbd/unexpected
/run/syno_background_task.sock
/run/synocached.sock
/run/synologan.sock
/run/synoscgi_domain_socket.sock
/run/synoscgi-fastapi.sock
/run/synoscgi.sock
/run/synoscgi_socket.sock
/run/syslog-ng/syslog-ng.ctl
/run/systemd/journal/stdout
/run/systemd/private
/run/udev/control
/tmp/iscsi/plugin_server.sock
/tmp/rtsp_socket_server
/tmp/S2S/daemon.sock
/tmp/ssmessaged.sock
/tmp/ssmobiled.sock
/tmp/ssrtpdataprovider.sock
/tmp/sswebstreamd.sock
/tmp/synosnmpcd.sock
/tmp/synotaskmgr.sock
/tmp/synotokenmgr.sock
/tmp/synowstransfer.sock
/var/run/dbus/system_bus_socket
/var/run/synobackupd.socket
/var/run/synocgid/synocgid.apikey.get.socket
/var/run/synocgid/synocgid.checkreplayattack.socket
/var/run/synocgid/synocgid.htua.socket
/var/run/synocgid/synocgid.remove.by.attr.socket
/var/run/synocgid/synocgid.remove.user.socket
/var/run/synocgid/synocgid.session.add.socket
/var/run/synocgid/synocgid.session.check.socket
/var/run/synocgid/synocgid.session.crypto.box.socket
/var/run/synocgid/synocgid.session.exist.socket
/var/run/synocgid/synocgid.session.getbyid.socket
/var/run/synocgid/synocgid.session.getid.socket
/var/run/synocgid/synocgid.session.get.socket
/var/run/synocgid/synocgid.session.resume.socket
/var/run/synocgid/synocgid.session.update.socket
/var/run/synocgid/synocgid.session.write.to.file.socket
/var/run/synocgid/synocgid.ssldecrypt.socket
/var/run/synoelasticd.sock

What is Samba? #

Samba is an incredibly popular open source software project that describes itself as “the standard Windows interoperability suite of programs for Linux and Unix”. Samba is used in most implementations of SMB/CIFS outside of Microsoft Windows, Apple macOS, and a few commercial network storage vendors. In short, Samba is used to enable SMB file transfers, and to power Active Directory implementations without Microsoft Windows servers.

Are updates available? #

The Samba team has issued updates in versions 4.19.1, 4.18.8 and 4.17.12 to address this issue. Samba is widely used across many devices and virtual appliances, including common network attached storage (NAS) and file server functionality on Linux-based routers. Updates to all distributions, packaging formats, and commercial variants may take considerable time to become available.

How do I find potentially vulnerable versions of Samba with runZero? #

Samba v4 services can be found by navigating to the Service Inventory and using the following pre-built query:

_asset.protocol:smb protocol:smb product:samba _service.product:"Samba:Samba:4"

Results from the above query should be triaged to determine if they require patching or vendor intervention.

As always, any prebuilt queries are available from your runZero console. Check out the documentation for other useful inventory queries.

Get runZero for free

Don’t have runZero and need help finding Samba v4 instances?

Get started
Learn more about runZero
HD Moore
Written by HD Moore

HD Moore is the co-founder and CEO of runZero. Previously, he founded the Metasploit Project and served as the main developer of the Metasploit Framework, which is the world's most widely used penetration testing framework.

Similar Content

November 9, 2023

How to find SysAid Help Desk instances

How to find SysAid Help Desk instances # On the evening of November 8th Microsoft Threat Intelligence announced that they had discovered attacks by a ransomware gang against the SysAid Help Desk software using a zero-day exploit (CVE-2023-47246). These attacks leveraged a …

Read More

November 1, 2023

How to find Apache ActiveMQ instances

How to find Apache ActiveMQ® instances # On October 25th the Apache team announced a vulnerability (CVE-2023-46604) in ActiveMQ that could lead to unauthenticated remote code execution. Shortly after the issue was disclosed exploits started to appear and the Rapid7 MDR team …

Read More

October 30, 2023

Finding NGINX Ingress Controllers with runZero

Today, three vulnerabilities in the NGINX Ingress Controller for Kubernetes were disclosed, as described in this article from The Hacker News. These vulnerabilities have CVSS scores ranging from 7.6 to 8.8; all of these scores are considered high. These vulnerabilities have …

Read More