Execute Bash commands with root privileges, without entering a password or editing your Sudoers file.
In order to run commands as root without the usual requirements of bash
, SudoEvade leverages the power of a launch Daemon.
- The client binary captures your inputted command string and saves it to a file.
- When that file changes, the Daemon Helper may read it and find the location of the command's binary.
- Once found, the Daemon Helper clones the binary to a hidden directory and modifies the clone to elevate it's privileges.
- Once the cloned binary is finished, the client can then execute your inputted command using the cloned and modified binary.
There are easier ways SudoEvade could be implemented, but I specifically went this route because I thought it would be more interesting to deal with.
If you mess something up in your system running a command as root under SudoEvade when you should not have, don't blame me for your lost files, broken OS install, or whatever...
- Download the .zip file from the latest release.
- Unzip the .zip file and run the
install.sh
script in your terminal, like so:sudo bash PATH/TO/SCRIPT/install.sh -i
. To see all installer options, use arg-h
. - Once the installation is complete, you may execute a command with root priveleges using
sudoev
. To see all runtime options, use arg-h
.
To check that SudoEvade is working properly, run sudoev id -u
. If all is well, it should return a value of 0
.
If the install script fails and reports Daemon did not start
, run sudo bash PATH/TO/SCRIPT/install.sh -u
and then reinstall. If this fails, you may need to start the Daemon manually using one of the following command sets.
MacOS Manual Daemon Starting
sudo chmod 600 /Library/LaunchDaemons/com.bitespotatobacks.SudoEvade.plist
sudo launchctl load -w /Library/LaunchDaemons/com.bitespotatobacks.SudoEvade.plist
sudo launchctl start -w /Library/LaunchDaemons/com.bitespotatobacks.SudoEvade.plist
Make sure the Daemon is running by checking sudo launchctl list | grep "com.bitespotatobacks.SudoEvade"
..
Linux Manual Daemon Starting
sudo chmod 664 /etc/systemd/system/com.bitespotatobacks.SudoEvade.service
sudo systemctl daemon-reload
sudo systemctl start com.bitespotatobacks.SudoEvade
sudo systemctl enable com.bitespotatobacks.SudoEvade
Make sure the Daemon is running by checking systemctl | grep "com.bitespotatobacks.SudoEvade"
.
SudoEvade may suffer from issues when using certain shell builtins (like kill
) or commands that require access to system groups (like chown root:wheel
in macOS). Some of these problems can be worked around by using the tty piping arg -t
.
If any other bugs or issues are identified or you want your system supported, please let me know in the issues section.
If you would like to support this project, a small donation to my Cash App would be much appreciated!