Below are selected solutions for the Chapter 14 workshop questions from Cybersecurity Ops with bash. Note - These are just examples, many possible solutions exist.
Obfuscate the following script by using the techniques described earlier to make it difficult to follow.
You can use logic obfuscation to make even this simple script challenging to trace. Here is an example.
The output of both scripts is exactly the same. See if you can trace through the code and figure out how it works. Hint - the ^ character is the exclusive-or operator in bash.
As you can see, logic obfuscation makes tracing the script more difficult, but it is not an impossible task. This technique simply slows down the reverse engineering process. However, you can combine logic obfuscation with encryption to create a formidable challenge.