1

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.

  • Can you elaborate on the meaning of "dangerous file extensions"? It sounds like you mean: double click the file will execute the program. – styfle Sep 1 '16 at 19:02
  • @styfle Yes, i mean this – user104787 Sep 1 '16 at 19:15
4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.