Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Covers T1036.006: attackers add trailing spaces to filenames so macOS/Linux run disguised binaries. Includes checks, Atomic Red Team tests.
32% 86%+55 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 7 of 22 without it.
3 of 3 safety checks passed
Not used yet
Sub-technique of: T1036
Adversaries can hide a program's true filetype by changing the extension of a file. With certain file types (specifically this does not work with .app extensions), appending a space to the end of a filename will change how the file is processed by the operating system.
For example, if there is a Mach-O executable file called evil.bin, when it is double clicked by a user, it will launch Terminal.app and execute. If this file is renamed to evil.txt, then when double clicked by a user, it will launch with the default text editing application (not executing the binary). However, if the file is renamed to evil.txt (note the space at the end), then when double clicked by a user, the true file type is determined by the OS and handled appropriately and the binary will be executed .
Adversaries can use this feature to trick users into double clicking benign-looking files of any format and ultimately executing something malicious.
Platforms: Linux, macOS
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Space After Filename
Supported Platforms: macos
Space after filename.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.