There are many dangerous file extensions in Windows with which an attacker could execute arbitrary commands on the target system. For example .exe, .js, .com, .wsh or .vbs. My question is now, are there such dangerous extensions in Linux or Unix systems.
Unix does not use file extensions that much, they are mostly introduced in Linux. Still then, the shell interpreter in Linux is activated when a file has execution permissions. Then the language specific interpreter specified on the first line is called with the current file as argument. This is different from Windows, where most files are bound to a extension class (HKEY_CLASSES_ROOT). One can call the interpreter directly and supply the file-to-execute as an argument, in this case there is no need for
+x on the file itself.
Files that are executable by themselves (ELF in Linux and most Unices, Mach-O in OS X) always need the execution flag. They are executed when called, regardless of the extension (or contents).
#nerd note: Executable programms can be run with only a
+r flag, if the
ld-linux.so was called first.