How does sharepoint recognize a file type?

How does sharepoint determine the type of file? For example, SharePoint will not allow you to download executable files. Suppose, if I rename a file extension from .exe to say .doc, will sharepoint download this file?

+4
source share
3 answers

Sharepoint recognizes file types using their extensions.

If you are concerned about users distributing malicious application / code on their Sharepoint sites. I suggest you take a look at Microsoft Forefront for Sharepoint .

You can change the list of excluded extensions in the Central Administration> Operations> Blocked File Types section.

+6
source

I believe that there are two ways to determine file types. The naive approach is to check the extension. A safer approach would be to examine the bits of a file and see which file type has as many file types as there are bits ( magic numbers ) in the header that identifies the format.

Depending on how SharePoint validates the file, this will determine how you can trick the system.

0
source

SharePoint itself is not very smart and relies on file extensions, so renaming files will bypass it.

Forefront for SharePoint performs file validation, therefore it should be included in the list of mandatory for any appearance (and internal, if you allow staff to install / run unknown software).

You can manage the list of locked files in the central administrator in the "Types of operations / locked files" section. Note: this is for webapp!

0
source

Source: https://habr.com/ru/post/1277770/


All Articles