Feeding Tasty Objects to Visual Studio's App Center SDK for Apple
The App Center SDK for Apple used an insecure deserialiser that allowed arbitrary object deserialisation from a local SQLite database. An attacker with local write access to that database could achieve code execution in the context of the application.
This write-up will present you a Proof-of-Concept exploit for an unsafe object deserialization flaw in macOS applications using Microsoft’s AppCenter SDK for iOS and macOS before release 5.0.1. The PoC for obtaining code execution is based on the approach described by Sector7 for NSKeyedUnarchiver instances…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The SDK used NSKeyedUnarchiver without requiring secure coding, allowing deserialisation of arbitrary classes from a local database.
Impact
An attacker with local write access to the SQLite database could execute arbitrary code in the context of the application.
What the attacker needed
Local write access to the SQLite database file
The fix
The vulnerability was fixed in version 5.0.1 of the SDK.
How it was found
- Identify that the SDK uses NSKeyedUnarchiver with requiresSecureCoding set to false.
- Find that the unarchiver processes base64-encoded data from the logs table in Logs.sqlite.
- Craft a serialised payload using NSCustomImageRep, NSSound, and NSRuleEditor to call a method.
- Convert the payload to base64 and insert it into the logs table.
- Restart the application to trigger deserialisation and code execution.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When an app saves data to disk, it sometimes converts objects into a format that can be read back later. If the app does not check what kind of objects it reads back, an attacker who can change the saved file can make the app create dangerous objects. Here, the app read a database file that an attacker could modify, and the attacker could make the app run code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.