Better HN
topnewbestaskshowjobs
Log inSign up

ThomasRinsma

416 karma · joined May 20, 2024 (2y ago) · 7 submissions

Submissions

1.

Spoofing OpenPGP.js signature verification(codeanlabs.com ↗)

97 points · by ThomasRinsma · 1y ago · 30 comments

comment 1y ago · link · parent

Author of "PDF Tetris" here.

Great work! We had the same idea at the same time, here's my version of PDF Doom:

Source: https://github.com/thomasRinsma/pdfdoom

Playable here: https://th0mas.nl/downloads/doom.pdf

Yours is neater in many ways though!

comment 1y ago · link · parent

Oops, yeah :)

comment 1y ago · link · parent

I barely looked at Adobe Reader so not sure about that one, it definitely does not work with this PDF though, likely because it's not compliant in several ways. Besides that I wouldn't be surprised if it supports all the required JS APIs and more, just possibly behind some permission prompts.

It might work in Foxit as I believe it supports some scripting. Most of the other native PDF renderers are more static, as far as I know. In either case, I was most interested in the browser-native engines, as I always thought of them as more "static"/limited.

As for documentation on specific features: to be honest, I just looked at the implementations of PDF.js and PDFium. Both only support a subset of the "standard" API, likely for security reasons. But PDF.js for example allows changing a field's background color (colored pixels!), and PDFium allows modifying their position/bounding box (I tried a high res color display by moving a row vertically as if it's a scanline, but things become quite laggy).

5.

Show HN: Tetris in a PDF(th0mas.nl ↗)

1289 points · by ThomasRinsma · 1y ago · 223 comments

6.

CVE-2024-29510 – Exploiting Ghostscript using format strings(codeanlabs.com ↗)

41 points · by ThomasRinsma · 2y ago · 9 comments

comment 2y ago · link · parent

Original author here. This is indeed a bit confusing.

You are right for the case where Firefox's PDF.js is used (local or remote file in a tab or iframe). The XSS problem however is with web-applications that themselves use PDF.js. In that case, it does not run in a separate or special origin; that is a Firefox thing.

You are also right that the PDF format supports JavaScript, but that is something unrelated to this, and indeed highly sandboxed in all cases.