Elektrine lite

← Feed

@r@glauca.space

Post #665875

2026-03-15 04:08 UTC

So, I recently saw some quiet discussion about a paper where researchers reverse-engineered and disclosed some attacks against PhotoDNA, the very-super-duper-secret algorithm used by tech megacorps to scan for illegal images. They didn't make any code public, and so... I did: https://github.com/ArcaneNibble/open-alleged-photodna A _complete_ reverse-engineering and commented Python reimplementation of the algorithm from publicly-leaked binaries. This means that studying the algorithm and any potential flaws is now much more accessible. This took only about two days (once I knew that there even _was_ a leaked binary to compare against), which just goes to again show that security through obscurity never works. 🔁 encouraged

Replies (4)

  • @r@glauca.space 2026-03-15 04:20

    I don't think I'm going to implement any of the published attacks, but other people are certainly free to have a go at it. It's certainly scary how just one fuckywucky leak and... honestly not _that_ much research nor computational complexity can have major impacts on this algorithm. Especially when said algorithm serves a purpose that deeply affects lives....

    Open ##1054357

  • @r@glauca.space 2026-03-18 23:04

    Adding on to this thread, I now have a harness which can load the PhotoDNA leaked DLL *on Linux and macOS* https://github.com/ArcaneNibble/open-alleged-photodna/blob/main/binary-harness.py It also checks intermediate computations against my re-implementation, so that it's possible to further prove/validate that Alleged-PhotoDNA produces the same results as the binary.

    Open ##1054358

  • @adulau@infosec.exchange 2026-03-15 09:49

    @r Great work! I was curious and added the distance calculation (basic stupid Euclidian distance) to compare two images: https://github.com/adulau/open-alleged-photodna/commit/c0275801088442cd4f5693b6403678daf5f75b7a and the results are surprisingly good with rescaled images. adulau@blakley:~/git/open-alleged-photodna$ python3.10 oaphotodna.py /home/adulau/Downloads/55147310088_ced977bdee_c.jpg /home/adulau/Downloads/55147310088_45f9e4b2cc_k.jpg Distance (euclidean): 8.4261 Similarity: 0.997246 The source image https://www.flickr.com/photos/adulau/55147310088/ I just did PR (feel free to discard it if you think it's out-of-scope ;-)

    Open ##1560435

  • @eloy@hsnl.social 2026-03-15 14:43

    @r I had never seen the original repository until now, and... holy shit https://github.com/jankais3r/pyPhotoDNA/blob/main/install.sh#L29

    Open ##1560438