Apr 07, 2017 To open an unsigned app, you need to right-click or Control-click the app and select “Open”. This works on macOS Sierra as well as previous versions of macOS. You’ll be warned that the app is from an unidentified developer–in other words, it isn’t signed with a valid developer signature. If you trust the app, click “Open” to run it. X Lossless Decoder(XLD) is a tool for Mac OS X that is able to decode/convert/play various 'lossless' audio files. The supported audio files can be split into some tracks with cue sheet when decoding. It works on Mac OS X 10.4 and later. UNO Undercover 1.0 UNO Undercover for Mac lets players experience their classic favorite card game in two exciting modes. In Adventure mode, help Felicia Blue, an undercover secret agent posing as a professional UNO player, track down spies, foil their evil plots and regain her former glory by winning the UNO World Tournament.
WWDC Apple this year will boldly go where its peers have gone before by implementing support for encrypted DNS in iOS and macOS.
'Starting this year, Apple platforms natively support encrypted DNS,' said Tommy Pauly, internet technologies engineer, in a video presentation for Apple's 2020 Worldwide Developer Conference, virtualized this year by necessity.
More specifically, macOS 11, iOS 14, and Mac Catalyst framework 14 (for Mac version of iPad apps) will support DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH). These Apple operating system updates are scheduled for release later this year, likely in September or October.
When you visit a website with a browser, or connect to a service via an app, the software will, typically, in the background send domain-name system (DNS) queries to DNS servers, such as ones provided by your ISP, to translate domain names, like theregister.com, into network IP addresses the programs can use. These queries are typically sent unencrypted, meaning eavesdroppers on the network path can snoop on the names of sites and services you're using, and modify the query results to redirect you to malicious websites.
Encrypted DNS, as its name suggests, encrypts those queries to shield them from snoops and meddlers.
DoT started taking shape in 2014. A proposal to establish DoH as a standard was drafted in 2017. And a year later, a research paper presented at a Usenix conference underscored the need for better security when it reported that about 8.5 per cent of DNS queries were intercepted by service providers.
Around that time, with standards in place, internet companies got serious about encrypting DNS queries, and people had arguments about how DoH disempowers network administrators and let people flout filters put in place to protect them from smut and illegal content.
Cloudflare began supporting DNS-over-TLS and DNS-over-HTTPS queries in 2018 with the launch of its 1.1.1.1 DNS service. Mozilla began rolling out DoH support last year.
Google began testing DoH last year and just implemented it in Chrome 83 recently. Microsoft talked about secure DNS last year and is now testing it for Windows. Even Comcast joined the party this week with Firefox.
Which brings us back to Apple.
Apple's encrypted DNS support shown off at WWDC this year
Apple's updated code will allow those offering DNS services, and enterprise organizations administering corporate software via Mobile Device Management, to create apps for configuring DNS settings so they use an encrypted transport.
For example, a service provider like Cloudflare could create a network extension app using the
NEDNSSettings
class to switch a device to use DoT/DoH systemwide using Cloudflare's resolvers. Organizations using MDM will be able to do so by applying a Profile to managed devices.Undercover Agent (itch) Mac Os 11
Developers will also be able to create individual apps that allow users to choose to make app-specific connections over encrypted DNS using the
NWParameters.PrivacyContext
object and standard networking APIs.As demonstrated in the video, an iOS app implementing encrypted DNS can be activated via Settings -> General -> VPN & Network (a menu called simply 'VPN' on current iOS 13 systems).
Better fashionably late than never. ®
Get ourTech Resources
Security software frequently blocks “bundleware” installers – software distribution tools that bundle their advertised applications with (usually undesired) additional software – as potentially undesirable applications. But one widely-used software distribution tool for MacOS applications goes to great lengths to avoid being blocked as “bundleware” – using a number of anti-forensics techniques that are more common in malware code. The installer is from a legitimate company, which claims to reach over 1 billion users per month with its various downloaders and adware platforms.
This software attempts to evade blocking by endpoint protection systems with anti-debugging code, strings and API encryption, runtime decompression and virtual machine detection. Its developers went as far as to embed a full backdoor-like component into the installer that allows remote injection of new code into the installer – granting it capabilities that extend far beyond what one might expect from a piece of installation software.
This particular bundleware has potential access to a large number of Macs around the world. The power given to the installer practically enables full control over the target system. Even if this was done so that the company behind it would have ‘advanced analytics’ or the ability to push any third-party software it wants, given the amount of power it aggregates, what happens if this power is abused?
We’re not naming the company or the installer here because of its wide distribution; this research is entirely focused on technical aspects of the reverse-engineered software. The developers have been contacted by researchers, but have shown no interest in changing what they see as a feature of their installer, as long as it allows them to monetize the installations of their software.
The allure of bundleware
MacOS application developers use third-party installers for a number of reasons. One of the reasons often given is the desire to improve the overall “user experience” of software installation. Many developers turn to application installation platforms because they promise enhanced installation analytics, an optimized footprint, and a guaranteed smoothness of installation.
But these installers offer another attraction that is more important to many developers: the promise of monetization. Developers or websites distributing freeware (such as free games) or software based on open source components may not be able to charge for the applications, but they can capture some revenue by teaming with a third-party installation tool.
Some of these application installation platforms bundle the title application with third-party software such as adware or browser toolbars, leading to a setup that the end-user might find unwanted. Once the target application is installed, users often encounter undesirable consequences, such as installed browser hijackers that modify the search engine for their web browser. In some cases, these inject messages for “scare-ware” removers that prompt the user to pay for the removal of non-exist threats.
Apple actively combats these types of unethical applications, which the company labels as ” suspicious software .” In 2019, starting with macOS 10.14.5 (Mojave), Apple began requiring application developers to submit their code for ” notarization “, and blocking applications without notarisation or with revoked developer signatures by macOS’s Gatekeeper . Apple can revoke notarisation and the developer accounts associated with applications that are found to be abusive. But bundleware installers may not get flagged as “suspicious” in the notarization process.
Detecting bundleware is almost never a problem for endpoint protection systems – it’s a much more simplistic breed, so to speak, than malware. But the bundleware package we examine here, already blocked by a number of endpoint protection tools as a potentially unwanted application, adopts many anti-forensics and counter-detection techniques that have in the past been found mostly in malware.
The Application
The bundleware described in this post is a Cocoa application – an application built with the AppKit framework, and is distributed as an application bundle . From sample to sample, the name of the main executable varies. For example, it can be named as
radiosurgical
or Herculid
.The digital signature used to sign the app varies, as this is generated by the developer packaging the application with the installer. Some observed installers are signed by “Owen Bell”. Some other installers were found to be signed by “RuiQing Software Technology Beijing Inc.” or “AVSoftware EOOD”.
The main executable
Compiled as Mach-O (the native executable file format for macOS), the main executable relies on Objective-C runtime
libobjc.dylib
. When the kernel first loads the main executable, it makes sure that the executable is a valid Mach-O file, and then examines its mach_header
structure.Next, it loads the dynamic linker to load all the shared libraries that the main executable links against. The dynamic linker then initializes the Objective-C runtime, and then calls the program’s main () function.
However, the main executable’s entry point starts from garbage bytes – that is, it has no valid code to execute:
With no valid code at the entry point, how does it run without crashing? The answer lays in Objective-C’s concept of non-lazy (‘eager’) and lazy (‘on-demand’) implementation of classes.
Non-lazy classes are realized when the program starts up. These classes will always implement + load method. Contrary to that, lazy classes (classes without + load method) do not have to be realized immediately, but only when they receive a message for the first time (hence the term ‘lazy’).
Let’s check out Objective-C Runtime’s own source, found in
objc-runtime-new.mm
file. The snippet below realizes the non-lazy classes, retrieved with _getObjc2NonlazyClassList () call:Looking at the Objective-C Runtime’s source in
objc-file.mm
, one can see that _getObjc2NonlazyClassList () function collects non-lazy classes from the __objc_nlclslist
data section:In the case of our bundleware executable, the
__objc_nlclslist
data section of the main binary is very small. It enlists only two non-lazy classes: ListedUpaithric
and __ARCLite__
:The
ListedUpaithric
name, like many of the other class names in the executable, is random. For example, in another sample this class is called HoundingHusky
.These two non-lazy classes will be called in the order they’re listed, realized by their + load method. However, at first glance the + load method of the
__ARCLite__
class contains no valid code, because it is located within the __text
section of the executable – which is encrypted.Finding a secret agent
The + load method of the
ListedUpaithric
class is physically located in a section of the executable that has a random name, such as __amorpha
or __mottled
. Once run, the + load method will take a 32-byte XOR key hard-coded in the body and then use that key to decrypt the __text
section (around 15KB in size) of the executable, including the + load method of the __ARCLite__
class.The decryption routine relies on a special anchor stored in the
__text
section. The virtual address of this anchor is used to describe the virtual address and virtual size of the encrypted __text
section.For example, in this particular sample, the anchor can be located at the virtual address
0x100001CF0
, as shown below:The decryptor uses the address of the anchor to describe the parameters of the
__text
section. In the snippet below, the decryptor makes the __text
section writable and executable, by assigning a new protection to it. To do that, it takes the address of the anchor 0x100001CF0
and subtracts 0xBA0
from it to locate the start of the __text
section – 0x100001150
:Once the entire
__text
section is decrypted, the anchor shown above gets decrypted into the following text:The resulting text is the same across all the samples we’ve looked at, and is quite interesting by itself. Maxim Maximovich Isayev (Максим Максимович Исаев) is the Russian name of Max Otto von Stierlitz, the lead character in a popular Russian book series written in the 1960s, and of the most popular Soviet television series ever, Seventeen Moments of Spring .
A Soviet James Bond , Stierlitz takes a key role in SS Reich Main Security Office in Berlin during World War II. Working as a deep undercover agent within SS, he diverts the German nuclear “Vengeance Weapon” research program into a fruitless dead-end.
Leaving a hidden marker like that could indicate an intentionally planted false flag. Regardless of the intention, this marker stays constant across the entire family of this bundleware.
After the
ListedUpaithric
class is called and decrypts the text, being next in line, the + load method of the __ARCLite__
non-lazy class is called to perform further initialization. The decrypted __text
section is quite small – it’s a valid code section containing a valid entry point in it, and it consists of another layer of decryptor and decompressor:With both non-lazy classes realized, the entry point above receives control. From there, the main () function of the executable is called, followed with _exit () .
The main () function
Once the entry point within
__text
section is called, the main () function that follows it will read an internal chunk of data with the size of ~ 300KB.This encrypted data is stored in a separate section of the executable.
The data will be read, its CRC32-based hash validated, then decrypted and further decompressed into a buffer, allocated with vm_allocate () function.
The decompression is achieved by dynamically loading
libz.1.dylib
library, and calling uncompress () API from it.Undercover Agent (itch) Mac Os Pro
The decompressed data has a size of ~ 800Kb, having a format of Mach-O executable (
MH_BUNDLE
type). This data is loaded from memory as a plugin with the help of NSCreateObjectFileImageFromMemory () and NSLinkModule () APIs.![Undercover Agent (itch) Mac OS Undercover Agent (itch) Mac OS](https://img.itch.zone/aW1hZ2UvNjcxNTc4LzU1ODQyMTYucG5n/original/NbDLSv.png)
This method is equivalent to dynamic DLL loading on Windows. It is described on macOS man page as a way to programmatically load plugins after a program starts executing.
The Engine
The loaded module represents itself an engine driven by the JavaScript files.
Some of the scripts reside in the app’s Resources directory in an encrypted form, forming an SDK. Other JavaScript files are fetched from a remote server as tasks (internally called ‘offers’ as they are designed to offer / advertise other products).
The downloaded tasks rely on high-level function calls from the SDK. This allows composing tasks with a very flexible logic.
There are several classes exposed by the engine to the SDK, such as:
- System controller
- Install
- Screenshot controller
- Task manager
- Collector info system
- Event reporter
- Application manager
- File downloader
The engine itself is executed on macOS platform natively.
For example, a JavaScript task may attempt to elevate the privilege level with the following call:
The elevatePrivilegedTask () call in JavaScript has a corresponding method in the engine’s class, such as
tr54jds23
. The engine exposes this method to JavaScript code so that it can be called directly from the engine.When
tr54jds23
-> elevatePrivilegedTask () is executed, the engine calls another method: ICTaskManager
-> elevatePrivilegedTask () .![Undercover Agent (itch) Mac OS Undercover Agent (itch) Mac OS](https://images.idgesg.net/images/article/2018/02/macgames-feb18-orwell2-100751012-large.jpg)
Labyr1nth mac os. That will, in turn, create a task
ICTaskManager
-> root_Task . The task will then create an authorization with the system.privilege.admin
flag. Next, the task is executed with the AuthorizationExecuteWithPrivileges () call.In practice, this may invoke a dialog asking for admin password so that the task can be executed as root.
String / API Encryption
The engine module stores the names of all critical functions and most critical strings encoded. In one of the analyzed samples, there are 1,228 encoded strings, decoded with 1,055 different functions. That is, some strings are decoded with the same function.
All the string decoding functions use different keys, but they implement one of the following 3 algorithms:
- Simple XOR key
- Simple key subtraction
- Auto-incremented XOR key
One of the string decryption routines can be demonstrated with the anti-debugging trick explained in the next section.
Anti-debugging Trick
An attempt to attach to or run the bundleware app under a debugger produces the following error:
The anti-debugging defense is provided with ptrace () request named
PT_DENY_ATTACH
( 0x1F
), called from the function below:If the process is being debugged, as defined in man
ptrace
, it will exit with the exit status of ENOTSUP
( 45
), ‘error, not supported’ . Otherwise, it sets a flag that denies future traces – an attempt to debug it with this flag set will result in a segmentation violation exception.By stepping over a call into the function that denies tracing (or NOP-ing the 5 bytes of the call), the anti-debugging trick above can be easily circumvented:
Obfuscation Variations
Some samples of this bundleware family contain variations in the string encryption algorithm.
For example, a hard-coded integer number
6
within a decryption function can be encoded with a separate function, as shown below:The same function is collapsed by the Hex-Rays Decompiler into:
VM Evasion
Because of their advertising-based business model, the developers of this bundleware installer go to great lengths to prevent fraud by those looking to pump up the monetization of their apps using large numbers of virtual machine installs. The engine is able to detect the presence of a virtual environment through the method checkPossibleFraud () . This method is exposed to JavaScript, where it can be called as:
To achieve that, the engine compiles a so called ‘fraud’ report that consists of the following details:
MAC_L
MAC and IP addresses for all network interfaces, to recognize sandboxes that rely on a common network setup.vmVendor
The engine checks if the MAC address starts from an address that is common for a given VM manufacturer. For example, if the MAC address starts from00:1C:42
, the installer determines that it’s running under a Parallels VM.
Using this trick for over 35 known MAC prefixes, it reports the following VM vendors (the vendor names are shown exactly as the installer reports them):- Parallels ID.
- Egenera, Inc.
- First Virtual Corporation
- linux kernal virtual machine (kvm)
- Virtual Iron Software, Inc. (was: Katana Technology)
- Paravirtual Corporation (was: Accenia, Inc.)
- Virtual Conexions
- Virtual Computer Inc.
- virtual access, ltd.
- Virtual Instruments
- Virtualtek. Co. Ltd
- VMware, Inc.
- Microsoft Corporation (was: Connectix)
- Microsoft Corp.
- Microsoft Network Load Balancing Service Heartbeat
- Microsoft XCG
- Oracle Corporation (was: Virtual Iron Software)
- Oracle Corporation (was: Xsigo Systems, Inc.)
- Oracle Corporation (was: Sun Microsystems, Inc)
- CADMUS COMPUTER SYSTEMS
Host UUID
Reported by gethostuuid () , to recognise common sandboxes.hddName
The engine collects data reported by DADiskCreateFromBSDName () for/dev/disk0
device, to recognise HDD presumably common for some sandbox installations.usbFraud
A list of USB devices, presumably common for certain VMs, as reported by calling:dispRats
Report display ratio, to recognize display ratios used in common sandboxes.lastMove
Report mouse position since the last mouse movement event, to see if a VM was restored from a clean snapshot.lastRbt
Gets system up-time, since last reboot, to recognize a VM restored from a snapshot.dmgLoc
,fromDMG
Gets full path filename of the DMG file, in case it’s executed by a sandbox under a generic name, such as using file hash.wndPos
Gets position and size of the app’s window.msePos
Gets mouse position, to see if mouse is in use.
Crash Logger
The crash logger in the samples we examined sends a GET request to a remote script, disguised as a PNG file:
The stats it submits to the remote script are encoded as URL parameters:
crash=1
os=mac
appkit=%APP_KIT%
ver=%VERSION%
ldebug=%LIVE_DEBUG%
backtrace=%CALL_BACKTRACE%
Configuration
The installer uses two configuration files. The first one is dynamically extracted from an unused cavity of the installer’s own DMG file. This configuration is written into the DMG file (a process internally called ‘injection’) after the DMG file is built, and is encrypted with AES-128 algorithm.
To locate the encrypted config within the DMG file, the installer module parses the contents of the file. For each pair of bytes, it subtracts one byte from another, until if locates the following signature that consists of 7 64-bit integers, such as:
Once located, the config is then extracted and decrypted. As shown in the example below, the extracted configuration specifies the URL of an application to download and install:
The 2nd configuration file is provided as a JavaScript file, and is decrypted with the other SDK files from the app’s Resources directory.
This configuration defines multiple operational parameters, such as report and ad servers:
Report Server
The report server from the configuration is used to receive posted reports.
The example below demonstrates what data is posted to the report server:
As seen in the example, the data it posts contains basic system information, such as macOS version number (
OSVer
), language (OSLang
), MAC and IP addresses for all network interfaces (MAC_L
), default browser name (BRW
), HDD size, whether a VM was detected or not (isVmDef
), whether user is admin (isuseradmin
), and some other parameters.The collected data is assembled into a text, then encrypted with AES-128, and posted to the server:
Tasks
Undercover Agent (itch) Mac Os Download
Remote tasks are received encrypted from the ad server, as shown below:
When the received task is decrypted, its data is split into named sections. Each section is surrounded with the following comments:
The parser extracts JavaScript code from those sections. That code will then rely on APIs exposed by the SDK, to drive the engine that exposes its own API interface to the SDK.
The nature of the received tasks may depend on the presence of VM (a condition, internally called ’fraud’).
An analysis of the tasks received from the ad server reveals no malicious activity.
Engine Capabilities
The bundleware’s engine consists of the several components, capable of doing the following:
- Browser manager
- detects supported browsers, such as Safari, Google Chrome, Firefox
- terminates browser process
- sets new home page
- reads Chrome preferences
- clears Chrome cache
- reads Firefox preferences
- Logger
- takes full screen snapshot
- takes installer window’s snapshot
- submits ’live debug’ information to the remote server
- Screenshot controller
- takes full screen snapshot with the mouse location
- collects a set of screenshots
- takes snapshot of a given window
- Task manager
- downloads and execute new tasks
- submits task execution output
- runs tasks with the privilege level elevated to root
- creates authorisation for tasks, using given credentials
- downloads and execute new tasks
- System controller
- collects system OS version
- collects mac address and IP for all interfaces
- collects all cookies from Safari, Google Chrome, Firefox
- collects the list of all installed applications
- collects the list of running applications
- checks the presence of VM
- gets home page for all supported browsers
- gets system default browser
- adds/removes applications to/from dock
- adds applications to dock
- checks if user is admin
- checks if a given process runs as admin
- gets user name
- gets user locale/language
- gets free space of start-up volume
- gets info about connected iOS devices:
- device class (iPod/iPad/iPhone)
- device identifier
- device serial number
- builds ’fraud’ report (info about detected VM)
- collects the following lists:
- running processes
- keyboard input sources
- graphics card names
- USB devices
- apps launched automatically on login
- launch daemons and agents
- user launch agents
- Google Chrome extension names
- Safari extension names
- Firefox extension names
- searches for files in the specified directory
- checks if the specified application is running
- terminates specified applications
- encrypts/decrypts data
- gets user paths, such as local applications, download paths
- checks if an application is installed by the specified name
- reads key values from user defaults
- gets default apps for all available extensions
- adds an app to dock as persistent item
- removes all persistent apps from dock for specified path
- reads text files
- copies given directory to a new location
- deletes the specified directory
- run specified script with
’/bin/sh’
, as root - checks if the specified file exists
- gets detailed HDD information
- collects network information
- downloads files
- reads/sets window title for running apps
- reads mouse position
- displays alerts
- launches tasks/applications as root
- copies/moves files
- opens URLs
- saves data to files
- checks if path is writable
- creates/deletes directories
- gets specified file size/attributes
- Browser manager
CI/CD pipeline
Tank my bug mac os. The authors of the bundleware have apparently adopted Jenkins, an open source tool for building Continuous Integration and Continuous Delivery (CI/CD) pipelines.
This fact is evident from the full path names of the source files that are still visible in the compiled engine module, such as:
With Continuous Integration in place, every commit made to the source code in the Git repository is pulled and built automatically. If it results in a bug, the developers can quickly identify the responsible commit.
Continuous Integration pipeline also allows automated testing and deployment. Apart from reducing the length of time it takes to release new PUA builds, it also allows to increase their quality.
Conclusion
Being a legitimate distribution platform, the techniques employed by this popular bundleware product conceal a very powerful engine.
A2 mac os. When viewed from a certain angle, this engine resembles a backdoor as it unlocks full access to the system.
The sheer power of the engine is made covert with the wisely engineered trickery. Some of its methods, such as loading code from memory, are known from the “The Mac Hacker’s Handbook”, and rightly belong to the world of malware.
Undercover Agent (itch) Mac Os Update
Given that the engine is driven by symmetrically encrypted remote tasks, any researcher who pays attention to detail couldn’t help but wonder what would happen if the control of its engine was intercepted.
Careful analysis of these techniques also demonstrates a disturbing trend we’re witnessing – the continued ’spill’ of the traditional Windows malicious techniques, such as run-time packing, strings/API obfuscation, memory injection into the Mac world.
Undercover Agent (itch) Mac Os X
Even though the installer itself is legitimate, an analysis of state-of-art code where these techniques are honed to perfection is vitally important for the researchers to understand what opportunities exist on the macOS platform, to be better prepared for the challenges that lay ahead of us.
Undercover Agent (itch) Mac Os Catalina
This report is based on research previously presented at Virus Bulletin’s VB2019 conference .