6.1.1 Ensure Show All Filename Extensions Setting is Enabled

Information

A filename extension is a suffix added to a base filename that indicates the base filename's file format.

Rationale:

Visible filename extensions allow the user to identify the file type and the application it is associated with which leads to quick identification of misrepresented malicious files.

Impact:

The user of the system can open files of unknown or unexpected filetypes if the extension is not visible.

Solution

Graphical Method:
Perform the following steps to ensure file extensions are shown:

Open Finder

Select Finder in the menu bar

Select Settings

Select Advanced

Set Show all filename extensions to enabled

Terminal Method:
Run the following command to enable displaying of file extensions:

$ /usr/bin/sudo -u <username> /usr/bin/defaults write /Users/<username>/Library/Preferences/.GlobalPreferences.plist AppleShowAllExtensions -bool true

$ /usr/bin/sudo killall Finder

example:

$ /usr/bin/sudo -u seconduser /usr/bin/defaults write /Users/secondname/Library/Preferences/.GlobalPreferences.plist AppleShowAllExtensions -bool true

$ /usr/bin/sudo killall Finder

Default Value:

Filename extensions are turned off by default.

See Also

https://workbench.cisecurity.org/files/4159