News for hackers. Stuff that matters.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by nemoniac on Wednesday January 26, 2022 @02:35AM (#30082840)
The author of the tweet also supplies a tool for cleaning the metadata in pdfs.

https://gist.github.com/sneakers-the-rat/172e8679b824a3871de...

Re:Elsevier embeds a hash in the PDF metadata that is unique... by madars on Wednesday January 26, 2022 @03:04AM (#30083003)
The gold standard for academic watermark removal used to be (and maybe still is?) https://github.com/kanzure/pdfparanoia . Not sure if it edits Elsevier's metadata though.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by hdjjhhvvhga on Wednesday January 26, 2022 @02:54AM (#30082942)
This is a very basic tool. It may work against this particular scheme by Elsevier if it's not too sophisticated. A few years ago I was working for another content provider to mark the PDFs, my job was to make sure the watermarks are everywhere and that removing them is difficult while being practically transparent to the user. We also employed steganography etc. so that rendering the PDFs as images and combining them again into PDF would preserve the watermark. We were very clear to the user the watermarks are there and, as far as I can tell, there was no single copy protected in this way uploaded to the public Internet.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by sam_lowry_ on Wednesday January 26, 2022 @03:32AM (#30083140)
I wonder how you coped with the ethical side of such a job.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by hdjjhhvvhga on Wednesday January 26, 2022 @04:25AM (#30083453)
Here's the story. A middle-size publisher contacted me about the problem they had: someone was distributing their PDFs online using various services, but mainly Scribd. At that time (it was maybe 2012?) it worked like this: the attacker released a document, notified his group, and they started downloading. The publisher immediately filed the DMCA copyright infringement notification and it was handled within 3-4 days - more than enough for people to download the "release". It was going on for a long time and Scribd refused to remove the account of the attacker.[0] After a couple of months they finally gave in and deleted it but of course a new account was immediately created. It was not a mouse-and-cat game, but more like mouse-and-turtle.

So when they asked my help I told them, you don't have a copyright problem, you have a SEO problem - since people looking for their publications could find them easily online with the stolen copies sometimes appearing higher on SERP than their own. They said they would address that and they somehow came to terms with the fact that the past documents are lost, but they would like to avoid this situation in the future.

I checked some of their publications. They were moderately priced and the content was quite interesting. Many of their customers were very supportive - actually they were sending reports when they noticed the pirated copies. And they weren't saying "Why should I pay for your books when I can get them online?" but rather "Please take care of protecting your content since we want you to survive and publish more books". So, to answer your question, I was very happy to work for them, and I would do it again.

[0] I was told they changed their approach later and started to collaborate with publishers.

Re:Elsevier embeds a hash in the PDF metadata that is unique... by barry-cotter on Wednesday January 26, 2022 @06:31AM (#30084256)
> someone was distributing their PDFs online using various services, but mainly Scribd

Ah, Scribd, the scummiest company YC has ever had any connection with.

Re:Elsevier embeds a hash in the PDF metadata that is unique... by onphonenow on Wednesday January 26, 2022 @07:06AM (#30084550)
So many dark patterns on that site
Re:Elsevier embeds a hash in the PDF metadata that is unique... by SpelingBeeChamp on Wednesday January 26, 2022 @10:07PM (#30095703)
What are they tricking users into doing?
Re:Elsevier embeds a hash in the PDF metadata that is unique... by afandian on Wednesday January 26, 2022 @04:52AM (#30083589)
As a customer I want a thriving, commercially viable, decentralised publishing industry. I don't want DRM encumbered formats, or a single vendor, or a point of failure that prevents me from reading books I've purchased.

If my email address embedded in the PDF enables that then I think that's reasonably balanced ethics arithmetic.

(edit - I consider public-funded scholarly research to be a different matter to private purchases of commercial books such as fiction or trade textbooks)

Re:Elsevier embeds a hash in the PDF metadata that is unique... by amself on Wednesday January 26, 2022 @03:52AM (#30083265)
I would just render each page of such a PDF in two colors (black or white without shades) and turn the images into a new PDF to upload. If that doesn’t make the steganography fail, maybe add a lot of static? Or censor illustrations anyway since many journals provide them independently of the text.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by topaz0 on Wednesday January 26, 2022 @08:13AM (#30084998)
"I would just" [do this slightly more complicated transformation] really misses the point. Nobody disputes the fact that you could turn any given human-readable pdf into an untraceable version. E.g. you could copy it all out longhand and make sketches of all the plots. Certainly it would work. The point is that as the necessary transformation becomes more complicated/more work, the fraction of the population that will actually do it will vanish, and the surveillance scheme will be effective again.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by hdjjhhvvhga on Wednesday January 26, 2022 @04:13AM (#30083386)
It wouldn't work since we were allowed to manipulate certain aspects of text, too, to a certain extent, in a way that looked pretty much statistically random. That is, by comparing several copies of the same file, the bits were very much different, and the differences were distributed over the whole document. One of the main aims was to make sure the watermark gets preserved over various transformations, and we automatically tested each new document to make sure it works.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by berkes on Wednesday January 26, 2022 @05:08AM (#30083684)
You could even just move a few words around, depending on the language. Depending on the language, you could even just move a few words around.

Do that randomly, combine the products, and you might get enough entropy to create unique fingerprints for each download. Randomly do that, combine the products, and you might get enough entropy to create unique fingerprints for each download.

(This silly example can create 4 unique fingerprints)

Re:Elsevier embeds a hash in the PDF metadata that is unique... by Wowfunhappy on Wednesday January 26, 2022 @06:25AM (#30084222)
When I write, I put a great deal of thought into how to arrange sentences for maximum clarity or effectiveness. I would not appreciate an eBook service messing with that, even if the meaning was unchanged.

In the most extreme case, imagine if this was a book of poetry.

Re:Elsevier embeds a hash in the PDF metadata that is unique... by viraptor on Wednesday January 26, 2022 @06:48AM (#30084386)
For PDF you can do this in a much more subtle way. In a typical block of text every individual letter comes with its own kerning adjustment. You can adjust those in a way that's invisible to the reader but still allows fingerprinting. There's probably 1000 different options too - don't think of moving words as in swapping positions in a sentence. (I know parent suggested it, but that's silly)
Re:Elsevier embeds a hash in the PDF metadata that is unique... by matheusmoreira on Wednesday January 26, 2022 @07:05AM (#30084544)
These probably wouldn't survive extraction of the pure text, would they?
Re:Elsevier embeds a hash in the PDF metadata that is unique... by out_of_protocol on Wednesday January 26, 2022 @09:46AM (#30086028)
Replacing characters with identical-looking unicode chars, adding extra spaces here and there, adding newlines (and more spaces :)), adding random typos, use dictionary with "safe" word/phrase replacements etc. And don't forget about formulas, charts etc - pure text version is not too useful on its own
Re:Elsevier embeds a hash in the PDF metadata that is unique... by hdjjhhvvhga on Wednesday January 26, 2022 @08:14AM (#30085006)
If you deal with fiction and the like where you basically have just text then I think that's correct: it would be trivial to detect the watermarks in various copies by simply comparing them. I was dealing with PDFs containing tables, formulas, illustrations, etc., so a plain-text version would be unusable.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by snovv_crash on Wednesday January 26, 2022 @08:42AM (#30085226)
Randomly choose 3 big paragraphs in the entire ebook to add an extra newline in the middle of at the end of a random sentence. This would be my choice if I had to do some kind of invisible watermarking, at least.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by hdjjhhvvhga on Wednesday January 26, 2022 @08:55AM (#30085378)
This is one of the many things that could be trivially detected and fixed when you have multiple watermarked copies of the same file.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by afandian on Wednesday January 26, 2022 @07:02AM (#30084518)
Closer to home and a bit more extreme, a few transposed numbers in a scholarly article would be enough to rekindle another autism/vaccine conspiracy theory!
Re:Elsevier embeds a hash in the PDF metadata that is unique... by hdjjhhvvhga on Wednesday January 26, 2022 @06:58AM (#30084479)
No, this would not work for a couple of reasons. Manipulating the content itself such as changing the order of words is very dangerous as it can influence the meaning, and if you process things at scale it could lead to devastating consequences. But there are many other aspects of text such as kerning and others (a dozen or so in this particular case) that are virtually invisible to the reader but are detectable by a machine. I'd prefer not to get into the details of the implementation here but of course a dedicated team with enough resources could successfully break it after some time - but I believe it wouldn't make any sense economically.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by berkes on Monday January 31, 2022 @10:54AM (#30149359)
> as kerning and others

Those can be "removed" by rendering to text and regenerating a PDF, though. Or even with print + scan + OCR.

Neither are trivial, but doable.

Re:Elsevier embeds a hash in the PDF metadata that is unique... by matheusmoreira on Wednesday January 26, 2022 @06:36AM (#30084295)
This isn't a watermark though. This is giving different people different content. Watermarks don't change the content.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by aembleton on Wednesday January 26, 2022 @07:14AM (#30084594)
But Stenography does; just in ways that are imperceptible to humans.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by matheusmoreira on Wednesday January 26, 2022 @07:26AM (#30084681)
Moving words around is perceptible to humans though. It can even destroy the meaning of content.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by aqme28 on Wednesday January 26, 2022 @06:23AM (#30084198)
I don’t think there is any scheme that works against all steganography, outside of maybe rewriting the whole document “in your own words.”
Re:Elsevier embeds a hash in the PDF metadata that is unique... by afandian on Wednesday January 26, 2022 @06:55AM (#30084442)
I'm curious what a legal case would look like around steganography. "Trust that our system says that this string is embedded". Or would the prosecution be obliged to divulge the algorithm.
Re:Elsevier embeds a hash in the PDF metadata that is unique... by hdjjhhvvhga on Wednesday January 26, 2022 @08:04AM (#30084934)
I believe it would be enough to demonstrate the functioning of the system in action - there was a crude UI that you could use to extract the string from the input document, so it would be easy to demonstrate the PDFs uploaded by the attacker to a given service do in fact contain that strings.

But in this particular point it wasn't even necessary. After a couple of months it turned out that the person who had been uploading the unprotected versions made a mistake and was located as a 20-something living with his parents in a small house in the East Coast. It was enough to notify them and the malicious activity stopped. The company wasn't interested in extracting every penny from the the kid (or his poor parents), they just wanted him to stop, and one letter from a lawyer was enough. If they wanted to go full steam, they would have involved the police and I'm sure they would have found quite a lot of incriminating evidence on his computer, but they were clear ruining someone else's life was not their aim.

Re:Elsevier embeds a hash in the PDF metadata that is unique... by NKosmatos on Wednesday January 26, 2022 @07:20AM (#30084634)
The tweet author also mentions these tools than can help in cleaning PDFs: exiftool: https://exiftool.org qpdf: https://qpdf.sourceforge.io dangerzone (GUI, render PDF as images, then re-OCR everything): https://dangerzone.rocks mat2 (render PDF as images, don't OCR): https://0xacab.org/jvoisin/mat2