First came the Zip Bomb, now comes the PDF Bomb

PDF vulnerability poses new challenges to antivirus/antimalware scanning software.

A Zip Bomb is a small Zip file that exploits capabilities of compression algorithms and settings to expand into a file or set of files that consume system resources to the point of system unusability. Didier Stevens, continuing his recent work in finding interesting sections of the PDF data scheme, has described techniques for the PDF equivalent of the Zip bomb, or a PDF Bomb.

Stevens' discovery comes after he looked closer at PDF Stream Objects. Within the PDF specification, a stream object is merely a form of packaging data as a sequence of bytes using one of a variety of encoding methods. A compliant PDF reader will then interpret the PDF file and reconstitute the stream object as the data that it originally represented. The great power of a stream object is that it allows the storage of complex visual representations in a straight forward and consistent manner.

It is the encoding options which is where the PDF Bomb gets its power from. Through the use of a 'stream filter' different encoding methods can be used to obfuscate the original data and provide a more compact means of storage when the filter being used is a compression filter. Stevens discovered that chaining two or more filters together, which he has dubbed a 'Filter Cascade' can lead to interesting outcomes when the resulting stream object is decoded by a compliant reader. Apart from the obvious system resource usage required to run subsequent filters on the same data, some of the filter options can be fed parameters that change how the data is filtered and how it is finally represented.

In testing, Stevens managed to create a PDF file that was only 2642 bytes in size, but which managed to decompress to 1GB of data through the use of filter parameters and filter cascading.

This now poses a challenge for antivirus/antimalware scanning software to adequately filter a booby-trapped PDF document without having to devote excessive resources to it. When other techniques for hiding malware in PDF files are considered (such as those already made public), it poses a seemingly impossible to solve problem for protective software developers. Because of the nature of PDF stream objects, techniques to identify and isolate Zip Bombs may not be applicable to PDF Bombs, though some observation of resource demands when filtering stream objects will highlight a potential PDF Bomb.

It is also a problem for PDF readers. How are they going to handle files that are created like this without failing? In Stevens' testing, he found that the 2642 byte PDF file was capable of bringing some readers to a halt. Perhaps some inbuilt monitoring of resource demands, similar to what is suggested above, will be a viable option for PDF reader developers.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Carl Jongsma

Computerworld
Show Comments

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

David Coyle

Brother PocketJet PJ-773 A4 Portable Thermal Printer

I rate the printer as a 5 out of 5 stars as it has been able to fit seamlessly into my busy and mobile lifestyle.

Kurt Hegetschweiler

Brother PocketJet PJ-773 A4 Portable Thermal Printer

It’s perfect for mobile workers. Just take it out — it’s small enough to sit anywhere — turn it on, load a sheet of paper, and start printing.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?