New digitally signed Mac malware confuses users with right-to-left file name tricks

The malware is digitally signed and is probably used in targeted attacks, researchers from F-Secure said

A new piece of digitally signed spyware for Mac OS X uses a special Unicode character in its file name to hide its real file extension from users and trick them into installing it.

The malware, which has been dubbed Janicab.A, is written in Python and is packaged as a stand-alone Mac application using the py2app utility, researchers from security firm F-Secure said Monday in a blog post.

It is distributed as a file called "RecentNews.?" where the "?" is actually the right-to-left override (RLO) character known as U+202E in the Unicode encoding standard.

Unicode supports characters from most languages, including those written from right to left like Arabic and Hebrew. The special RLO character tells software that the text following it should be displayed from right to left.

Apple displays double extensions for security reasons in the Mac OS X file manager, said Sean Sullivan, a security advisor at F-Secure, Tuesday via email. "Here, the RLO trick is being used to counter that and to make the .app appear to be a .pdf."

The trick itself is not new and has been used by Windows malware in the past, including by the Bredolab email spam malware and the Mahdi cyberespionage Trojan program that targeted computers in the Middle East.

Opening the Janicab .app file will trigger a standard Mac OS X pop-up dialog warning the user that the file was downloaded from the Internet. However, because of the RLO character in the file name, the entire warning text will be written right to left making it confusing and hard to read.

If users agree to open the file, the malware will install itself in a hidden folder in the user's home directory and will open a decoy PDF document containing what appears to be a news article in Russian.

Janicab continuously takes screenshots and records audio and uploads the collected data to command and control (C&C) servers that it finds by parsing the description of specific YouTube videos. It also queries the C&C servers for commands to execute, the F-Secure researchers said in the blog post.

Based on statistics for the YouTube videos whose descriptions are parsed by the malware, the malware's functionality and the contents of the decoy document, F-Secure researchers believe the malware is being used in targeted attacks, Sullivan said. However, the company doesn't have any information about the identity of the targets, he said.

Janicab samples were uploaded to the VirusTotal malware scanning service from five countries, but that information might reflect the locations of different security researchers, not victims, Sullivan said.

The malware's installer is digitally signed with a code-signing certificate -- an Apple Developer ID -- issued by Apple to a person named "Gladys Brady."

In May, security researchers found several samples of a Mac OS X backdoor-type program called KitM or HackBack, that were digitally signed with a valid Apple Developer ID issued to "Rajinder Kumar." One of those samples was collected from the Mac laptop of an Angolan activist attending the Oslo Freedom Forum, a human rights conference in Norway.

Researchers linked the KitM samples to a larger cyberespionage campaign of Indian origin dubbed Operation Hangover.

F-Secure reported the new certificate being abused by the Janicab malware to Apple, but has yet to receive confirmation of any action taken by the company, Sullivan said. "They quickly revoked the certificate in the previous KitM case," he said. "I have no doubt they'll also revoke this developer [ID] soon if they haven't already."

The F-Secure researchers believe that Apple is likely to create a removal tool for Janicab as it did for the "Pintsized" Mac OS X malware discovered in February.

"As the popularity of OS X continues to grow, Apple users have to get used to the fact that they will become targets for malware authors," said Gavin Millard, EMEA technical director at security firm Tripwire, via email. "Although the RLO (Right Left Override) approach of obfuscating the true extension of a file is simple to spot, users will still click, especially as they are not used to being targeted."

Join the CSO newsletter!

Error: Please check your email address.

Tags AppleMac OSsecurityTripwiref-securesoftwarespywareoperating systemsmalware

More about AppleBradyF-SecureTripwireUnicode

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: Will your data protection strategy be enough when disaster strikes?

    Speakers: - Paul O’Connor, Engagement leader - Performance Audit Group, Victorian Auditor-General’s Office (VAGO) - Nigel Phair, Managing Director, Centre for Internet Safety - Joshua Stenhouse, Technical Evangelist, Zerto - Anthony Caruana, CSO MC & Moderator

    Play Video

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

More videos

Blog Posts

Market Place