I'm well aware in the concept of binary malware but I don't fully understand the idea of a script-based (or shell script) malware. I am more interested in the difference especially in how script-based malwares are multi-platform and can work across architectures, as opposed to normal binary malwares.
1 Answer
In an interpreted programming language the interpreter is compiled for each architecture but the scripts they interpret can generally be interpreted on any platform. Generally functions which might be operating system dependent (such as various system calls) are abstracted so the functions available in the interpreted language work the same regardless of OS.
Also relevant: Can a .sh file be malware? http://en.wikipedia.org/wiki/Interpreted_language
-
In interpreted language, the script is not compiled, but interpreted! But the interpreter is compiled for each architecture. See also: Interpreted languages Commented Jul 6, 2014 at 9:08
-
@F.Hauri that's exactly what I said "the interpreter is compiled for each architecture".– thexacreCommented Jul 6, 2014 at 9:33
svdo rm -rf /
-- it's a script command that does something bad (deletes your root folder, recursively). Obviously there's worse (like searching for passwords, joining botnet, etc.)