Skip to content

Latest commit

 

History

History
37 lines (16 loc) · 1.53 KB

T1036.006.md

File metadata and controls

37 lines (16 loc) · 1.53 KB

T1036.006 - Space after Filename

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 (Citation: Mac Backdoors are back).

Adversaries can use this feature to trick users into double clicking benign-looking files of any format and ultimately executing something malicious.

Atomic Tests


Atomic Test #1 - Space After Filename

Space After Filename

Supported Platforms: macOS

Run it with these steps!

    1. echo '#!/bin/bash\necho "print "hello, world!"" | /usr/bin/python\nexit' > execute.txt && chmod +x execute.txt
  1. mv execute.txt "execute.txt "

  2. ./execute.txt\