A backdoor version targeting macOS devices is now using an innovative method to cover the fact that it is an executable. According to security researchers, the main purpose of the new technique is to avoid alerting users on its execution.
The backdoor variant is called HiddenLotus, and it is distributed via an application named Lê Thu Hà (HAEDC).pdf, which is disguised as an Adobe Acrobat file.
The technique which the application uses for this behavior inspires the file quarantine feature introduced in Leopard (Mac OS X 10.5), where files downloaded from the Internet are tagged as quarantined.
Should the downloaded file be an executable, such as an application, a pop-up notification warns the user on the fact when they attempt to open the file.
The HiddenLotus backdoor is a new variant of the OceanLotus backdoor which was last spotted this summer. At that time, the malware was disguised as a Microsoft Word document targeting users in Vietnam, however, since then the disguise has reached a higher level.
The main difference between the two malware variants is the fact that the older version had a hidden .app extension indicating that it was an application, while the HiddenLotus has a .pdf extension and features no .app extension.
According to the experts, this is likely due to the fact that the malware uses a hidden extension, where the ‘d’ in .pdf is actually the Roman numeral ‘D’ (representing the number 500) in lowercase.
“An application does not need to have a .app extension to be treated like an application. An application on macOS is actually a folder with a special internal structure called a bundle. A folder with the right structure is still only a folder, but if you give it an .app extension, it instantly becomes an application,” the researchers say.
Due to this fact, the Finder treats the folder as a single file and launches it as an application when double-clicked, instead of opening the folder.
Once the user double-clicks a folder or a file, LaunchServices considers the extension first and opens the item accordingly, if it knows the extension.
Files with a .txt extensions will be opened with TextEdit by default. Therefore, a folder with the .app extension will be launched as an application, should it have the right internal structure. In case the extension is unknown, the user is consulted when trying to open the file, and they can choose an application to open the file or search the Mac App Store.
However, when double-clicking a folder with an unknown extension, LaunchServices falls back on looking at the folder’s bundle structure.
This is how the creator of HiddenLotus leverages: the dropper is a folder that has the internal bundle structure of an application. Because of the use of a Roman numeral in the .pdf extension and as there is no application registered to open it, the system treats it as an application even though it does not have a telltale .app extension.
The security experts note that there is a huge list of possible extensions which hackers could abuse, especially when using Unicode characters. Considering this fact, users could be easily manipulated to open files such as mimic Word documents (.doc), Excel spreadsheets (.xls), Pages documents (.pages), etc.
“This is a neat trick, but it’s still not going to get past file quarantine. The system will alert you that what you’re trying to open is an application. Unless, of course, what you are opening was downloaded via an application that does not use the APIs that properly set the quarantine flag on the file, as is the case for some torrent apps,” the experts state.