Rat Game (RottaPeli) Mac OS

MacSpy is advertised as the 'most sophisticated Mac spyware ever”, with the low starting price of free. While the idea of malware-as-a-service (MaaS) isn’t a new one with players such as Tox and Shark the game, it can be said that MacSpy is one of the first seen for the OS X platform.

The authors state that they created this malware due to Apple products gaining popularity in the recent years. They also state that during their tenure in the field that they have noticed a lack of 'sophisticated malware for Mac users' and they believe that 'people were in need of such programs on MacOS'. So they created MacSpy. The MacSpy authors claim to have the following features in the free version of their RAT:

If you are willing to pay an unknown amount of bitcoins for the advanced version, the malware authors advertise the following features:

A short matching game where you can accessorize a rat with found-fashion. Jam Site: MICA Game Lab. Platforms: MS Windows, Mac OS X.

Rat Game (RottaPeli) A downloadable game for Windows, macOS, and Linux You are a rat in a potato cellar trying to feed your bottomless stomach all the while trying to avoid the ever so vigilant old lady with a flashlight and a shotgun loaded with some southern hospitality. Mac OS’s Mouse Acceleration Issue. A few Google searches will tell you that Mac OS has an issue with mouse acceleration with high DPI mice, AKA “gaming mice”. To add insult to injury, some.

Game

MacSpy is not as polished as some of the malware-as-a-service providers out there, as there doesn’t seem to be any customer facing automated service of signing up for their service. In order to receive a copy of MacSpy we had to email the author our preferred username and password, in order for them to make us an account. After confirming our details they created an account for us, and delivered a zipped file and the following instructions:

Initial Analysis

After unzipping the archive we observed it contained the following files:

The archive contains four files:

  • Mach-O 64-bit executable called 'updated'
  • Mach-O 64-bit executable called 'webkitproxy'
  • Mach-O 64-bit dynamically linked shared library called 'libevent-2.0.5.dylib'
  • Config file

After examining webkitproxy and libevent-2.0.5.dylib, we noted they are signed by Tor, and thus we concluded that they are related to the function of Tor Onion routing. The contents of the config file further convince us of our suspicions are correct:

Config Contents

The 'updated' file, on the other hand is not digitally signed, and it is currently completely undetected by various AV companies on VirusTotal.

Anti-Analysis

MacSpy has several countermeasures that hamper analysis efforts. To prevent debugging, it calls ptrace() with the PT_DENY_ATTACH option. This is a common anti-debugger check and will prevent debuggers from attaching to the process.

If you bypass the ptrace countermeasure, MacSpy has additional code that checks if it is running in a debugger.

The code above is very similar to the debugger checking code from this Stack Overflow post.

In addition to the anti-debugging countermeasures, MacSpy contains checks against the execution environment that can make it difficult to run in a virtual machine. In the code below, you can see that MacSpy checks that the number of physical CPUs is greater than 1, the number of logical cores is greater than 3, and the number of logical cores is twice the number of physical cores. MacSpy also checks that there is at least 4 GB of memory on the host. Since malware sandboxes often run with minimal resources, these checks can prevent proper execution in virtual environments.

Similar to MacRansom, MacSpy also compares the machine model to 'Mac' using the 'sysctl' command. MacSpy will kill all Terminal windows which can be annoying to analysts using command line tools to analyze the malware (OSX/Dok exhibits similar behavior by killing Terminal windows).

Persistence

In order to persist on the system the malware creates a launch entry in ~/Library/LaunchAgents/com.apple.webkit.plist. This ensures that the malware will run at start up to continue collecting information.

Behavior Analysis:

Upon execution, successfully passing the anti-analysis checks and setting persistence, the malware then copies itself and associated files from the original point of execution to '~/Library/.DS_Stores/' and deletes the original files in an attempt to stay hidden from the user. The malware then checks the functionality of its tor proxy by utilizing the curl command to contact the command and control server. After connecting to the CnC, the malware sends the data it had collected earlier, such as system information, by sending POST requests through the TOR proxy. This process repeats again for the various data the malware has collected. After exfiltration of the data, the malware deletes the temporary files containing the data it sent.

High five romance race mac os. The following curl command used to exfiltrate data:

Contents of ~/Library/.DS_Stores/data/tmp/SystemInfo

User Web Portal

In our initial email to the malware authors we sent a set of credentials that we wanted to use in their web portal. After logging into the MacSpy web portal you are greeted with a very bare bones directory listing containing a folder labeled the most recent date of the malware executing on a system in the YYYYMM format, followed by a folder in the DD format. Diving into that folder you're treated with a series of directories similar to that of the directory naming on the victim system. Inside these folders is the data that was collected from the victim the malware was executed on.

Detection

NIDS

The best way to detect MacSpy running on a Mac is to use a combination of Network IDS (NIDS) rules as it communicates. As it turns out, AlienVault provides this rule in its threat intelligence, which has already been updated with a rule called 'System Compromise, Malware RAT, MacSpy'. This feeds into the USM correlation engine to generate an alarm that will notify AlienVault customers that one of their systems is compromised.

Osquery

Yara

You can use the rule below in any system that supports Yara to detect this Mac-based malware.

Conclusion

People generally assume when they are using Macs they are relatively safe from malware. This has been a generally true statement, but this belief is becoming less and less true by the day, as evidenced by the increasing diversity in mac malware along with this name family. While this piece of Mac malware may not be the most stealthy program, it is feature rich and it goes to show that as OS X continues to grow in market share and we can expect malware authors to invest greater amounts of time in producing malware for this platform.

If you want to find out more about this malware, here is a pulse we have in the AlienVault Open Threat Exchange (OTX):

Appendix:

6c03e4a9bcb9afaedb7451a33c214ae4
c72de549a1e72cfff928e8d2591d7e97
cc07ab42070922b760b6bf9f894d0290
27056cabd185e939195d1aaa2aa1030f
f38977a34b1f6d8592fa17fafdb76c59

The number of malware attacks on Apple devices has grown steadily over the past few years, with 2017 registering the highest number ever of malware families designed specifically for Mac OS X. Macs are attractive to hackers who take advantage of the falsely promoted idea that Macs are not susceptible to malware.

Back in 2016, we detected the active development of ransomware for Macs. First there were proof-of-concept attempts such as Gopher and Mabouia, followed almost immediately by commercial ransomware ready for prime time. We’re not talking about innocent pranks or proof-of-concept experiments, here—but Trojans with serious destructive capabilities, adware, potential unwanted apps, and exploit kits targeting Macs and widely available third-party apps.

And don’t let the term “aggressive adware” trick you into downplaying the threat. Most of these grey-area software applications thoroughly profile user activity, log site visits, and sometimes give their creators the ability to install additional software as part of the “promotional offers.” When browsing the Internet, users must be careful downloading applications, because many are bundled with adware that, once installed, can hijack the browser, redirect the search, or install other backdoors into the device.

Innovation is key

There’s been significant innovation in modern Mac malware, and for cyber criminals this is essential to winning the cat-and-mouse game with Apple. For example, some Mac malware variants can easily bypass basic security solutions, making detection almost impossible. This is the case of the FruitFly surveillance malware that had allegedly operated undetected since 2014 and was only identified in January 2017. This sophisticated piece of malware allowed hackers to spy on hundreds of Macs and have full control over the affected devices, including webcams and connectivity to other devices in the network. Although Apple immediately patched the hole, a bunch of variants have emerged in the wild.

Not only FruitFly drew attention. A new Trojan dubbed Proton Remote Access Trojan emerged. The variant spread through a supply chain compromise when a download mirror of the HandBrake app was hijacked. This RAT specialized in stealing passwords stored in OSX KeyChain and the browser.

Predictions for 2018 are not any brighter. Malware and online threats for Macs are expected to evolve faster than ever, and new, novel malware distribution methods like social engineering-based campaigns, phishing emails, and possibly dangerous applications in the Apple store continue to emerge. Potential unwanted programs that are aggressively promoted via advertising campaigns on websites the world over, will extensively target Mac users.

Rat Game (rottapeli) Mac Os 8

Even the Apple Mac App store has a fair share of malicious applications that manage to fly under the radar, despite the strong scrutiny during approval.

Rat Game (rottapeli) Mac Os X

Unfortunately, we’re very far away from finding a silver bullet for perfect Mac security. And Mac OS X defenses, although robust, are not enough to protect devices from the dominant malware families. This is why security experts recommend the installation of a security solution that is certified to detect the stealthiest of Mac malware. https://do-win-sadt-in-you-sweet-free-bet-how-much-roulette.peatix.com.