Apple's CSAM Photo Scanner Reverse Engineered, Algorithm Exists in iOS 14.3
Posted August 18, 2021 at 3:17pm by iClarified
The algorithm Apple will use to scan user photos for child pornography has been found and reverse engineered.
Asuhariet Ygvar announced the accomplishment on reddit today. Notably, it appears the algorithm already exists on iPhones.
As you may already know Apple is going to implement NeuralHash algorithm for on-device CSAM detection soon. Believe it or not, this algorithm already exists as early as iOS 14.3, hidden under obfuscated class names. After some digging and reverse engineering on the hidden APIs I managed to export its model (which is MobileNetV3) to ONNX and rebuild the whole NeuralHash algorithm in Python. You can now try NeuralHash even on Linux!
You can get the source code for NeuralHash here:
https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX
Tests show that the algorithm can handle image resizing and compression, but not cropping or rotations.
Besides the fundamental privacy concerns of a system that can scan user photos and messages, a researcher appears to have already found a collision.
Users, security researchers, privacy advocates, and government officials have vocally opposed Apple's plans. In response, the company has shared numerous technical assessments and created an FAQ for users that claims on-device scanning of photos provides privacy benefits over scanning photos in iCloud.
Please download the iClarified app or follow iClarified on Twitter, Facebook, YouTube, and RSS for updates.
Asuhariet Ygvar announced the accomplishment on reddit today. Notably, it appears the algorithm already exists on iPhones.
As you may already know Apple is going to implement NeuralHash algorithm for on-device CSAM detection soon. Believe it or not, this algorithm already exists as early as iOS 14.3, hidden under obfuscated class names. After some digging and reverse engineering on the hidden APIs I managed to export its model (which is MobileNetV3) to ONNX and rebuild the whole NeuralHash algorithm in Python. You can now try NeuralHash even on Linux!
You can get the source code for NeuralHash here:
https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX
Tests show that the algorithm can handle image resizing and compression, but not cropping or rotations.
Besides the fundamental privacy concerns of a system that can scan user photos and messages, a researcher appears to have already found a collision.
Users, security researchers, privacy advocates, and government officials have vocally opposed Apple's plans. In response, the company has shared numerous technical assessments and created an FAQ for users that claims on-device scanning of photos provides privacy benefits over scanning photos in iCloud.
Please download the iClarified app or follow iClarified on Twitter, Facebook, YouTube, and RSS for updates.