Exploit: Dbus-1.0
A typical vulnerable rule looks like this (simplified):
import asyncio from dbus_next.aio import MessageBus from dbus_next import Message, MessageType, Variant async def bluetooth_exploit(): # Connect to the system bus bus = await MessageBus(bus_type='system').connect()
The vendor copied policy files from an old BlueZ version that trusted user="root" only, but they ran the Bluetooth daemon as root and forgot to add <deny user="*"/> for sensitive methods. The RegisterAgent method does not check if the caller has the CAP_NET_ADMIN capability. Part 5: Persistence and Lateral Movement Once you have D-Bus method execution on a privileged service, persistence becomes elegant. The Systemd Trap Systemd exposes org.freedesktop.systemd1.Manager on the system bus. A successful exploit chain can call: dbus-1.0 exploit
busctl list This returns a list of unique IDs (like :1.123 ) and well-known names (like org.freedesktop.NetworkManager ).
org.bluez β the BlueZ Bluetooth stack. Vulnerability: Many IoT vendors expose the AgentManager1 interface without the NoOutput capability check, allowing a local non-root user to pair with a device and then send arbitrary HCI commands. A typical vulnerable rule looks like this (simplified):
# Craft a method call to a method that normally requires admin # but is mis-policy'd: "SetProperty" on the adapter to force discoverable msg = Message( destination='org.bluez', path='/org/bluez/hci0', interface='org.freedesktop.DBus.Properties', member='Set', signature='ssv', body=['org.bluez.Adapter1', 'Discoverable', Variant('b', True)] )
Introduction In the sprawling ecosystem of the Linux desktop and embedded systems, D-Bus is the circulatory system. Itβs the inter-process communication (IPC) broker that allows your file manager to talk to your password manager, your media keys to control the player, and systemd to launch services on demand. Since its introduction with the dbus-1.0 protocol, it has become a universal constant on everything from GNOME to Automotive Grade Linux. The Systemd Trap Systemd exposes org
busctl --system tree org.bluez We find /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX β a connected device.