AIDEFEND in Action AIA-0175 Validated Research

Android SafetyCore: An Extracted Device Model Helps Bypass Image Classification

Android System SafetyCore lets apps like Google Messages check images for sensitive content directly on the phone, keeping photos off cloud servers. Skyld researchers extracted SafetyCore’s image classifier from a test Pixel and used that copy to craft subtle pixel edits that fooled the model. In the Google Messages demonstration, the model misclassified ordinary photos with nearly imperceptible edits as sensitive, so the app blurred them and showed a warning. The paper also explains how the same method could let sensitive images bypass warnings, with no malicious real-world use reported.

Adversarial MLGuardrail BypassAI Deployment SecurityOn-Device AIML Security
2 applicable AIDEFEND defenses
Source: Breaking SafetyCore: Exploring the Risks of On-Device AI Deployment 
Authors: Victor Guyomard, Mathis Mauvisseau and Marie Paindavoine (Skyld)
Original article: Sep 8, 2025

Threat Analysis

  • The model lives directly on the user’s phone. Running the image classifier on the device keeps photos private, since they do not have to be sent to a remote server for checking. The trade-off is exposure: anyone who controls a test device can locate the downloaded TensorFlow Lite model file, extract a copy, and inspect both its neural-network structure and its weights (the learned numbers the model uses to make decisions) offline.
  • Content filtering relies on that classifier’s verdict. With a full copy of the model in hand, the researchers calculated adversarial images (pictures with tiny pixel tweaks that look nearly unchanged to human eyes but push the model toward a wrong label). The paper demonstrates ordinary photos triggering blur and warnings inside Google Messages, and outlines how the reverse approach could suppress warnings on sensitive images without showing the equivalent in-app test. Because the same model version is distributed to many phones, images tuned offline against one extracted copy could potentially work against other devices running that release.

Applicable AIDEFEND Defenses (2)

AID-H-001
Adversarial Robustness Training
High
The model owner can include small, bounded visual changes (perturbations) during training and require the final packaged classifier to pass a separate test suite of both manipulated and ordinary images before release. This raises resistance to the demonstrated evasion technique, though real-world protection still depends on the exact shipped model and what manipulation types were tested.
AID-H-003.011
Attested Edge Model Entitlement & Key Release
High
An Android service maintainer who controls model delivery can ship the model as an encrypted file and have a server release the decryption key only to authorized apps after fresh app- and device-integrity verification. Verify that copied download files contain no readable weights and that missing or replayed verification requests receive no key. This closes simple file extraction from storage, though it cannot prevent an authorized device from exposing decrypted weights in memory during execution.

What Defenders Should Do Now

  • Test your on-device model as if attackers already have its weights. If your team trains or ships an on-device classifier, test adversarial images offline against the exact packaged model you ship, including its image resizing, preprocessing, and mobile runtime. Track both missed detections on sensitive images and false warnings on ordinary photos.
  • Require real-world robustness tests before releasing updates. Where your team controls training, use adversarial robustness training (training the model with deliberately perturbed examples so small pixel changes are less likely to fool it). Before shipping a revised package, test it against separate adversarial examples it has never seen during training, while verifying that ordinary images are not misflagged more often.
  • Protect model downloads when you control distribution. Deliver the model as an encrypted file rather than plaintext, and release the decryption key from a server only after verifying that the app is entitled to that release and the device and app pass fresh integrity checks. Verify that inspecting the downloaded file statically reveals no plaintext weights, while continuing robustness testing, because an authorized device still has to decrypt and use the weights in memory at runtime.

Conclusion

AIDEFEND  maps this on-device risk to two complementary boundaries: protecting model delivery with encrypted packages and attested key release, and hardening the classifier itself through adversarial robustness training and pre-release testing. Applying these checks to the exact packaged mobile model helps teams measure whether their filter still holds up against deliberate image manipulation.

Last updated: