TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Weaponizing PostScript

140 pointsby remxover 8 years ago

7 comments

mpweiherover 8 years ago
NeXTStep with its DisplayPostScript based WindowServer was an amazing playground for these kinds of shenanigans. Perhaps the most extreme was &quot;Project Akira&quot;, a fully functioning NFS server you could launch by opening an EPS file. ( <a href="http:&#x2F;&#x2F;www.wizards.de&#x2F;~frank&#x2F;franksprojects.html" rel="nofollow">http:&#x2F;&#x2F;www.wizards.de&#x2F;~frank&#x2F;franksprojects.html</a> )<p>Slightly less malicious were a whole bunch of EPS files that would play havoc with your screen: &quot;gravity&quot;, which would make all your windows drop to the bottom of the screen, &quot;black hole&quot;, etc.<p>Fun times.<p>Maybe I should release my Postscript tools for OS X?
评论 #13703960 未加载
godmodusover 8 years ago
Post script is Turing complete. So this is not a long shot at all, in fact since most people consider documents safe, it&#x27;s a very exploitable attack vector.<p>Pdfs also allow arbitrary code execution, which is not a new result.<p>Here&#x27;s an older hackernews discussion about the subject: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4910113" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=4910113</a>
评论 #13704892 未加载
评论 #13704121 未加载
评论 #13704237 未加载
bootloadover 8 years ago
Any references to best coding practice for PS? For example is there a PS lint? (will start hunting for this)<p>update 1: latex <a href="http:&#x2F;&#x2F;www.latex-project.org" rel="nofollow">http:&#x2F;&#x2F;www.latex-project.org</a> and <a href="http:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;12668&#x2F;where-do-i-start-latex-programming" rel="nofollow">http:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;12668&#x2F;where-do-i-star...</a><p>update 0: so open tools for postscript appear to be really interfacing AGPL ghostscript (postscript) api if you can handle the ^agpl^ restrictions ~ <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ghostscript" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ghostscript</a>
评论 #13703469 未加载
评论 #13703586 未加载
评论 #13706026 未加载
samfover 8 years ago
I&#x27;ve always wanted to trick someone into sending this to the printer:<p><pre><code> %! initgraphics clippath fill { copypage } loop </code></pre> Please don&#x27;t do this! It&#x27;ll run you out of toner and paper as fast as possible.<p>I&#x27;m just surprised I haven&#x27;t seen more things like this, especially back in the days when postscript was popular.
cel1neover 8 years ago
Had to write postscript for &quot;introduction into stackbased programming&quot; at university.<p>We choose to make complex cylcoid &quot;animations&quot;. We controlled the &quot;animation&quot;-speed by using helper routines that slowed down the postscript-viewer by painting nonsense white on white.<p>Downside of this was that it crashed printers and macOS Preview.<p>And the professor actually wanted us to write a parser or something else that could use a stack, but we were pretty satisfied with ourselves.
评论 #13705219 未加载
jwilkover 8 years ago
Some time ago Tavis Ormandy found a bunch of bugs in Ghostscript&#x27;s sandbox, which would allow arbitrary code execution:<p><a href="http:&#x2F;&#x2F;www.openwall.com&#x2F;lists&#x2F;oss-security&#x2F;2016&#x2F;10&#x2F;05&#x2F;7" rel="nofollow">http:&#x2F;&#x2F;www.openwall.com&#x2F;lists&#x2F;oss-security&#x2F;2016&#x2F;10&#x2F;05&#x2F;7</a><p>Hopefully these bugs are all fixed now, but I wouldn&#x27;t be surprised if there was more to be found.
Bugeover 8 years ago
After seeing this post[1] of a postcript file, I was wondering if there was any way it could harm my computer, paranoid you could say. Apparently I need to watch out for postscript viewers that allow writing to files. Are there any that allow file writing by default?<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13678251" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13678251</a>