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

Has the use been successful? #4

Open
laowang1026 opened this issue Mar 4, 2022 · 2 comments
Open

Has the use been successful? #4

laowang1026 opened this issue Mar 4, 2022 · 2 comments

Comments

@laowang1026
Copy link

Linux version 4.19.91-20211117175159.ff8219c.al7.x86_64 (root@fbba8dd77f8f) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)) #1 SMP Wed Nov 17 09:57:56 UTC 2021

[*] Spraying kmalloc-32 [*] Opening ext4 filesystem fsopen: Remember to unshare

@laowang1026
Copy link
Author

Linux version 4.19.91-20211117175159.ff8219c.al7.x86_64 (root@fbba8dd77f8f) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)) #1 SMP Wed Nov 17 09:57:56 UTC 2021
./exploit fuse: device not found, try 'modprobe fuse' first [*] Opening ext4 filesystem fsopen: Remember to unshare

@bcoles
Copy link

bcoles commented Apr 25, 2022

The exploit uses the fuse technique and requires user name spaces (kernel.unprivileged_userns_clone = 1) as per the writeup.

Also, the exploit_fuse.c exploit only targets Ubuntu 5.x kernels based on mainline kernel versions 5.7 and higher.

This bug popped up since 5.1-rc1. It’s important to note that you need the CAP_SYS_ADMIN capability to trigger it, but the permission only needs to be granted in the CURRENT NAMESPACE.

The non-kctf version (fuse version) specifically targets Ubuntu with kernel version 5.11.0-44. It does not directly return a root shell, but makes /bin/bash suid, which will lead to trivial privilege escalation. Adjusting the `single_start` and `modprobe_path` offsets should allow it to work on most other Ubuntu versions that have kernel version 5.7 or higher; for versions between 5.1 and 5.7, the spray will need to be improved as in the kctf version. The exploitation strategy relies on FUSE and SYSVIPC elastic objects to achieve arbitrary write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants