-
Notifications
You must be signed in to change notification settings - Fork 237
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
Not working on my focal #1
Comments
Can you try adding a |
same issue here. environment is same as above. Used a test user which is not in sudoers list. |
test@ubuntu20:~/CVE-2021-3156$ ./sudo-hax-me-a-sandwich 0 ** CVE-2021-3156 PoC by blasty [email protected] using target: 'Ubuntu 20.04.1 (Focal Fossa) - sudo 1.8.31, libc-2.31' Ok it works ;) When I use your fuzz2.py.. I can't find a good crash in nss_load_library() or in process_hook_getenv(). Any hint ? Thanks you ! |
@lyes06 Good to see you could get it working with a different user! |
It also doesn't work on my ubuntu 20.04 `$ ./sudo-hax-me-a-sandwich ** CVE-2021-3156 PoC by blasty [email protected] usage: ./sudo-hax-me-a-sandwich available targets:
$ ./sudo-hax-me-a-sandwich 0 ** CVE-2021-3156 PoC by blasty [email protected] using target: 'Ubuntu 20.04.1 (Focal Fossa) - sudo 1.8.31, libc-2.31' |
You get the Usage .. So I think your ubuntu is patched.. Try this : sudoedit -s '' If you get usage information... so you are patched. |
I haven't patch it soon, but you may right.
|
I confirm, you are patched :) |
I deleted my last post to explain again the problem. - Compilation with Make - No -DBRUTE option $ make $ ./sudo-hax-me-a-sandwich 0 ** CVE-2021-3156 PoC by blasty [email protected] using target: Ubuntu 18.04.5 (Bionic Beaver) - sudo 1.8.21, libc-2.27 ['/usr/bin/sudoedit'] (56, 54, 63, 212) - When I use the options used in brute.sh $ make brute $ ./sudo-hax-me-a-sandwich 0 ** CVE-2021-3156 PoC by blasty [email protected] using target: Ubuntu 18.04.5 (Bionic Beaver) - sudo 1.8.21, libc-2.27 ['/usr/bin/sudoedit'] (56, 54, 63, 212) And when we are using just the printf() in lib.c, brute.sh freez and it stoped |
- When the sploit works using target: Ubuntu 18.04.5 (Bionic Beaver) - sudo 1.8.21, libc-2.27 ['/usr/bin/sudoedit'] (56, 54, 63, 212)
$ ./brute.sh 50 60 50 70 200 220 Computers / CPU cores / Max jobs to run Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete |
I modified your script brute.sh and delete /2 used in the script. ETA: 56s Left: 454 AVG: 0.13s local:4/239/100%/0.1s NOPE
|
Same vagrant ubuntu/focal64 same libc + sudo version (manually compiled) and don't work, even don't seem exploitable: |
Same here, no luck with manually compiled sudo |
Hello,
Tested on my fresh install of focal.
user@ubuntu20:~/TEST/CVE-2021-3156$ ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
user@ubuntu20:
/TEST/CVE-2021-3156$ uname -a20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxLinux ubuntu20 5.8.0-41-generic #46
user@ubuntu20:
/TEST/CVE-2021-3156$ ls/TEST/CVE-2021-3156$ ./sudo-hax-me-a-sandwich 0hax.c lib.c libnss_X Makefile README.md sudo-hax-me-a-sandwich
user@ubuntu20:
** CVE-2021-3156 PoC by blasty [email protected]
using target: 'Ubuntu 20.04.1 (Focal Fossa) - sudo 1.8.31, libc-2.31'
** pray for your rootshell.. **
free(): invalid pointer
Aborted (core dumped)
user@ubuntu20:~/TEST/CVE-2021-3156$ cat /etc/issue
Ubuntu 20.04.1 LTS \n \l
user@ubuntu20:~/TEST/CVE-2021-3156$ /usr/bin/sudo --version
Sudo version 1.8.31
Sudoers policy plugin version 1.8.31
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.31
I've tested your fuzz2.py but I'not able to crash in process_hooks_getenv() or in nss_load_library()...
Only found Interesting crash in set_cmnd()...
The text was updated successfully, but these errors were encountered: