by Run_DOS_Run · 3y ago · 0 comments
A look at the PDF specification is enough to know that it is a hard task to parse such a complex file format without memory bugs: the file is read backwards, which is why the x-ref table is at the end of the file, actually PDF is supposed to be exclusively ASCII... except that every PDF contains binary streams and in addition functions and properties which are defined are ignored even by Adobe Reader. I wrote some PDF-fuzzers a few years ago and the whole file format is a huge mess..
I agree that Acrobat should be avoided whenever possible but I advise everyone not to use any PDF reader that's found in a browser either because PDF is a minefield and you can expect that the most popular (default) readers will be the most heavily targeted by attackers who will inevitably find security issues. 80% of the time, users are best off downloading PDF files to disk and converting them to text or PNG before opening while resorting to a non-browser/adobe reader for any other cases excepting the ones where you're just forced to use Adobe's software because of some advanced feature.
It won't work for everybody, and it's not as if PDF converters and less common PDF readers are immune from bugs either, but if the vast majority of the time you open a PDF file all you really want is text it can be nice to know your file isn't doing things like making network connections, running JS, playing multimedia or some other bullshit PDF allows for at the same time.
Converting PDFs to text or PNG on the machine just means you're now getting rid of the need for that 2nd level exploit by running something natively on the machine.
No. If you use Linux, the correct thing to do would be to convert the PDF into DJVU and use djview4 to read it.