News for hackers. Stuff that matters.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by skygazer on Thursday August 19, 2021 @07:11PM (#28240497)
This attack does seem easily defeated, even naively, by downscaling by three different means (bicubic, nearest neighbor, Lanczos, etc.) and rejecting the downscale that most differs from the other two, since the attack is tailored to a specific downscaling algorithm -- the attack seems to only be effective against systems that make no effort at all to safeguard against it.

Granted, Apple makes no mention of any safeguard, but it would be trivial in principle to protect against, and is not an unavoidable failing.

Re:ImageNet contains naturally occurring Apple NeuralHash co... by sennight on Thursday August 19, 2021 @08:14PM (#28240908)
The objective of being mindful of the thumbnail is to fool the human reviewer responsible for alerting the police to your target's need for a good swatting - the algorithm has already flagged the image by the time it is presented as a thumbnail during review.

You'd basically start off with an image known (or very likely) to be cataloged in a CP hash database.

Note its NeuralHash.

Find a non-CP image that would, after being scaled down or otherwise sanitized, fool an unaccountable and likely disinterested Apple employee into muttering "close enough" while selecting whichever option box it is that causes life ruination.

Feed that imagine into an adversarial network until it spits out the desired NeuralHash.

Distribute that image to everyone who has ever disagreed with you on the internet, prayed to the wrong god, competed with you in business, voted the wrong way, etc.

Re:ImageNet contains naturally occurring Apple NeuralHash co... by skygazer on Thursday August 19, 2021 @08:46PM (#28241128)
my aim was to point out that the above reverenced "image scaling attack" is easily protected against, because it is fragile to alternate scaling methods -- it breaks if you don't use the scaling algorithm the attacker planned for, and there exist secure scaling algorithms that are immune. [0] Since defeating the image scaling attack is trivial, it means that, if it is addressed, the thumbnail will always resemble the full image.

With that out of the way, that, obviously, just forecloses this one particular attack, specifically, where you want the thumbnail to appear dramatically different than the full image in order to fool the user that it's an innocent image and the reviewer that it's an illegal image. It's still, never-the-less, possible to have a confusing thumbnail -- perhaps an adult porn image engineered to have a CSAM hash collision will be enough to convince a beleaguered or overeager reviewer to pull the trigger. The "Image Scaling Attack" is neither sufficient or necessary.

(However, that confusing image would almost certainly not also fool Apple's unspecified secondary server-side hashing algorithm, as referenced on page 13 of Apple's Security Threat Model Review, so would never be shown to a human reviewer: "as an additional safeguard, the visual derivatives themselves are matched to the known CSAM database by a second, independent perceptual hash" [1])

[0] Understanding and Preventing Image-Scaling Attacks in Machine Learning https://www.sec.cs.tu-bs.de/pubs/2020-sec.pdf

[1] https://www.apple.com/child-safety/pdf/Security_Threat_Model...

Re:ImageNet contains naturally occurring Apple NeuralHash co... by sennight on Friday August 20, 2021 @12:00AM (#28242427)
> However, that confusing image would almost certainly not also fool Apple's unspecified secondary server-side hashing algorithm, as referenced on page 13 of Apple's Security Threat Model Review...

Uh, on what timescale? If you mean "tomorrow" then sure, if you mean "for years" - then no. They're relying on the second perceptual hashing algorithm to remain a secret, which is insanely foolish. Just based on what I know about these CP hashlists and the laziness of programmers, I feel pretty confident that it is either an algorithm trained on the thumbnails themselves (which would be laughably bad) or it was a prior attempt that got replaced by what is now deployed on the users' hardware. Why would I think that? Because it would have been the only other thing on hand for the necessary step of generating the hash black list. So they're stuck with at least one of those forever - and will have a very limited range of potential responses to the massive infosec spotlight picking them apart... unless they want to recatalog every bit of CP all over again.

Re:ImageNet contains naturally occurring Apple NeuralHash co... by skygazer on Friday August 20, 2021 @03:55AM (#28243722)
Yeah, I don’t have that answer, of course. But nothing prevents them from changing that secondary algorithm yearly, or at whatever rate the CSAM database owners would tolerate full rehashing, or chaining together multiple hashes. They can literally tune it to whatever arbitrary false positive rate they want. Although, not knowing any better, I would guess that they would just use Microsoft’s PhotoDNA hash unchanged, and just keep it under wraps, since I think that’s what they already use for iCloud email attachment scanning. PhotoDNA just does a scaled down, black and white edge/intensity gradient comparison, and not a neural net feature detection. I would think using a completely different technology would make the pair of algorithms extremely robust taken together, but that’s not my field.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by sennight on Friday August 20, 2021 @07:08AM (#28244756)
> But nothing prevents them from changing...

While there may not be an immovable obstacle standing between them and a complete recataloging, there are a lot of factors that would strongly disincentivise it. Chief among them being the fact that the project is a already a radioactive cost center - and unless they plan on switching industries and giving Blue Coat a run for its money, it always will be.

> ...chaining together multiple hashes.

That would be the lazy programmer way to do it that would very likely result in a situation where correlation starts popping up - that is why DBAs weren't advised to do some whacky md5/sha1 mashup that avoids requiring every user rekey in the wake of a digest bump up.

> ...I would guess that they would just use Microsoft’s PhotoDNA hash unchanged...

That is a reasonable guess, because that is what all the NGOs have been using - IWF being one of the more notorious. That would be bad news though, for anyone expected the thumbnail perceptual hashing step to provide meaningful protection.

> I would think using a completely different technology would make the pair of algorithms extremely robust...

Nope - which is why you don't see hybrid cryptographic algorithms. Also, if they are using PhotoDNA on their verification step then they actually implemented the thing totally backwards... because the high-pass filter approach makes it resistant to the hash length extension attacks that are imperceivable to humans. That counts for nothing by the time the first algorithm has been fooled by an extension attack (and this neural thing is definitely vulnerable to it), because the attacker would already be selecting for a thumbnail image that would fool a human in the second step - and PhotoDNA would be looking for the exact same thing that a human would: points of contrast.

BTW, PhotoDNA is a black box with no outside scrutiny to speak of - you can count on one hand the number of papers where it is even mentioned (and only ever in passing).

Re:ImageNet contains naturally occurring Apple NeuralHash co... by cinquemb on Thursday August 19, 2021 @08:28PM (#28241014)
> The objective of being mindful of the thumbnail is to fool the human reviewer responsible for alerting the police to your target's need for a good swatting - the algorithm has already flagged the image by the time it is presented as a thumbnail during review.

Yeah, mentioned something like that here [0]:

>> And then one can compromise and infect millions of such backdoored devices and start feeding (much cheaper than the government enforcement implementation) spoofed data into these systems at scale on these backdoored devices that act like "swatting as a service" and completely nullify any meaning they could get from doing this.

[0] https://news.ycombinator.com/item?id=28177170

Re:ImageNet contains naturally occurring Apple NeuralHash co... by FranksTV on Saturday August 21, 2021 @07:54PM (#28261688)
Why not just put actual child porn on their phone if you have access and want to screw with them?

And if you can do that, why wait for apple to implement this? Why not just put child porn on their phone and then call the police?

Re:ImageNet contains naturally occurring Apple NeuralHash co... by cinquemb on Sunday August 22, 2021 @07:58PM (#28270897)
> Why not just put child porn on their phone and then call the police?

That does not scale.

> … why wait for apple to implement this?

Enables scaling of what the above commentator discusses.

Re:ImageNet contains naturally occurring Apple NeuralHash co... by jachee on Thursday August 19, 2021 @08:21PM (#28240963)
… and repeat “on the order of 30+“ times to trigger the reporting threshold, and convince them to save it into their synced-to-iCloud Photos library.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by sennight on Thursday August 19, 2021 @11:35PM (#28242274)
So have you never heard of catfishing? Because if you have, then you know it wouldn't be hard to do just what you described - and you're pretending otherwise for some reason.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by Karunamon on Friday August 20, 2021 @12:27AM (#28242584)
...or just blast the messages to them on WhatsApp or any other tool that automatically dumps incoming images into the photo roll.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by orivej on Thursday August 19, 2021 @09:00PM (#28241225)
The attack relies on the fact that when downscaling by a large factor, the tested downscalers (except Pillow in non-nearest neighmode mode, and all of them in area averaging mode) ignore most of the pixels of the original image and compute the result based on the select few which are the same in all modes, making the result look nearly the same regardless of the mode.
Re:ImageNet contains naturally occurring Apple NeuralHash co... by skygazer on Thursday August 19, 2021 @09:17PM (#28241311)
Thanks for that reference to Pillow. I presume it's from "Understanding and Preventing Image-Scaling Attacks in Machine Learning" [0] which mentions secure scaling algorithms immune to the attack. I wish I could mention this in the grand parent, but the editing window closed.

[0] https://www.sec.cs.tu-bs.de/pubs/2020-sec.pdf