sudo-project / sudo

Utility to execute a command as another user
https://www.sudo.ws
Other
1.2k stars 224 forks source link

I can obtain root privileges using the command below #296

Closed dev4mobile closed 1 year ago

dev4mobile commented 1 year ago

❯ ssh opc@yuanyuan.remote [opc@instance-20220112-2214 ~]$ ls 1.txt a.out bak c cxx default.conf factorial.c file-final.pcap go hello.c main nohup.out php pre_download.pcap test tulip workspace [opc@instance-20220112-2214 ~]$ sudo script Script started, file is typescript [root@instance-20220112-2214 opc]# id uid=0(root) gid=0(root) groups=0(root) [root@instance-20220112-2214 opc]# id -Gn root [root@instance-20220112-2214 opc]# ext bash: ext: command not found [root@instance-20220112-2214 opc]# exit exit Script done, file is typescript [opc@instance-20220112-2214 ~]$ id -Gn opc adm wheel systemd-journal docker [opc@instance-20220112-2214 ~]$

millert commented 1 year ago

Presumably this is because the opc user has sudo privileges, likely due to it being a member of group wheel. You can run "sudo -l" to list the privileges for that user.

dev4mobile commented 1 year ago

![Uploading image.png…]()