Skip to main content
zeroShadow

Scams

Case Studies

Learning & Information

Don't Get Rekt By PDFs

Apr 19, 2024 | 6 min read

Malicious PDFs are increasingly used by threat actors to deliver malware as Microsoft tightens security on Office files. Outdated PDF readers and social engineering tactics pose major risks - especially to Web3 users - keeping software updated, disabling scripting, and verifying sources before opening any PDF is vital.

A red and black graphic featuring icons of PDFs with download and document symbols.

PDFs are a popular file format that have been in use since 1993. However, the love for PDFs is not just shared by legitimate users, but also threat actors who often weaponize the file format in order to deliver malware. Malicious PDFs can be dated back to 2001, when the “ Peachy ” malware was first identified. While the Peachy worm was rather benign by modern standards, malware development and the weaponization of PDFs has (unfortunately) come a long way, and the use of PDFs by threat actors is on the rise.


Why Are Malicious PDFs Becoming More Popular?

The rise of malicious PDFs over the past few years is directly related to efforts by Microsoft to curtail the use of MS Office documents (.docx, .xlsx, etc) to deliver malware. Since the introduction of security changes  by Microsoft which have blocked macros by default, threat actors have had to resort to other tactics, techniques and procedures (TTPs) to deliver their malware and drive the success of their criminal activities. It is important to note that trends in the use of malicious PDFs are also linked to new vulnerabilities found within the software used to read the file type such as Adobe Reader.

Furthermore, the creation of malicious PDFs is simple. Builders/wizards are available on common repositories like GitHub  and also for sale on criminal marketplaces. This ease of access makes PDFs accessible for even novice threat actors.


The Different Types of Malicious PDFs

Links & Redirects

Thanks to advances in patch management and user awareness, the majority of malicious PDFs now rely upon social engineering rather than code execution for their exploits. Below is a mock example of a PDF seeking to socially engineer user interaction.

Example of a fake PDF viewer prompt with a QR code used for phishing.

This example uses the following common TTPs:

This example is relatively simple, but threat actors often go to great lengths to create convincing lures, often using social engineering tactics such as pretexting , a need for urgency or the illusion of a reward. Threat actors also use themes that are targeted to the specific victim, such as a job offer or accusation, or are linked to current affairs/geopolitics. For instance, the coronavirus pandemic led to a surge of malicious documents and phishing using pandemic related clickbait titles  to drive interaction.


Code Execution

The PDF file format contains scripting technologies which are designed to add useful and interactive features to PDFs. Unfortunately this also allows threat actors to include malicious code seeking to exploit vulnerabilities in the PDF reader software in order to impact the wider machine in some way. If you’re using a vulnerable PDF reader, simply opening a malicious PDF can compromise your machine.

For instance outdated versions of Adobe Reader or Foxit Reader can be exploited thanks to a myriad  of different vulnerabilities. An example of this would be CVE-2023-27363 , a vulnerability in Foxit Reader, which was reportedly used to target members of the crypto community with lures relating to discussions about a new project. The malicious PDF ultimately would have led to infection with the commodity infostealer StealC , which would have stolen credentials, cookies and files from the victim machine. This stolen data could then be used to further compromise the victim or their organization.

Unfortunately this is not just isolated to standalone viewers like Adobe Reader or FoxIt Reader, but also PDF readers included in browsers such as Google Chrome. A search on Mitre.org  reveals 108 separate vulnerabilities in PDFium, the engine used by Google Chrome to read the PDF file format. While these vulnerabilities vary in terms of exploitability, impact and risk, it demonstrates the risk of a threat actor developing or purchasing a 0-day exploit in a PDF reader as being real and worth considering.

zeroShadow have investigated incidents involving the deployment of malware that total almost $48M USD in cryptocurrency thefts. It is clear that malware is a big part of threat actors TTPs, and malicious PDFs are certainly part of that arsenal.


The Risk To Web3

Organizations and individuals working in web3 are at a higher level of risk when it comes to attack by threat actors. This is for several reasons:

Since August 2023, zeroShadow have investigated incidents involving the deployment of malware that total almost $48M USD in cryptocurrency thefts. It is clear that malware is a big part of threat actors TTPs, and malicious PDFs are certainly part of that arsenal.

Screenshot of a phishing email impersonating OpenSea to trick users into opening a malicious document.
https://twitter.com/tayvano_/status/1661473965825740800


What Can I Do To Mitigate The Risks?

Just because threat actors are increasingly using malicious PDFs in their attacks, doesn’t mean we should all just abandon and ignore every PDF we receive. But there are a few things we can do to help mitigate the risk of malicious PDFs:

Public malware analysis platforms like VirusTotal , Joe Sandbox , AnyRun or many others can be useful in identifying malicious behavior. WARNING: samples uploaded to these services are public, do not upload sensitive or confidential content.


Original article by the zeroShadow team

Share this post