Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.
/ SudoEvade Public archive

A weird Linux/Unix tool that allows root execution of bash commands, but without a password.

License

Notifications You must be signed in to change notification settings

dehydratedpotato/SudoEvade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SudoEvade

Execute Bash commands with root privileges, without entering a password or editing your Sudoers file.

MacOS Linux Releases License

Project Deetds

How the Command Works

In order to run commands as root without the usual requirements of bash, SudoEvade leverages the power of a launch Daemon.

  1. The client binary captures your inputted command string and saves it to a file.
  2. When that file changes, the Daemon Helper may read it and find the location of the command's binary.
  3. Once found, the Daemon Helper clones the binary to a hidden directory and modifies the clone to elevate it's privileges.
  4. 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.

Usage Warning

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...

Installation and Usage

  1. Download the .zip file from the latest release.
  2. 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.
  3. 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".

Issues

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.

Support

If you would like to support this project, a small donation to my Cash App would be much appreciated!